-
-
Notifications
You must be signed in to change notification settings - Fork 132
add pager to describe workflow #1266
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
add pager to describe workflow #1266
Conversation
…mand' of https://github.com/cloudposse/atmos into feature/dev-3131-add-pager-to-atmos-describe-config-command
…mand' of https://github.com/cloudposse/atmos into feature/dev-3131-add-pager-to-atmos-describe-config-command
…mand' of https://github.com/cloudposse/atmos into feature/dev-3131-add-pager-to-atmos-describe-config-command
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…mand' of https://github.com/cloudposse/atmos into feature/dev-3131-add-pager-to-atmos-describe-config-command
…ommand' of https://github.com/cloudposse/atmos into feature/dev-3251-add-pager-to-atmos-describe-workflow-command
fbf4450
to
cd3236e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
cmd/describe_workflows.go (1)
84-87
: Avoid re-defining validation errors – reuse the ones fromexec
ErrInvalidFormat
andErrInvalidOutputType
already exist in theexec
package. Re-declaring them here breaks error identity (errors.Is/As
will no longer work) and duplicates maintenance effort.-var ( - ErrInvalidOutputType = fmt.Errorf("invalid output type specified. Valid values are 'list', 'map', and 'all'") - ErrInvalidFormat = fmt.Errorf("invalid format specified. Valid values are 'yaml' and 'json'") -) +// import "github.com/cloudposse/atmos/internal/exec" above and +// rely on exec.ErrInvalidOutputType / exec.ErrInvalidFormatcmd/describe_stacks.go (1)
58-65
: Minor duplication & consistency nit
- The global call to
setCliArgsForDescribeStackCli
works but bypasses the indirection provided viag.setCliArgsForDescribeStackCli
, slightly weakening testability/injection.- The pager flag is already processed inside
setCliArgsForDescribeStackCli
; the second retrieval here is redundant but harmless.No action required, just flagging for future cleanup.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
cmd/describe_affected.go
(1 hunks)cmd/describe_stacks.go
(1 hunks)cmd/describe_workflows.go
(3 hunks)internal/exec/describe_stacks.go
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
cmd/describe_stacks.go (1)
Learnt from: samtholiya
PR: cloudposse/atmos#1255
File: cmd/describe_affected.go:122-123
Timestamp: 2025-05-22T19:58:32.988Z
Learning: The "pager" flag is defined as a PersistentFlag at the describe command level in cmd/describe.go, making it available to all subcommands including describeAffectedCmd without needing to redeclare it.
cmd/describe_affected.go (2)
Learnt from: samtholiya
PR: cloudposse/atmos#1255
File: cmd/describe_affected.go:122-123
Timestamp: 2025-05-22T19:58:32.988Z
Learning: The "pager" flag is defined as a PersistentFlag at the describe command level in cmd/describe.go, making it available to all subcommands including describeAffectedCmd without needing to redeclare it.
Learnt from: samtholiya
PR: cloudposse/atmos#1266
File: cmd/describe_affected.go:0-0
Timestamp: 2025-06-07T19:28:21.289Z
Learning: In the Atmos codebase, using panic for unsupported flag types in flag processing functions like setDescribeAffectedFlagValueInCliArgs is the expected behavior rather than returning errors. This pattern is preferred for developer errors when unsupported types are added to the flagsKeyValue map.
🧬 Code Graph Analysis (1)
cmd/describe_stacks.go (1)
pkg/schema/schema.go (2)
Settings
(759-763)Terminal
(200-207)
🪛 golangci-lint (1.64.8)
cmd/describe_affected.go
[error] 42-42: ineffectual assignment to err
(ineffassign)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: Summary
🔇 Additional comments (1)
internal/exec/describe_stacks.go (1)
93-95
: Good catch—reuse the injected pager creatorSwitching to
d.pageCreator
removes an unnecessary allocation and keeps the injected dependency path consistent with the rest of the refactor. ✅
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…-workflow-command
…-workflow-command
what
why
references
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Refactor