-
Notifications
You must be signed in to change notification settings - Fork 1
Develop #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Develop #9
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
0ef9f56
initial scaffolding
b33593b
add apply, edit commands
a88c2a7
add polling
58e7227
add some comments and updates
674b49e
Move to using oauth client in cliext
anekkanti 4d1ab36
Move to using cliext for command generation
anekkanti 5755a4c
cleanup some unreachable code
anekkanti 1194d80
fix idempotent spelling typo
anekkanti 801204e
Address copilot code review feedback
anekkanti df59476
go mod cleanup
anekkanti 85f766a
Add a github action to build the cli
anekkanti 1a7535e
Fix for github actions verifying generation
anekkanti c7c9b0a
Add a --server flag
anekkanti 59d4b7d
More changes
anekkanti 56124da
Move to latest oauth cliext package
anekkanti 0883a1f
more updats
anekkanti c5f1302
Add guidelines for ai-agents
anekkanti 5a3b687
more updates
anekkanti 32346c1
More ux updates
anekkanti 9788f40
update mod update
anekkanti 2b2af94
Add a patch command for namespace retention days
anekkanti c25e283
update go.mod
67be767
fix proto clone
aa482e5
move retention to subcommand and add get method
7d2c356
add resource version flag for all update commands
f4481d4
add namespace lifecycle management commands
74e8cca
Update temporalcloudcli/commands.namespace.retention.go
gregmankes 0ad9188
Update temporalcloudcli/commands.namespace.go
gregmankes 795b5a4
Merge pull request #3 from temporalio/gmankes/add-patch-commands
gregmankes 2123ec3
set iam as codeowner
59fcaee
Merge pull request #4 from temporalio/gmankes/add-lifecycle-patch-com…
gregmankes 7f4c17d
fix formatting directive for fmt.Errorf
828b741
bump cliext
c04bd8a
add mise toml and add command test harness
918fb67
remove a test that's broken
413dfe1
add integration test harness and fix bugs
24f812e
fix env var name
7301f3d
modify makefile to make .env not required
2974b5c
remove environment from cicd
4fd70a9
Merge pull request #5 from temporalio/gmankes/bump_cliext
gregmankes aa87efd
add build tags to commands_test
2c9a698
fix json printing, add consistency across the board
7103686
Update test.yml
gregmankes 09e5c18
Update test.yml
gregmankes 955167f
Update temporalcloudcli/commands.namespace_test.go
gregmankes 977d29a
Merge pull request #6 from temporalio/gmankes/add_test_harness
gregmankes 18c0468
add profile and config to oauth config store/loading
718c3cf
use external package to generate commands
2d2a7d9
use envlookup os in loading from env
9c3585a
add goreleaser, release wf, and cloud client user agent
38387dd
Update temporalcloudcli/cloud.go
gregmankes c5d9729
Merge pull request #7 from temporalio/gmankes/add_versioning_info
gregmankes 4833dbb
Merge branch 'develop' into gmankes/use_external_common_options
087e3ba
add profile fallthrough and common options
cd5e7ff
Merge pull request #8 from temporalio/gmankes/use_external_common_opt…
anekkanti ae6c1b3
add installation of gen-commands
927fddf
make the install rule cleaner
77df88e
address comments on pr
0019b0c
update gitignore
37ef708
Merge pull request #10 from temporalio/gmankes/update_gen_commands_rule
gregmankes f235040
Initial plan
Copilot 948c88a
Add Go bin to PATH in GitHub Actions workflow
Copilot 34c2986
Merge pull request #12 from temporalio/copilot/fix-github-actions-pat…
gregmankes 933a954
add async operation polling after apply
5a04718
Merge pull request #13 from temporalio/gmankes/fix_issues_in_develop_…
khisakuni 66f333c
Fix integration tests (#14)
khisakuni c41ca7e
Cursor bug bot fixes (#15)
khisakuni e43af43
update go
khisakuni 2ccc149
Fix: Context cancellation function ignored causing leak
khisakuni 82792e6
Fix: Direct output breaks JSON formatting in commands
khisakuni aeec650
Fix: OAuth server error not checked causing silent failure
khisakuni 1458949
Remove double new line
khisakuni 7471aa2
Merge pull request #16 from temporalio/more-cursor-fixes
anekkanti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Check Generated Files | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| verify-generation: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: "go.mod" | ||
| check-latest: true | ||
| cache: false | ||
| - name: Add Go bin to PATH | ||
| run: echo "$HOME/go/bin" >> $GITHUB_PATH | ||
| - name: Run commands generation command | ||
| run: make gen | ||
| - name: Verify no changes were generated | ||
| run: | | ||
| # Check if there are any uncommitted changes in the working directory | ||
| if [ -z "$(git status --porcelain)" ]; then | ||
| echo "::notice::Generated files are up to date. No changes detected." | ||
| else | ||
| echo "::error::Detected uncommitted changes after running the generation command. Please run the generator and commit the changes." | ||
| git status | ||
| git diff | ||
| exit 1 | ||
| fi | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| needs: verify-generation | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: "go.mod" | ||
| check-latest: true | ||
| cache: false | ||
| - name: Build the cli binary | ||
| run: make build | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| release: | ||
| types: | ||
| - published | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: "go.mod" | ||
| check-latest: true | ||
| cache: true | ||
|
|
||
| - name: Get build date | ||
| id: date | ||
| run: echo "date=$(date '+%F-%T')" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Get build unix timestamp | ||
| id: timestamp | ||
| run: echo "timestamp=$(date '+%s')" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Get git branch | ||
| id: branch | ||
| run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Get build platform | ||
| id: platform | ||
| run: echo "platform=$(go version | cut -d ' ' -f 4)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Get Go version | ||
| id: go | ||
| run: echo "go=$(go version | cut -d ' ' -f 3)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@v6 | ||
| with: | ||
| version: v2.12.7 | ||
| args: release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| BUILD_DATE: ${{ steps.date.outputs.date }} | ||
| BUILD_TS_UNIX: ${{ steps.timestamp.outputs.timestamp }} | ||
| GIT_BRANCH: ${{ steps.branch.outputs.branch }} | ||
| BUILD_PLATFORM: ${{ steps.platform.outputs.platform }} | ||
| GO_VERSION: ${{ steps.go.outputs.go }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: test | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
| - main | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Unit + Integration (mise) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| TEMPORAL_CLOUD_SERVER: ${{ vars.TEMPORAL_CLOUD_SERVER }} | ||
| TEMPORAL_API_KEY: ${{ secrets.TEMPORAL_API_KEY }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: "go.mod" | ||
| check-latest: true | ||
| cache: false | ||
|
|
||
| - name: Setup mise | ||
| uses: jdx/mise-action@v2 | ||
| with: | ||
| install: true | ||
|
|
||
| - name: Validate required environment variables and secrets | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| missing=0 | ||
|
|
||
| if [[ -z "${TEMPORAL_CLOUD_SERVER:-}" ]]; then | ||
| echo "::error::TEMPORAL_CLOUD_SERVER is not set or is empty" | ||
| missing=1 | ||
| fi | ||
|
|
||
|
|
||
| # Secret: check presence ONLY, never print or echo | ||
| if [[ -z "${TEMPORAL_API_KEY:-}" ]]; then | ||
| echo "::error::TEMPORAL_API_KEY is not set or is empty" | ||
| missing=1 | ||
| fi | ||
|
|
||
| if [[ "$missing" -ne 0 ]]; then | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Run unit tests | ||
| run: | | ||
| mise run test | ||
|
|
||
| - name: Run integration tests | ||
| run: | | ||
| mise run integration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| version: 2 | ||
|
|
||
| before: | ||
| hooks: | ||
| - go mod download | ||
|
|
||
| release: | ||
| prerelease: auto | ||
| draft: false | ||
| name_template: "v{{.Version}}" | ||
|
|
||
| archives: | ||
| - <<: &archive_defaults | ||
| name_template: "temporal_cloud_cli_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
| id: nix | ||
| ids: | ||
| - nix | ||
| formats: | ||
| - tar.gz | ||
| files: | ||
| - LICENSE | ||
|
|
||
| - <<: *archive_defaults | ||
| id: windows-zip | ||
| ids: | ||
| - windows | ||
| formats: | ||
| - zip | ||
| files: | ||
| - LICENSE | ||
|
|
||
| # used by SDKs as zip cannot be used by rust https://github.com/zip-rs/zip/issues/108 | ||
| - <<: *archive_defaults | ||
| id: windows-targz | ||
| ids: | ||
| - windows | ||
| files: | ||
| - LICENSE | ||
|
|
||
| builds: | ||
| - <<: &build_defaults | ||
| dir: cmd/temporal-cloud | ||
| binary: temporal-cloud | ||
| ldflags: | ||
| - -s -w -X github.com/temporalio/cloud-cli/temporalcloudcli.Version={{.Version}} | ||
| goarch: | ||
| - amd64 | ||
| - arm64 | ||
| env: | ||
| - CGO_ENABLED=0 | ||
| id: nix | ||
| goos: | ||
| - linux | ||
| - darwin | ||
|
|
||
| - <<: *build_defaults | ||
| id: windows | ||
| goos: | ||
| - windows | ||
| hooks: | ||
| post: # TODO sign Windows release | ||
|
|
||
| checksum: | ||
| name_template: "checksums.txt" | ||
| algorithm: sha256 | ||
|
|
||
| changelog: | ||
| disable: true | ||
|
|
||
| announce: | ||
| skip: "true" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.