Skip to content

feat: Atmos Terraform Plan Upload #1272

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

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

feat: Atmos Terraform Plan Upload #1272

wants to merge 15 commits into from

Conversation

milldr
Copy link
Member

@milldr milldr commented May 29, 2025

Important

Work in progress!

what

  • Upload the result of a Terraform plan to Atmos Pro

why

  • When we trigger a plan with Atmos Pro for drift detection, we need to return the result of whether or not there is drift to AP

references

Copy link

codecov bot commented May 29, 2025

Codecov Report

Attention: Patch coverage is 21.42857% with 77 lines in your changes missing coverage. Please review.

Project coverage is 49.17%. Comparing base (c2db173) to head (2817a53).

Files with missing lines Patch % Lines
internal/exec/pro.go 21.73% 36 Missing ⚠️
pkg/pro/api_client.go 0.00% 24 Missing ⚠️
internal/exec/terraform.go 10.52% 16 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1272   +/-   ##
=======================================
  Coverage   49.16%   49.17%           
=======================================
  Files         233      233           
  Lines       25548    25645   +97     
=======================================
+ Hits        12561    12610   +49     
- Misses      11328    11370   +42     
- Partials     1659     1665    +6     
Flag Coverage Δ
unittests 49.17% <21.42%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@milldr milldr added the minor New features that do not break anything label May 29, 2025
@github-actions github-actions bot added size/l and removed size/m labels May 30, 2025
"github.com/spf13/cobra"
)

// Error variables for pro package

Check failure

Code scanning / golangci-lint

Comment should end in a period Error

Comment should end in a period
}

flags := cmd.Flags()

component, err := flags.GetString("component")
if err != nil {
return ProLockUnlockCmdArgs{}, err
return ProLockUnlockCmdArgs{}, fmt.Errorf("%w: %v", ErrFailedToGetComponentFlag, err)

Check failure

Code scanning / golangci-lint

add-constant: string literal "%w: %v" appears, at least, 4 times, create a named constant for it Error

add-constant: string literal "%w: %v" appears, at least, 4 times, create a named constant for it
}

c.Logger.Trace(fmt.Sprintf("\nUploading the affected components and stacks to %s", url))

resp, err := c.HTTPClient.Do(req)
if err != nil {
return fmt.Errorf("failed to make request: %w", err)
return fmt.Errorf("%w: %w", ErrFailedToMakeRequest, err)

Check failure

Code scanning / golangci-lint

add-constant: string literal "%w: %w" appears, at least, 4 times, create a named constant for it Error

add-constant: string literal "%w: %w" appears, at least, 4 times, create a named constant for it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor New features that do not break anything size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant