Update overrides section behavior in imports and inline#1122
Conversation
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports # Conflicts: # examples/quick-start-advanced/Dockerfile # website/docs/integrations/atlantis.mdx
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports
…verrides-in-imports
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pkg/utils/markdown_utils.go (1)
70-70: Fix typo in comment.There's a typo in the comment: "exist" should be "exit".
-// PrintErrorMarkdownAndExit prints an error message in Markdown format and exist with the exit code 1. +// PrintErrorMarkdownAndExit prints an error message in Markdown format and exits with the exit code 1.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
.golangci.yml(0 hunks)pkg/utils/markdown_utils.go(1 hunks)pkg/utils/markdown_utils.go(5 hunks).golangci.yml(4 hunks).golangci.yml(4 hunks)pkg/utils/markdown_utils.go(1 hunks)pkg/utils/markdown_utils.go(1 hunks).golangci.yml(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- pkg/utils/markdown_utils.go
- pkg/utils/markdown_utils.go
- pkg/utils/markdown_utils.go
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Analyze (go)
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
🔇 Additional comments (12)
pkg/utils/markdown_utils.go (8)
12-12: LGTM! Import alias change improves readability.Changing the import alias from
ltologmakes the code more self-descriptive and aligns with Go naming conventions.
20-20: LGTM! Improved comment formatting.Adding the period maintains consistent comment formatting throughout the codebase.
23-23: LGTM! Proper noun capitalization.Correctly capitalizing "Markdown" as it's a proper noun.
47-47: LGTM! Consistent with import alias change.This line correctly uses the updated import alias.
52-52: LGTM! Consistent comment improvements.Both capitalization and punctuation improvements match the other comment updates.
83-86: Fix typo in new function comment and consider refactoring exit pattern.This new helper function is useful, but there's a typo in the comment and it inherits the same testability issue from
PrintErrorMarkdownAndExit.
- Fix the typo:
-// PrintInvalidUsageErrorAndExit prints a message about the incorrect command usage and exist with the exit code 1. +// PrintInvalidUsageErrorAndExit prints a message about the incorrect command usage and exits with the exit code 1.
- Consider addressing the testability issue mentioned in past reviews:
// PrintInvalidUsageErrorAndExit prints a message about the incorrect command usage and exits with the exit code 1. +// TODO: Refactor so that we only call `os.Exit` in `main()` or `init()` functions. +// Exiting here makes it difficult to test. +// revive:disable-next-line:deep-exit func PrintInvalidUsageErrorAndExit(err error, suggestion string) { PrintErrorMarkdownAndExit("Incorrect Usage", err, suggestion) }
88-88: LGTM! Consistent comment style.Updated comment matches the style of other comments in the file.
106-106: LGTM! Clear and concise comment.The updated comment clearly describes the function's purpose.
.golangci.yml (4)
12-12: Update for err113 Linter Description
The updated description now emphasizes enforcing best practices by focusing on error comparisons, which aligns well with our overall error-handling improvements.
28-28: Addition ofnolintlintLinter
Addingnolintlintto check fornolintcomments is a smart move to enforce better linting hygiene. It should help prevent misuse of suppression comments.
100-101: Introduction offunction-result-limitRule
The new Revive rule limits functions to returning at most 2 values, which encourages improved function design and better readability. The inline comment clearly explains the intent to use objects for cases needing more data.
165-179: New Severity Configuration Block
The added severity section sets a strong default by treating violations as errors while downgrading specific linter issues (e.g., function-length, function-result-limit, etc.) to warnings. This balanced approach should provide clearer guidance and prevent overwhelming developers with non-critical issues.
|
These changes were released in v1.165.3. |
what
overridessection behavior in imports and inlineoverridessection for many scenarios (overridesat the stack level, team level, inline and in imports)Goto1.24.0and fix some issues in the code (1.24.0is more strict about theGoformat functions always requiring theformatas the first argument)why
overridesfor the imported components, the inlineoverridesfor the same stack were not taken into account). This PR fixes this and adds acceptance tests for all scenarios!terraform.outputYAML function can (and should be) used to to read the outputs (remote state) of components directly in Atmos stack manifestsSummary by CodeRabbit
Summary by CodeRabbit
New Features
!terraform.outputfor improved data sharing in stack manifests.Documentation
Chores
.gitignoreentry to exclude specific directories from version control.Tests
aboutCmdandsupportCmdcommands to ensure correct output.ProcessYAMLConfigFile,ValidateStacks, andworkflowcommand to enhance coverage.