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

ATMOS-1.10.0: Bump GitHub actions. Bump atmos version #207

Merged
merged 2 commits into from
Oct 10, 2022

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Oct 9, 2022

what

  • Bump GitHub actions
  • Bump atmos version

why

  • Remove all global vars from Go code - this fixes remote state for Terraform utils provider

    • Terraform executes a provider data source in a separate process and calls it using RPC
    • But this separate process is only one per provider, so if we call the code the get the remote state of two different components, the same process will be called
    • In the previous implementation, we used the global Go variable Config which was used by all functions to get the CLI configuration to use it in calculations of component and stack paths
    • When we tried to get the remote state of two different components from two diff repos with two diff atmos.yaml CLI config files, Terraform executed the two calls concurrently. The first call processed atmos.yaml and updated the Config global var with the component and stack paths. Then the second call also processed a different atmos.yaml (from another repo) and overrode the global Config var with values related to the second repo
    • One of the calls randomly failed with the error "Searched all paths, but could not find the component xxx in the stack yyy"
    • Removing all globals from the Go code (including the Config var) allows executing any part of the code concurrently without storing any state in global vars. The CLI config is now processed on all calls to the atmos code and is used as parameter to all Go functions that require it

references

@aknysh aknysh added the minor New features that do not break anything label Oct 9, 2022
@aknysh aknysh requested review from a team as code owners October 9, 2022 23:10
@aknysh aknysh self-assigned this Oct 9, 2022
@aknysh aknysh requested review from dotCipher and woz5999 October 9, 2022 23:10
@aknysh aknysh merged commit 1facb27 into main Oct 10, 2022
@aknysh aknysh deleted the update-remote-state branch October 10, 2022 13:39
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants