-
-
Notifications
You must be signed in to change notification settings - Fork 117
Add process-templates
, --process-functions
and --skip
flags to atmos describe affected
, atmos describe component
and atmos describe stacks
commands
#1006
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
Conversation
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
📝 WalkthroughWalkthroughThis pull request adjusts numerous function calls and signatures across command, execution, package, and documentation files. The changes add extra boolean and nil parameters to key functions (e.g., for describing components, stacks, and processing YAML functions) and introduce new persistent flags such as Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant Cmd as CLI Command
participant Exec as Executor Module
participant Util as Processing Function
U->>Cmd: Run command with new flags (--process-templates, --process-functions, --skip)
Cmd->>Exec: Parse flags and build command arguments
Exec->>Util: Invoke function (e.g., ProcessStacks/ExecuteDescribeComponent) with extra parameters
Util-->>Exec: Return processed results
Exec-->>Cmd: Aggregate and return outcome
Cmd-->>U: Display results
Possibly related PRs
Suggested reviewers
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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: 0
🧹 Nitpick comments (7)
internal/exec/utils.go (2)
512-512
: Consider a more descriptive template identifier
This label is straightforward, but adding a more descriptive identifier can help with troubleshooting.
1205-1251
: Modular post-processing routine
Centralizing the field re-assignments in one function is maintainable. For large expansions, consider a more generic mechanism (like struct decoding) to reduce duplication, but this is good for now.internal/exec/yaml_func_utils.go (1)
87-91
: EnhanceskipFunc
robustness.The function should handle edge cases and validate inputs.
Consider this improved implementation:
func skipFunc(skip []string, f string) bool { + if f == "" || skip == nil { + return false + } t := strings.TrimPrefix(f, "!") c := u.SliceContainsString(skip, t) return c }internal/exec/atlantis_generate_repo_config.go (1)
164-166
: LGTM! Function calls updated with new parameters.The updates to the affected-related functions maintain consistency with the new template and function processing capabilities.
Consider extracting these common parameters into a configuration struct to improve maintainability and reduce parameter count. Example:
+type DescribeOptions struct { + ProcessTemplates bool + ProcessFunctions bool + Skip []string +} -func ExecuteDescribeAffectedWithTargetRepoPath(..., processTemplates bool, processFunctions bool, skip []string) +func ExecuteDescribeAffectedWithTargetRepoPath(..., options DescribeOptions)Also applies to: 179-181, 192-194
website/docs/cli/commands/describe/describe-stacks.mdx (1)
60-70
: Refine Flag Description ReadabilityThe flag descriptions—especially for
--process-templates
,--process-functions
, and--skip
—are very detailed. Consider splitting longer sentences into shorter ones to enhance readability.🧰 Tools
🪛 LanguageTool
[style] ~60-~60: This sentence is over 40 words long. Consider splitting it up, as shorter sentences make the text easier to read.
Context: ... to filter the output. ::: ## Flags | Flag | Description | Alias | Required | |:----------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------|:---------| |--stack
| Filter by a specific stack.
Supports names of the top-level stack manifests
(including subfolder paths),
and Atmos stack names (derived from the context vars) |-s
| no | |--file
| If specified, write the result to the file | | no | |--format
| Specify the output format:yaml
orjson
(yaml
is default) | | no | |--components
| Filter by specific Atmos components
(comma-separated string of component names) | | no | |--component-types
| Filter by specific component types:terraform
orhelmfile
| | no | |--sections
| Output only the specified component sections.
Available component sections:backend
,backend_type
,deps
,env
,inheritance
,metadata
,remote_state_backend
,remote_state_backend_type
,settings
,vars
| | no | |--process-templates
| Enable/disable processing of allGo
templates
in Atmos stacks manifests when executing the command.
Use the flag to see the stack configurations
before and after the templates are processed.
If the flag is not provided, it's set totrue
by default.atmos describe stacks --process-templates=false
| | no | |--process-functions
| Enable/disable processing of all Atmos YAML functions
in Atmos stacks manifests when executing the command.
Use the flag to see the stack configurations
before and after the functions are processed.
If the flag is not provided, it's set totrue
by default.atmos describe stacks --process-functions=false
| | no | |--skip
| Skip processing a specific Atmos YAML function
in Atmos stacks manifests when executing the command.
To specify more than one function,
use multiple--skip
flags, or separate the functions with a comma:atmos describe stacks --skip=terraform.output --skip=include
atmos describe stacks --skip=terraform.output,include
| | no | |--query
| Query the results of the command usingyq
expressions.atmos describe stacks --query <yq-expression>
.
For more details, refer to https://mikefarah.gitbook.io/yq |-q
| no |(TOO_LONG_SENTENCE)
website/docs/cli/commands/describe/describe-component.mdx (1)
68-77
: Updated Flag DocumentationThe flags table now includes detailed entries for
--process-templates
,--process-functions
, and--skip
. While the descriptions are comprehensive, you might consider refining some of the longer sentences to improve overall clarity.🧰 Tools
🪛 LanguageTool
[style] ~68-~68: This sentence is over 40 words long. Consider splitting it up, as shorter sentences make the text easier to read.
Context: ...mos component | yes | ## Flags | Flag | Description | Alias | Required | |:----------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------|:---------| |--stack
| Atmos stack |-s
| yes | |--format
| Output format:yaml
orjson
(yaml
is default) |-f
| no | |--file
| If specified, write the result to the file | | no | |--process-templates
| Enable/disable processing of allGo
templates
in Atmos stacks manifests when executing the command.
Use the flag to see the component configuration
before and after the templates are processed.
If the flag is not provided, it's set totrue
by default.atmos describe component <c> -s <stack> --process-templates=false
| | no | |--process-functions
| Enable/disable processing of all Atmos YAML functions
in Atmos stacks manifests when executing the command.
Use the flag to see the component configuration
before and after the functions are processed.
If the flag is not provided, it's set totrue
by default.atmos describe component <c> -s <stack> --process-functions=false
| | no | |--skip
| Skip processing a specific Atmos YAML function
in Atmos stacks manifests when executing the command.
To specify more than one function,
use multiple--skip
flags, or separate the functions with a comma:atmos describe component <c> -s <stack> --skip=terraform.output --skip=include
atmos describe component <c> -s <stack> --skip=terraform.output,include
| | no | |--query
| Query the results of the command usingyq
expressions.atmos describe component <c> -s <stack> --query .vars.tags
For more details, refer to https://mikefarah.gitbook.io/yq |-q
| no | ## Output The command outputs...(TOO_LONG_SENTENCE)
website/docs/cli/commands/describe/describe-affected.mdx (1)
220-222
: Updated Flags Table for Affected CommandThe flag definitions for
--process-templates
,--process-functions
, and--skip
are now present in the table. Their detailed descriptions are consistent—though a bit lengthy—and could benefit from minor sentence breaks for readability.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (42)
cmd/cmd_utils.go
(1 hunks)cmd/describe_affected.go
(1 hunks)cmd/describe_component.go
(1 hunks)cmd/describe_stacks.go
(1 hunks)cmd/list_components.go
(1 hunks)cmd/list_stacks.go
(1 hunks)examples/quick-start-advanced/Dockerfile
(1 hunks)go.mod
(9 hunks)internal/exec/atlantis_generate_repo_config.go
(3 hunks)internal/exec/atmos.go
(2 hunks)internal/exec/aws_eks_update_kubeconfig.go
(1 hunks)internal/exec/describe_affected.go
(6 hunks)internal/exec/describe_affected_utils.go
(9 hunks)internal/exec/describe_component.go
(3 hunks)internal/exec/describe_dependents.go
(2 hunks)internal/exec/describe_stacks.go
(6 hunks)internal/exec/helmfile.go
(1 hunks)internal/exec/helmfile_generate_varfile.go
(1 hunks)internal/exec/template_funcs_component.go
(1 hunks)internal/exec/terraform.go
(1 hunks)internal/exec/terraform_generate_backend.go
(1 hunks)internal/exec/terraform_generate_backends.go
(1 hunks)internal/exec/terraform_generate_varfile.go
(1 hunks)internal/exec/terraform_generate_varfiles.go
(1 hunks)internal/exec/terraform_outputs.go
(1 hunks)internal/exec/utils.go
(4 hunks)internal/exec/validate_component.go
(1 hunks)internal/exec/validate_stacks.go
(1 hunks)internal/exec/yaml_func_utils.go
(2 hunks)pkg/component/component_processor.go
(1 hunks)pkg/describe/describe_affected_test.go
(2 hunks)pkg/describe/describe_component.go
(1 hunks)pkg/describe/describe_component_test.go
(7 hunks)pkg/describe/describe_stacks.go
(1 hunks)pkg/hooks/cmd.go
(1 hunks)pkg/hooks/store.go
(0 hunks)pkg/list/list_components_test.go
(2 hunks)pkg/list/list_stacks_test.go
(2 hunks)website/docs/cli/commands/describe/describe-affected.mdx
(2 hunks)website/docs/cli/commands/describe/describe-component.mdx
(2 hunks)website/docs/cli/commands/describe/describe-stacks.mdx
(2 hunks)website/docs/integrations/atlantis.mdx
(1 hunks)
💤 Files with no reviewable changes (1)
- pkg/hooks/store.go
✅ Files skipped from review due to trivial changes (1)
- website/docs/integrations/atlantis.mdx
🧰 Additional context used
📓 Learnings (2)
examples/quick-start-advanced/Dockerfile (2)
Learnt from: aknysh
PR: cloudposse/atmos#775
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2024-11-12T05:52:05.088Z
Learning: It is acceptable to set `ARG ATMOS_VERSION` to a future version like `1.105.0` in `examples/quick-start-advanced/Dockerfile` if that will be the next release.
Learnt from: osterman
PR: cloudposse/atmos#801
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2024-11-23T00:13:22.004Z
Learning: When updating the `ATMOS_VERSION` in Dockerfiles, the team prefers to pin to the next future version when the PR merges, even if the version is not yet released.
internal/exec/helmfile_generate_varfile.go (1)
Learnt from: Listener430
PR: cloudposse/atmos#825
File: internal/exec/helmfile_generate_varfile.go:28-31
Timestamp: 2024-12-07T16:16:13.038Z
Learning: In `internal/exec/helmfile_generate_varfile.go`, the `--help` command (`./atmos helmfile generate varfile --help`) works correctly without requiring stack configurations, and the only change needed was to make `ProcessCommandLineArgs` exportable by capitalizing its name.
🪛 LanguageTool
website/docs/cli/commands/describe/describe-stacks.mdx
[style] ~60-~60: This sentence is over 40 words long. Consider splitting it up, as shorter sentences make the text easier to read.
Context: ... to filter the output. ::: ## Flags | Flag | Description | Alias | Required | |:----------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------|:---------| | --stack
| Filter by a specific stack.
Supports names of the top-level stack manifests
(including subfolder paths),
and Atmos stack names (derived from the context vars) | -s
| no | | --file
| If specified, write the result to the file | | no | | --format
| Specify the output format: yaml
or json
(yaml
is default) | | no | | --components
| Filter by specific Atmos components
(comma-separated string of component names) | | no | | --component-types
| Filter by specific component types: terraform
or helmfile
| | no | | --sections
| Output only the specified component sections.
Available component sections: backend
, backend_type
, deps
, env
,inheritance
, metadata
, remote_state_backend
,remote_state_backend_type
, settings
, vars
| | no | | --process-templates
| Enable/disable processing of all Go
templates
in Atmos stacks manifests when executing the command.
Use the flag to see the stack configurations
before and after the templates are processed.
If the flag is not provided, it's set to true
by default.atmos describe stacks --process-templates=false
| | no | | --process-functions
| Enable/disable processing of all Atmos YAML functions
in Atmos stacks manifests when executing the command.
Use the flag to see the stack configurations
before and after the functions are processed.
If the flag is not provided, it's set to true
by default.atmos describe stacks --process-functions=false
| | no | | --skip
| Skip processing a specific Atmos YAML function
in Atmos stacks manifests when executing the command.
To specify more than one function,
use multiple --skip
flags, or separate the functions with a comma:atmos describe stacks --skip=terraform.output --skip=include
atmos describe stacks --skip=terraform.output,include
| | no | | --query
| Query the results of the command using yq
expressions.atmos describe stacks --query <yq-expression>
.
For more details, refer to https://mikefarah.gitbook.io/yq | -q
| no |
(TOO_LONG_SENTENCE)
website/docs/cli/commands/describe/describe-component.mdx
[style] ~68-~68: This sentence is over 40 words long. Consider splitting it up, as shorter sentences make the text easier to read.
Context: ...mos component | yes | ## Flags | Flag | Description | Alias | Required | |:----------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------|:---------| | --stack
| Atmos stack | -s
| yes | | --format
| Output format: yaml
or json
(yaml
is default) | -f
| no | | --file
| If specified, write the result to the file | | no | | --process-templates
| Enable/disable processing of all Go
templates
in Atmos stacks manifests when executing the command.
Use the flag to see the component configuration
before and after the templates are processed.
If the flag is not provided, it's set to true
by default.atmos describe component <c> -s <stack> --process-templates=false
| | no | | --process-functions
| Enable/disable processing of all Atmos YAML functions
in Atmos stacks manifests when executing the command.
Use the flag to see the component configuration
before and after the functions are processed.
If the flag is not provided, it's set to true
by default.atmos describe component <c> -s <stack> --process-functions=false
| | no | | --skip
| Skip processing a specific Atmos YAML function
in Atmos stacks manifests when executing the command.
To specify more than one function,
use multiple --skip
flags, or separate the functions with a comma:atmos describe component <c> -s <stack> --skip=terraform.output --skip=include
atmos describe component <c> -s <stack> --skip=terraform.output,include
| | no | | --query
| Query the results of the command using yq
expressions.atmos describe component <c> -s <stack> --query .vars.tags
For more details, refer to https://mikefarah.gitbook.io/yq | -q
| no | ## Output The command outputs...
(TOO_LONG_SENTENCE)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (57)
examples/quick-start-advanced/Dockerfile (1)
9-9
: ATMOS Version Update ConfirmedThe update to
ARG ATMOS_VERSION=1.158.0
here is consistent with the team's approach to pin to the next future version. This aligns well with previous learnings and ensures that the Dockerfile will install the correct Atmos CLI version as expected.internal/exec/utils.go (5)
285-286
: Good addition of skipping functions functionality
Adding these parameters provides a clear way to toggle YAML function processing and selectively skip certain functions. Ensure nil checks for theskip
slice if users do not provide any function names.
534-535
: Appropriate assignment after template processing
Saving the processedcomponentSection
ensures that downstream logic sees the updated configuration.
537-539
: Consistent usage of new skip parameter
Nicely ties theprocessYamlFunctions
flag to the actual function call with the skip list. This is aligned with the new feature’s requirements.
544-545
: Properly storing processed YAML function output
Persisting the updatedcomponentSection
is essential after function invocation. This is a clean approach.
547-548
: Post-processing triggered by either templates or YAML functions
Conditionally callingpostProcessTemplatesAndYamlFunctions
covers both code paths effectively.pkg/describe/describe_component.go (2)
12-13
: Expanded function signature
Adding these boolean and slice parameters makes the interface consistent with new skip-based functionality.
15-15
: Updated external call
Passing the new parameters intoe.ExecuteDescribeComponent
cleanly integrates the fresh YAML function logic.pkg/describe/describe_stacks.go (1)
18-18
: Hard-coded parameters
You are passingtrue
for template and function processing andnil
for skip. This is fine if the design always calls for full processing. Consider making these parameters flexible if future requirements arise.pkg/list/list_stacks_test.go (1)
24-25
: LGTM! Test coverage updated for new flags.The test functions have been properly updated to accommodate the new
--process-templates
and--process-functions
flags with appropriate default values.Also applies to: 41-42
pkg/list/list_components_test.go (1)
24-25
: LGTM! Consistent test updates.The test functions have been updated consistently with
list_stacks_test.go
to support the new flags.Also applies to: 44-45
cmd/list_stacks.go (1)
38-38
: Add flag definitions for new parameters.The command implementation has been updated to support the new flags (
--process-templates
,--process-functions
,--skip
), but the flag definitions are missing in theinit
function.Add the following flag definitions:
func init() { listStacksCmd.DisableFlagParsing = false listStacksCmd.PersistentFlags().StringP("component", "c", "", "atmos list stacks -c <component>") + listStacksCmd.PersistentFlags().Bool("process-templates", true, "Process Go templates in stack manifests") + listStacksCmd.PersistentFlags().Bool("process-functions", true, "Process Atmos YAML functions in stack manifests") + listStacksCmd.PersistentFlags().StringSlice("skip", nil, "Skip processing specific Atmos YAML functions") listCmd.AddCommand(listStacksCmd) }Also applies to: 53-56
internal/exec/helmfile_generate_varfile.go (1)
42-42
: LGTM! ProcessStacks updated consistently.The
ProcessStacks
call has been updated to support the new template and function processing flags while maintaining existing functionality.cmd/list_components.go (1)
44-44
: LGTM! Function call updated correctly.The ExecuteDescribeStacks call has been properly updated to include the new parameters for process functions and skip flags.
internal/exec/terraform_generate_varfile.go (1)
42-42
: LGTM! ProcessStacks call updated appropriately.The function call has been updated with the new parameters, maintaining default behavior by enabling function processing and not skipping any functions.
cmd/describe_component.go (1)
33-34
: Well-structured flag additions!The new flags are well-documented with clear descriptions and examples:
process-functions
: Enables/disables YAML function processing (default: true)skip
: Allows specifying YAML functions to skip during executionThis implementation aligns perfectly with the PR objectives.
pkg/describe/describe_affected_test.go (1)
41-43
: Test functions properly updated!Both test functions have been consistently updated with the new parameters:
- process-templates: true
- process-functions: true
- skip: nil
These changes maintain test coverage for the new functionality.
Also applies to: 75-77
internal/exec/template_funcs_component.go (1)
40-40
: Verify the new parameters for ExecuteDescribeComponent.The function call has been updated to include the new
processYamlFunctions
andskip
parameters. This aligns with the PR objectives to add control over template and function processing.Run this script to verify the function signature change:
✅ Verification successful
Updated function call parameters are consistent across the codebase.
All call sites forExecuteDescribeComponent
now include the new parameters — passingtrue, true, nil
forprocessYamlFunctions
andskip
respectively. This aligns with the PR's intended changes.
- Confirmed in multiple files (e.g.,
internal/exec/template_funcs_component.go
,pkg/hooks/cmd.go
, etc.)- Function definition in
pkg/describe/describe_component.go
reflects the updated signature🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the ExecuteDescribeComponent function signature change # Expected: Find all calls to ExecuteDescribeComponent to ensure consistent parameter updates rg -A 2 "ExecuteDescribeComponent\("Length of output: 4330
pkg/component/component_processor.go (1)
32-36
: LGTM! Consistent parameter updates for ProcessStacks calls.Both calls to
ProcessStacks
have been updated with the new parameters for template and function processing control. The changes maintain consistency between terraform and helmfile component processing.internal/exec/terraform_generate_backend.go (1)
43-43
: LGTM! ProcessStacks call updated with new parameters.The function call has been updated to include the new parameters for template and function processing control, maintaining consistency with other similar calls in the codebase.
pkg/describe/describe_component_test.go (1)
16-16
: LGTM! Test cases updated consistently.All test cases have been updated to use the new
ExecuteDescribeComponent
signature withprocessYamlFunctions
andskip
parameters. The test coverage remains comprehensive across different component scenarios.Also applies to: 25-25, 29-29, 38-38, 50-50, 62-62, 74-74, 86-86
pkg/hooks/cmd.go (1)
69-69
: LGTM! Function call updated correctly.The
ExecuteDescribeComponent
call has been properly updated to include the new parameters for YAML function processing control.cmd/describe_stacks.go (1)
48-49
: LGTM! Well-documented flags added.The new flags are properly implemented with clear descriptions and helpful usage examples:
process-functions
: Controls YAML function processingskip
: Allows specifying YAML functions to skipAlso applies to: 52-52
internal/exec/describe_component.go (1)
46-49
: LGTM! Clean implementation of new parameters.The changes are well-structured with:
- Proper error handling for new flags
- Consistent parameter passing to
ProcessStacks
- Maintained code patterns
Also applies to: 56-59, 63-69, 103-104, 116-116, 119-119
cmd/describe_affected.go (1)
48-50
: LGTM! Well-structured flag additions.The new flags are well-documented and align perfectly with the PR objectives. The default values are sensible, and the descriptions are clear and helpful.
internal/exec/atmos.go (2)
43-44
: LGTM! Clear comment and consistent parameter updates.The comment clarification helps understand why templates and functions aren't processed in this context.
107-107
: LGTM! Function call updated consistently.The
ExecuteDescribeComponent
call has been properly updated to support the new template and function processing flags.internal/exec/validate_component.go (1)
85-89
: LGTM! Consistent parameter updates across component types.Both terraform and helmfile component processing have been updated consistently with the new parameters.
internal/exec/aws_eks_update_kubeconfig.go (1)
160-165
: LGTM! Consistent parameter updates for EKS configuration.The
ProcessStacks
calls have been properly updated for both terraform and helmfile components, maintaining consistency with the new parameter structure.internal/exec/describe_affected.go (3)
36-38
: LGTM! New fields align with PR objectives.The new fields
ProcessTemplates
,ProcessYamlFunctions
, andSkip
are well-placed and properly typed to support the new command-line flags.
165-178
: LGTM! Flag parsing follows consistent patterns.The new flag parsing code maintains consistency with existing patterns and includes proper error handling.
225-227
: LGTM! Consistent parameter propagation.The new parameters are properly propagated to all execution functions, ensuring consistent behavior across different execution paths.
Also applies to: 240-242, 253-255
internal/exec/describe_dependents.go (1)
98-98
: LGTM! Function calls updated consistently.The function calls to
ExecuteDescribeStacks
andExecuteDescribeComponent
have been properly updated to include the new parameters.Also applies to: 103-103
internal/exec/helmfile.go (1)
39-39
: LGTM! ProcessStacks call updated appropriately.The
ProcessStacks
function call has been updated to include the new parameters, maintaining consistency with the updated function signature.internal/exec/terraform_generate_varfiles.go (1)
272-272
: LGTM! ProcessCustomYamlTags call updated.The
ProcessCustomYamlTags
function call has been updated to include the new parameter, maintaining consistency with the updated function signature.internal/exec/terraform_outputs.go (1)
257-257
: LGTM! Function call updated with new parameters.The update to
ExecuteDescribeComponent
aligns with the new functionality for processing templates and functions.✅ Verification successful
Consistency Verified: Updated Parameter Usage Confirmed
All instances of the
ExecuteDescribeComponent
invocation—including ininternal/exec/terraform_outputs.go
,cmd/cmd_utils.go
,internal/exec/atmos.go
, and associated test files—consistently call the function withtrue, true, nil
. This aligns with the intended changes to support template and function processing.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify consistent usage of ExecuteDescribeComponent parameters across the codebase rg -A 2 "ExecuteDescribeComponent\(" | grep -v "func"Length of output: 3973
internal/exec/terraform_generate_backends.go (1)
263-263
: LGTM! Function call updated with new parameter.The update to
ProcessCustomYamlTags
maintains consistency with the enhanced YAML processing functionality.internal/exec/validate_stacks.go (1)
312-312
: LGTM! Function call updated with new parameters.The update to
ExecuteDescribeComponent
maintains consistency with the new template and function processing capabilities.internal/exec/terraform.go (1)
117-117
: LGTM! Function call updated to support new flags.The
ProcessStacks
function call has been updated to include the new parameters for processing templates and functions, aligning with the PR objectives.cmd/cmd_utils.go (1)
342-342
: LGTM! Function call updated consistently.The
ExecuteDescribeComponent
function call has been updated to include the new parameters, maintaining consistency with the changes across the codebase.internal/exec/describe_stacks.go (2)
97-110
: LGTM! New flag handling added.The code correctly retrieves and handles the new
process-functions
andskip
flags, with proper error handling.
404-417
: LGTM! YAML function processing implementation.The code implements the new YAML function processing with proper error handling and skip functionality. The implementation is clean and follows the existing pattern.
internal/exec/describe_affected_utils.go (2)
427-438
: LGTM! Function call updated with new parameters.The
ExecuteDescribeStacks
function call has been updated to include the new parameters, maintaining consistency with the changes across the codebase.
474-485
: LGTM! Consistent parameter handling.The second instance of the
ExecuteDescribeStacks
function call is updated consistently with the same parameters, ensuring uniform behavior throughout the code.website/docs/cli/commands/describe/describe-stacks.mdx (1)
47-50
: New Examples for Flag Usage AddedThe examples now show clear usage of the new
--process-functions
and--skip
flags. The demonstration of both single and multiple skip values (using repeated flags and comma-separated lists) is consistent with the PR objectives.go.mod (10)
10-12
: AWS SDK Dependencies UpdatedThe updates to
github.com/aws/aws-sdk-go-v2
,config
, andservice/ssm
to the newer versions are noted. Please ensure these are fully compatible with your existing code.
21-21
: Editorconfig Checker Version BumpUpdating
github.com/editorconfig-checker/editorconfig-checker/v3
to v3.2.0 is appropriate. No concerns noted.
33-33
: Terraform Config Inspect UpdateThe new version of
github.com/hashicorp/terraform-config-inspect
has been bumped appropriately. Make sure any potential breaking changes are addressed.
46-46
: OPA Dependency Version IncreasedThe
github.com/open-policy-agent/opa
package upgrade to v1.1.0 appears to be a straightforward update. A quick verification of integration would be ideal.
49-49
: Samber/lo UpdatedThe update of
github.com/samber/lo
to v1.49.1 looks like a minor revision and should be safe.
53-53
: SPF13 Pflag Version UpdateThe new version of
github.com/spf13/pflag
(v1.0.6) is in keeping with the dependency upgrades. It looks fine.
276-280
: OpenTelemetry Dependencies UpgradedThe changes to update
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
to v0.59.0 along with the related OpenTelemetry packages to v1.34.0 have been implemented. Please double-check that these versions remain compatible with your instrumentation and monitoring setups.
293-293
: golang.org/x/time UpgradeThe bump to
golang.org/x/time
v0.9.0 is noted. Running the test suite should confirm that there are no regressions.
298-300
: Google Genproto and gRPC UpdatesThe updates to
google.golang.org/genproto/googleapis/api
,googleapis/rpc
, andgoogle.golang.org/grpc
(v1.70.0) appear to be standard version bumps. It is advisable to verify these changes against your gRPC integrations.
258-258
: Go-Patricia UpdateThe update for
github.com/tchap/go-patricia/v2
to v2.3.2 is a minor revision and looks acceptable.website/docs/cli/commands/describe/describe-component.mdx (1)
47-51
: Enhanced Examples for Component CommandThe new examples clearly display how to disable YAML function processing with
--process-functions=false
and how to skip specific functions using--skip
(via both multiple flags and a comma-separated list). This aligns well with the PR objectives.website/docs/cli/commands/describe/describe-affected.mdx (1)
111-115
: Inclusion of New Flag Examples in Affected DocsExamples demonstrating the usage of
--process-templates
,--process-functions
, and--skip
have been added. These examples help illustrate the enhanced flexibility available with the new flags.
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.
LGTM
These changes were released in v1.158.0. |
…`atmos describe affected`, `atmos describe component` and `atmos describe stacks` commands (#1006) * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
what
Add
process-templates
,--process-functions
and--skip
flags toatmos describe affected
,atmos describe component
andatmos describe stacks
commandsUpdate docs
why
Go
templates and executing the Atmos YAML functions. This will allow you to see the results before and after the templates and functions execution--process-templates
Go
templatesin Atmos stacks manifests when executing the command.
If the flag is not provided, it's set to
true
by default.atmos describe affected --process-templates=false
atmos describe component <c> -s <stack> --process-templates=false
atmos describe stacks --process-templates=false
--process-functions
in Atmos stacks manifests when executing the command.
If the flag is not provided, it's set to
true
by default.atmos describe affected --process-functions=false
atmos describe component <c> -s <stack> --process-functions=false
atmos describe stacks --process-functions=false
--skip
in Atmos stacks manifests when executing the command.
To specify more than one function,
use multiple
--skip
flags, or separate the functions with a comma:atmos describe affected --skip=terraform.output --skip=include
atmos describe affected --skip=terraform.output,include
atmos describe component <c> -s <stack> --skip=terraform.output --skip=include
atmos describe component <c> -s <stack> --skip=terraform.output,include
atmos describe stacks --skip=terraform.output --skip=include
atmos describe stacks --skip=terraform.output,include
Summary by CodeRabbit