Skip to content
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

fix: prefer map[string]any everywhere where we don't actually need to use DeepCopy #2591

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

krancour
Copy link
Member

Follow-up on #2589

The change wasn't as safe as I thought.

This is a more holistic fix that switches the output from promotion steps from a State to a regular map[string]any.

The only benefit a State has over a normal map[string]any is a few convenience methods, including DeepCopy(). We only need that at the top of the state map. i.e. There's no reason that output from individual steps can't be a normal map.

I can vouch for this fix better than I could for #2589 because when this is combined with #2590, I can now observe most of the Git-based promotion steps working together correctly from end-to-end.

@krancour krancour added this to the v0.9.0 milestone Sep 28, 2024
@krancour krancour self-assigned this Sep 28, 2024
@krancour krancour requested a review from a team as a code owner September 28, 2024 01:07
Copy link

netlify bot commented Sep 28, 2024

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit 3b19562
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/66f756ea0c3f0800085fd421
😎 Deploy Preview https://deploy-preview-2591.kargo.akuity.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 28, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 8 lines in your changes missing coverage. Please review.

Project coverage is 51.10%. Comparing base (16e4674) to head (3b19562).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/directives/argocd_revisions.go 0.00% 3 Missing ⚠️
internal/directives/git_pr_waiter.go 25.00% 3 Missing ⚠️
internal/directives/git_pr_opener.go 75.00% 1 Missing ⚠️
internal/directives/simple_engine.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2591   +/-   ##
=======================================
  Coverage   51.10%   51.10%           
=======================================
  Files         282      282           
  Lines       20945    20945           
=======================================
  Hits        10703    10703           
  Misses       9578     9578           
  Partials      664      664           

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

@krancour krancour added this pull request to the merge queue Sep 28, 2024
Merged via the queue into akuity:main with commit 26e5f76 Sep 28, 2024
24 checks passed
@krancour krancour deleted the krancour/step-output-fixes branch September 28, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants