这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
cdfd5d6
Update to kai's initial implementation
kaidaguerre Jun 20, 2024
a8b7890
factor out file_job_pool
kaidaguerre Jun 21, 2024
d118605
logging
kaidaguerre Jun 24, 2024
ba21b92
handle errors from job pool
kaidaguerre Jun 25, 2024
dc65f41
logging
kaidaguerre Jun 25, 2024
a4a1c91
Fix parquet generation - use SQL to do partitioning
kaidaguerre Jun 27, 2024
a249a9f
Pass schema through to parquet writer - make FileJob generic
kaidaguerre Jul 2, 2024
974175e
Working on JSON to parquet conversion. Updated query generation, adde…
kaidaguerre Jul 3, 2024
d7a90e8
do not cast maps ot STRUCT[] for now
kaidaguerre Jul 4, 2024
0d6b7a2
working on struct[]
kaidaguerre Jul 4, 2024
f96d136
working on struct[] - seems to work
kaidaguerre Jul 5, 2024
a016325
comments
kaidaguerre Jul 5, 2024
4c76abb
tests all working
kaidaguerre Jul 5, 2024
e15f9cc
STRUCT[] works
kaidaguerre Jul 5, 2024
15b042a
coalesce attempt - failed
kaidaguerre Jul 8, 2024
28c48db
coalesce works!
kaidaguerre Jul 8, 2024
c631d66
cache view queries
kaidaguerre Jul 9, 2024
623f45a
struct arrays work
kaidaguerre Jul 10, 2024
fe2f2fd
tidy upelection of collections to minimise hard coding
kaidaguerre Jul 10, 2024
c3c301c
handle error event
kaidaguerre Jul 12, 2024
3432765
go.sum
kaidaguerre Jul 12, 2024
904378e
linting fixes
kaidaguerre Jul 15, 2024
b289a6d
adding support for specifying collection name using --collection arg
kaidaguerre Jul 16, 2024
2428807
tidying of debug data
kaidaguerre Jul 22, 2024
24906b6
paging works
kaidaguerre Jul 23, 2024
5e3b11d
remove hardcoded plugin location
kaidaguerre Jul 25, 2024
3e84b75
update CollectRequest usage
kaidaguerre Jul 25, 2024
59866e5
fix snd on closed channel error - file job pool should not close job …
kaidaguerre Jul 30, 2024
aaf704b
go.mod
kaidaguerre Jul 30, 2024
d8bb8eb
working on config parsing
kaidaguerre Jul 29, 2024
09639f8
go.mod
kaidaguerre Jul 30, 2024
31ba11b
split up artifact packae into artifact_source, artifact_loader, artif…
kaidaguerre Jul 31, 2024
fd76db2
remove resource registration/factory from plugin
kaidaguerre Jul 31, 2024
86e2bbc
started to refactor artifact source
kaidaguerre Jul 31, 2024
30457b3
inversion compiles
kaidaguerre Jul 31, 2024
f5641a6
Add Cloudwatch config
kaidaguerre Aug 1, 2024
5fcd59a
tactical config
graza-io Aug 1, 2024
f1eb011
tactical config
graza-io Aug 5, 2024
16a05a3
tactical config
graza-io Aug 8, 2024
963dd4f
Add GitHub audit log cfg
cbruno10 Aug 8, 2024
6a86088
tidy TODOs
kaidaguerre Aug 12, 2024
c6e999a
tactical config
graza-io Aug 13, 2024
8fcc445
remove unused config types (for now)
kaidaguerre Aug 13, 2024
57b82d0
Merge branch 'refs/heads/parse' into develop
kaidaguerre Aug 13, 2024
04f8142
add comment
kaidaguerre Aug 13, 2024
b18ea58
update config comment
kaidaguerre Aug 13, 2024
b3239e6
Add status spinner
kaidaguerre Aug 16, 2024
28c5ba5
set execution timeout to 2 hours, 10 minutes is too short
graza-io Aug 16, 2024
ad25d9a
refactor: execution timeout moved to const
graza-io Aug 16, 2024
8c7e080
refactor: execution timeout in second place updated to use const
graza-io Aug 16, 2024
6d32d93
- paging renamed to collectionState
kaidaguerre Aug 28, 2024
bda5105
started rename
kaidaguerre Aug 28, 2024
b0a476a
mostly renamed.
kaidaguerre Aug 28, 2024
5a8808a
remove Collection --collection arg - decode anon args into collections
kaidaguerre Aug 29, 2024
9607e45
Rename collection to partition
kaidaguerre Aug 29, 2024
55f0253
rename PartitionData to TableData
kaidaguerre Aug 29, 2024
9437dbe
Add plugin commands
kaidaguerre Sep 4, 2024
d13289b
WHen loading config, filter block types to only load partitions
kaidaguerre Sep 5, 2024
52b300d
respect --config-path flag
kaidaguerre Sep 6, 2024
6fadd3b
When extracting unknown hcl, clone the source bytes array to avoid mu…
kaidaguerre Sep 9, 2024
aeae564
Change partitioning to use tp_date instead of tp_year, tp_month and t…
kaidaguerre Sep 9, 2024
211d7d3
fixed imports
graza-io Sep 11, 2024
a87effc
- query command added, batch mode working currently
kaidaguerre Sep 11, 2024
c930b48
go.mod
kaidaguerre Sep 11, 2024
5e1cc21
plugin install/update (#16)
graza-io Sep 13, 2024
400dfb0
Update for recent pipe-fittings changes
kaidaguerre Oct 28, 2024
eb254f0
Versioning and dev release workflow (#19)
pskrbasu Oct 29, 2024
2641d69
Update versioning and workflow (#21)
pskrbasu Oct 30, 2024
03f7fe3
Add goreleaser config
pskrbasu Oct 30, 2024
b7e78c6
Add gitignore and update Makefile
pskrbasu Oct 30, 2024
3623de6
Update gitignore file
pskrbasu Oct 30, 2024
bda9f40
Update for recent pipe-fittings changes
kaidaguerre Oct 31, 2024
6ba8a2d
refactor: added error to execution when not nil
graza-io Oct 31, 2024
b0f6700
refactor: short-circuit execution of writing parquet/adding table if …
graza-io Oct 31, 2024
aa8af8f
fix: typo
graza-io Nov 1, 2024
1398212
Update goreleaser cross version
pskrbasu Nov 4, 2024
7d4632b
Connection support
kaidaguerre Nov 5, 2024
a8485a5
comment out default connection
kaidaguerre Nov 5, 2024
1a114fa
install DuckDB extension before loading
kaidaguerre Nov 5, 2024
141f3a0
fix potential NRE
kaidaguerre Nov 5, 2024
21e531d
Update CollectRequest to match sdk changes
kaidaguerre Nov 6, 2024
a23cb59
Add csv output support to tailpipe query. Closes #27
pskrbasu Nov 8, 2024
beaa6ce
chore: go mod tidy
graza-io Nov 9, 2024
9a126c0
Add connect command
kaidaguerre Nov 8, 2024
b21d0c8
filter by tp_date as well as tp_timestamp to leverage partition filte…
kaidaguerre Nov 9, 2024
d9b71d5
EnsureDatabaseFile adds views for all tables
kaidaguerre Nov 9, 2024
8b3cb01
update release workflow to use pf integrated branch
pskrbasu Nov 11, 2024
9e5a88b
tp_timestamp is now timestamp
kaidaguerre Nov 11, 2024
d2cb150
Add install script for use with prereleases
cbruno10 Nov 12, 2024
2b6e4ed
move connection from partition to source config
kaidaguerre Nov 12, 2024
93cc3cb
Fix adding connections to eval context
kaidaguerre Nov 21, 2024
2157d31
- Remove GetSchema GRPC call
kaidaguerre Nov 25, 2024
d49f65d
Update pipe-fittings branch in 01-tailpipe-release.yaml workflow
cbruno10 Nov 26, 2024
7d8a5b2
Implement plugin list and plugin show
kaidaguerre Nov 26, 2024
04a7154
Dont install extension during runtime. Embed during release/build. Cl…
pskrbasu Dec 2, 2024
85cab6b
Add query output formats (json, csv, line); Use pipe-fittings querydi…
pskrbasu Dec 2, 2024
255001b
Remove stray debug line
pskrbasu Dec 2, 2024
a5a3403
If a struct field is nul, ensure the column is null, not a struct wit…
kaidaguerre Dec 3, 2024
1ec3f18
remove debug output
kaidaguerre Dec 3, 2024
5073436
Update parquet path
kaidaguerre Dec 3, 2024
373b7d7
Update parquet path to include tp_table
kaidaguerre Dec 3, 2024
c2d8a37
move tp temp collection data to internal/collection
kaidaguerre Dec 3, 2024
013ad27
Add text and json output mode to connect
kaidaguerre Dec 3, 2024
c090f86
remove duplicate table segment from data path, now that tp_table is a…
kaidaguerre Dec 4, 2024
5206b0c
Add JSON output for tailpipe connect
kaidaguerre Dec 4, 2024
090f296
Add linting, unit tests and acceptance test workflows (#63)
pskrbasu Dec 5, 2024
749404d
Fix connect command - update table listing code to handle new folder…
kaidaguerre Dec 5, 2024
0fbe940
Add compact command. Closes #64. Closes #60
kaidaguerre Dec 5, 2024
1f5e4a1
Fix view creation to filter by table
kaidaguerre Dec 5, 2024
08b9890
Update plugin install/update to use tailpipe hub API
pskrbasu Dec 9, 2024
cefe63d
Update unknown hcl mechanism to also handle unknown blocks
kaidaguerre Dec 9, 2024
f2e87a9
Update for dynamic tables
kaidaguerre Dec 10, 2024
359ca0c
Fix issue where branch name with underscores was creating an invalid …
pskrbasu Dec 11, 2024
13b01e7
Improve error display - show plugin error when completion event has a…
kaidaguerre Dec 11, 2024
307b647
Build only linux amd64 binary for acc test workflow (#86)
pskrbasu Dec 12, 2024
06b76f7
Update plugin list output to match powerpipe list outputs
pskrbasu Dec 13, 2024
0d8d6ac
refactor: use printers for plugin list and show commands. (#94)
graza-io Dec 16, 2024
20dddae
feat: list/show commands for source (#95)
graza-io Dec 16, 2024
e494380
refactor(display): variadic use in printable resources
graza-io Dec 17, 2024
366b595
feat(introspection): added table list/show commands (#98)
graza-io Dec 17, 2024
106b840
feat(commands): partition list/show commands (#99)
graza-io Dec 18, 2024
d7ca266
fix(command): plugin show now works with org/name as well as just nam…
graza-io Dec 18, 2024
d125115
Add Filter property to partition config
kaidaguerre Dec 18, 2024
cfd6594
When converting, query row count from parquet metadata rather than as…
kaidaguerre Dec 19, 2024
ff4f756
Improve error handling. Add support for Table and Format blocks
kaidaguerre Dec 23, 2024
47a3036
Add interactive client
kaidaguerre Jan 2, 2025
b73df0e
mod tidy
kaidaguerre Jan 2, 2025
3bf8cfc
refactor(display): added row count to partition list command
graza-io Jan 3, 2025
b9f0faf
Fix tailpipe connect to return db path
kaidaguerre Jan 6, 2025
cf8044e
Dont embed extensions; Add inet extension. Closes #75
pskrbasu Jan 6, 2025
896066a
Support collecting multiple partitions (serially). Closes #71
kaidaguerre Jan 6, 2025
7a6470d
Update connect to use time parsing function to support all expected t…
pskrbasu Jan 8, 2025
d0b2ab1
Start source plugin if needed; Install/Update core plugin if needed
pskrbasu Jan 9, 2025
20f548a
Add --from and --to flags to query cmd
pskrbasu Jan 9, 2025
f251aad
feat(interactive): added autocomplete for table views (#135)
graza-io Jan 10, 2025
97af359
Add support for collect --from
kaidaguerre Jan 14, 2025
922c235
Do not start plugins for plugin list. Ensure to close plugin for plu…
kaidaguerre Jan 15, 2025
597c322
Return resolved 'from' time in CollectResponse and use in CLI to disp…
kaidaguerre Jan 15, 2025
e58aef1
fix: PluginManager now correctly closes and terminates plugin process…
graza-io Jan 16, 2025
3981f0d
refactor: removed seen check from sources, as file source moved to co…
graza-io Jan 16, 2025
b47e01a
Add acceptance test job and --to and --from tests (#136)
pskrbasu Jan 16, 2025
e68d466
Enbsure plugin manager is always closed for all list/show commands
kaidaguerre Jan 16, 2025
b351429
update MinCorePluginVersion
kaidaguerre Jan 16, 2025
b2f0eb5
update MinCorePluginVersion
kaidaguerre Jan 16, 2025
1c50c93
Cleanup old unused db files in data dir. Closes #143 (#145)
pskrbasu Jan 16, 2025
e601479
Add timing flag in collect; Show timing only if set. Closes #9
pskrbasu Jan 16, 2025
49d031e
Upgrade upload and download artifact to v4 (#149)
pskrbasu Jan 17, 2025
fdc197f
Collect Command UI Updates (#153)
graza-io Jan 21, 2025
f4f60e0
chore: removed unrequired logging
graza-io Jan 21, 2025
6d6039a
Add partition delete command
kaidaguerre Jan 21, 2025
3b4bb7e
update min core plugin version
kaidaguerre Jan 21, 2025
13d7bd1
update min core plugin version
kaidaguerre Jan 22, 2025
04b67dd
refactor(collection): updated compaction status display
graza-io Jan 22, 2025
aaf30f9
Update min core plugin version
kaidaguerre Jan 22, 2025
ac9f95d
fix: updated error text for partition not found when running partitio…
graza-io Jan 22, 2025
3a29ae8
update readme
judell Jan 22, 2025
8262fe4
Merge pull request #165 from turbot/update-readme
Jan 22, 2025
ae8fa26
tweaks
judell Jan 22, 2025
df74c07
Merge pull request #166 from turbot/update-readme
Jan 22, 2025
b5b70f7
refactor(ui): collect ui updates
graza-io Jan 23, 2025
25d33e4
Validate collect and partition delete from time are >= 1day granularity
kaidaguerre Jan 23, 2025
f3554be
remove Timing and TimingCollection and all time tracking
kaidaguerre Jan 23, 2025
d2d4116
Update tailpipe query to support --index and --partition flags. Close…
pskrbasu Jan 23, 2025
eefbcd6
Command descriptions. Closes #111
pskrbasu Jan 23, 2025
c0c6a7c
remove Timing and TimingCollection and all time tracking
kaidaguerre Jan 23, 2025
826b43c
update min core plugin version
kaidaguerre Jan 23, 2025
0e908fb
update required core version
kaidaguerre Jan 23, 2025
3e59530
refactor: collect ui fromtime source now handles empty string for whe…
graza-io Jan 23, 2025
5311152
refactor: collect ui rework
graza-io Jan 23, 2025
b69bc52
lint: changed strings.Replace => strings.ReplaceAll - linting error
graza-io Jan 24, 2025
b05c20d
Implement inspect. Closes #47
graza-io Jan 24, 2025
6011c3f
udpate min core version
kaidaguerre Jan 24, 2025
d5c9591
refactor(meta): .inspect now returns lowercase datatypes and an error…
graza-io Jan 26, 2025
8bb0279
Add partition arg to compaction. closes #156
kaidaguerre Jan 27, 2025
43e8327
Fix cancellation for collect command - close all plugins and exit nic…
kaidaguerre Jan 27, 2025
b23a9ec
Fix compaction if no partition passed
kaidaguerre Jan 27, 2025
c742e10
update minimum core version
kaidaguerre Jan 27, 2025
cc088e9
update min core version
kaidaguerre Jan 27, 2025
1fc86e6
fix: only show filtered if non-zero
graza-io Jan 28, 2025
2a0d226
Limit table query output to 10000 rows
kaidaguerre Jan 28, 2025
873f55c
update readme
judell Jan 28, 2025
8f1a1b9
Merge pull request #177 from turbot/readme
Jan 28, 2025
5e4ac32
Update README.md
Jan 28, 2025
ac1af97
Merge pull request #178 from turbot/update-readme
Jan 28, 2025
ad421d7
Fix send on closed channel error
kaidaguerre Jan 28, 2025
29788ca
comments
kaidaguerre Jan 28, 2025
98cf4b5
Finalise env vars and add config_dump env var . Closes #129
pskrbasu Jan 29, 2025
a96d917
rename TpWorkspaceProfile to TailpipeWorkspaceProfile
kaidaguerre Jan 29, 2025
fab94d0
Remove replace for pipe-fittings and tailpipe plugin sdk
kaidaguerre Jan 29, 2025
b0a03a2
update min core version
kaidaguerre Jan 29, 2025
19891f5
Cleanup repo
pskrbasu Jan 29, 2025
558af47
Add logging when collection is cancelled
kaidaguerre Jan 29, 2025
7996b3f
fix: fixed filtered display to evaluate errors also
graza-io Jan 29, 2025
cc66141
Minor tweaks to Tailpipe release workflow
pskrbasu Jan 30, 2025
106c400
Update homebrew formula description
pskrbasu Jan 30, 2025
349fc5d
Update linux install script
pskrbasu Jan 30, 2025
e11c4da
Revert "Update linux install script"
pskrbasu Jan 30, 2025
e6623f5
Add CHANGELOG
kaidaguerre Jan 30, 2025
3ed4add
Update MinCorePluginVersion to v0.1.0
kaidaguerre Jan 30, 2025
c3a3d6f
Update CHANGELOG
kaidaguerre Jan 30, 2025
c8c6c9a
remove broken link from README
kaidaguerre Jan 30, 2025
a48bca9
Update linux install script
pskrbasu Jan 30, 2025
c1514ed
Update MinCorePluginVersion to v0.1.2
kaidaguerre Jan 30, 2025
2226997
Update MinCorePluginVersion to v0.1.3
kaidaguerre Jan 30, 2025
58102dd
go.mod
kaidaguerre Jan 30, 2025
ed06309
Fix readme logo and update link to demo video (#185)
chandru89new Jan 30, 2025
0fafc8e
Fix broken readme links
pskrbasu Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .acceptance.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
before:
hooks:
- go mod tidy
builds:
- id: tailpipe-linux-amd64
binary: tailpipe
goos:
- linux
goarch:
- amd64

env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++

ldflags:
- -s -w -X main.version={{.Version}} -X main.date={{.Date}} -X main.commit={{.Commit}} -X main.builtBy=goreleaser

archives:
- id: homebrew
format: tar.gz
name_template: "{{ .ProjectName }}.{{ .Os }}.{{ .Arch }}"
files:
- none*
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Tailpipe version (`tailpipe -v`)**
Example: v0.1.0

**To reproduce**
Steps to reproduce the behavior (please include relevant code and/or commands).

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/release_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Tailpipe Release
about: Tailpipe Release
title: "Tailpipe v<INSERT_VERSION_HERE>"
labels: release
---

#### Changelog

[Tailpipe v<INSERT_VERSION_HERE> Changelog](https://github.com/turbot/tailpipe/blob/v<INSERT_VERSION_HERE>/CHANGELOG.md)

## Checklist

### Pre-release checks

- [ ] All PR acceptance test pass in `tailpipe`
- [ ] Update check is working
- [ ] Tailpipe Changelog updated and reviewed

### Release Tailpipe

- [ ] Merge the release PR
- [ ] Trigger the `01 - Tailpipe: Release` workflow. This will create the release build.

### Post-release checks

- [ ] Update Changelog in the Release page (copy and paste from CHANGELOG.md)
- [ ] Test Linux install script
- [ ] Test Homebrew install
- [ ] Release branch merged to `develop`
- [ ] Raise Changelog update to `tailpipe.io`, get it reviewed.
- [ ] Merge Changelog update to `tailpipe.io`.
225 changes: 225 additions & 0 deletions .github/workflows/01-tailpipe-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
name: "01 - Tailpipe: Release"

on:
workflow_dispatch:
inputs:
environment:
type: choice
description: 'Select Release Type'
options:
# to change the values in this option, we also need to update the condition test below in at least 3 location. Search for github.event.inputs.environment
- Development (alpha)
- Development (beta)
- Final (RC and final release)
required: true
version:
description: "Version (without 'v')"
required: true
default: 0.1.\invalid
confirmDevelop:
description: Confirm running on develop branch
required: true
type: boolean

env:
TAILPIPE_UPDATE_CHECK: false
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
SPIPETOOLS_TOKEN: ${{ secrets.SPIPETOOLS_TOKEN }}

jobs:
ensure_branch_in_homebrew:
name: Ensure branch exists in homebrew-tap
runs-on: ubuntu-latest
steps:
- name: Calculate version
id: calculate_version
run: |
echo "VERSION=v${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Parse semver string
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@v1
with:
input_string: ${{ github.event.inputs.version }}

- name: Checkout
if: steps.semver_parser.outputs.prerelease == ''
uses: actions/checkout@v4
with:
repository: turbot/homebrew-tap
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: main

- name: Delete base branch if exists
if: steps.semver_parser.outputs.prerelease == ''
run: |
git fetch --all
git push origin --delete tailpipe-brew
git push origin --delete $VERSION
continue-on-error: true

- name: Create base branch
if: steps.semver_parser.outputs.prerelease == ''
run: |
git checkout -b tailpipe-brew
git push --set-upstream origin tailpipe-brew

build_and_release:
name: Build and Release Tailpipe
needs: [ensure_branch_in_homebrew]
runs-on: ubuntu-latest
steps:
- name: validate
if: github.ref == 'refs/heads/develop'
env:
CONFIRM_MAIN: ${{ github.event.inputs.confirmDevelop }}
run: |
if [ "$CONFIRM_MAIN" == 'false' ]; then
echo "It looks like you've accidentally tried to run this action in develop branch. Either: "
echo " - Re-run the action and select the branch you wanted, or"
echo " - If you really do want to run this for develop, then re-run and tick the box to confirm"
exit 1
fi

- name: Checkout
uses: actions/checkout@v4
with:
path: tailpipe
ref: ${{ github.event.ref }}

- name: Checkout Pipe Fittings Components repository
uses: actions/checkout@v4
with:
repository: turbot/pipe-fittings
path: pipe-fittings
ref: develop

- name: Checkout Tailpipe plugin SDK repository
uses: actions/checkout@v4
with:
repository: turbot/tailpipe-plugin-sdk
path: tailpipe-plugin-sdk
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: develop

- name: Checkout Tailpipe Core Plugin repository
uses: actions/checkout@v4
with:
repository: turbot/tailpipe-plugin-core
path: tailpipe-plugin-core
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: develop

- name: Calculate version
id: calculate_version
run: |
if [ "${{ github.event.inputs.environment }}" = "Development (alpha)" ]; then
echo "VERSION=v${{ github.event.inputs.version }}-alpha.$(date +'%Y%m%d%H%M')" >> $GITHUB_ENV
elif [ "${{ github.event.inputs.environment }}" = "Development (beta)" ]; then
echo "VERSION=v${{ github.event.inputs.version }}-beta.$(date +'%Y%m%d%H%M')" >> $GITHUB_ENV
else
echo "VERSION=v${{ github.event.inputs.version }}" >> $GITHUB_ENV
fi

- name: Tag Release
run: |
cd tailpipe
git config user.name "Tailpipe GitHub Actions Bot"
git config user.email noreply@github.com
git tag $VERSION
git push origin $VERSION

# this is required, check golangci-lint-action docs
- uses: actions/setup-go@v4
with:
go-version: '1.23'
cache: false # setup-go v4 caches by default, do not change this parameter, check golangci-lint-action doc: https://github.com/golangci/golangci-lint-action/pull/704

- name: Setup release environment
run: |-
cd tailpipe
echo 'GITHUB_TOKEN=${{secrets.GH_ACCESS_TOKEN}}' > .release-env

- name: Release publish
run: |-
cd tailpipe
make release

create_pr_in_homebrew:
name: Create PR in homebrew-tap
if: ${{ github.event.inputs.environment == 'Final (RC and final release)' }}
needs: [build_and_release]
runs-on: ubuntu-latest
steps:
- name: Calculate version
id: calculate_version
run: |
echo "VERSION=v${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Parse semver string
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@v1
with:
input_string: ${{ github.event.inputs.version }}

- name: Checkout
if: steps.semver_parser.outputs.prerelease == ''
uses: actions/checkout@v4
with:
repository: turbot/homebrew-tap
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: main

- name: Create a new branch off the base branch
if: steps.semver_parser.outputs.prerelease == ''
run: |
git fetch --all
git checkout tailpipe-brew
git checkout -b $VERSION
git push --set-upstream origin $VERSION

- name: Close pull request if already exists
if: steps.semver_parser.outputs.prerelease == ''
run: |
gh pr close $VERSION
continue-on-error: true

- name: Create pull request
if: steps.semver_parser.outputs.prerelease == ''
run: |
gh pr create --base main --head $VERSION --title "Tailpipe $VERSION" --body "Update formula"

update_pr_for_versioning:
name: Update PR
if: ${{ github.event.inputs.environment == 'Final (RC and final release)' }}
needs: [create_pr_in_homebrew]
runs-on: ubuntu-latest
steps:
- name: Calculate version
id: calculate_version
run: |
echo "VERSION=v${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Parse semver string
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@v1
with:
input_string: ${{ github.event.inputs.version }}

- name: Checkout
if: steps.semver_parser.outputs.prerelease == ''
uses: actions/checkout@v4
with:
repository: turbot/homebrew-tap
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: v${{ github.event.inputs.version }}

- name: Update live version
if: steps.semver_parser.outputs.prerelease == ''
run: |
scripts/formula_versioning_tailpipe.sh
git config user.name "Tailpipe GitHub Actions Bot"
git config user.email noreply@github.com
git add .
git commit -m "Versioning brew formulas"
git push origin $VERSION
57 changes: 57 additions & 0 deletions .github/workflows/10-test-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "10 - Test: Linting"
on:
push:
tags:
- v*
branches:
- main
- "v*"
workflow_dispatch:
pull_request:

jobs:
golangci:
name: Test Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Tailpipe repository
uses: actions/checkout@v4
with:
path: tailpipe

- name: Checkout Pipe Fittings Components repository
uses: actions/checkout@v4
with:
repository: turbot/pipe-fittings
path: pipe-fittings
ref: tp

- name: Checkout Tailpipe plugin SDK repository
uses: actions/checkout@v4
with:
repository: turbot/tailpipe-plugin-sdk
path: tailpipe-plugin-sdk
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: develop

- name: Checkout Tailpipe Core Plugin repository
uses: actions/checkout@v4
with:
repository: turbot/tailpipe-plugin-core
path: tailpipe-plugin-core
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: develop

# this is required, check golangci-lint-action docs
- uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: false # setup-go v4 caches by default, do not change this parameter, check golangci-lint-action doc: https://github.com/golangci/golangci-lint-action/pull/704

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
args: --timeout=10m
working-directory: tailpipe
skip-cache: true
Loading
Loading