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

Only use CPLN_ORG and CPLN_APP env vars if allowed #109

Merged
merged 21 commits into from
Dec 12, 2023

Conversation

rafaelgomesxyz
Copy link
Collaborator

@rafaelgomesxyz rafaelgomesxyz commented Nov 17, 2023

On top of #110 for now!

Fixes #90

@rafaelgomesxyz rafaelgomesxyz self-assigned this Nov 17, 2023
lib/core/config.rb Outdated Show resolved Hide resolved
lib/core/config.rb Show resolved Hide resolved
lib/core/config.rb Outdated Show resolved Hide resolved
lib/cpl.rb Outdated Show resolved Hide resolved
@rafaelgomesxyz rafaelgomesxyz force-pushed the org-app-env-var-override branch from 20d3abd to 626ef95 Compare November 17, 2023 19:06
README.md Show resolved Hide resolved
examples/controlplane.yml Show resolved Hide resolved
lib/core/config.rb Outdated Show resolved Hide resolved
lib/core/config.rb Show resolved Hide resolved
lib/core/config.rb Outdated Show resolved Hide resolved
Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just make things lazy!

No need to change all the calls!

Just change the config.current method to lazily load config from yaml and same for for the config.[] methods.

then this PR won't have a zillion files changing as well.

lib/command/build_image.rb Outdated Show resolved Hide resolved
lib/core/config.rb Outdated Show resolved Hide resolved
lib/core/config.rb Outdated Show resolved Hide resolved
lib/core/config.rb Outdated Show resolved Hide resolved
lib/core/config.rb Outdated Show resolved Hide resolved
lib/core/config.rb Outdated Show resolved Hide resolved
lib/command/config.rb Show resolved Hide resolved
@justin808 justin808 marked this pull request as draft November 25, 2023 03:36
@rafaelgomesxyz rafaelgomesxyz force-pushed the org-app-env-var-override branch from c837226 to feb6499 Compare November 25, 2023 15:18
@rafaelgomesxyz
Copy link
Collaborator Author

@justin808 I've rebased the branch to include only changes necessary for this PR. Let's handle everything else in a separate PR.

@rafaelgomesxyz rafaelgomesxyz marked this pull request as ready for review November 25, 2023 15:24
@ahangarha
Copy link
Contributor

@rafaelgomesxyz This PR might have conflicts with #110. We need to be more careful for merging.

@rafaelgomesxyz rafaelgomesxyz force-pushed the org-app-env-var-override branch from feb6499 to bdd5d05 Compare December 1, 2023 19:42
@rafaelgomesxyz rafaelgomesxyz changed the base branch from main to dont-read-config-files-for-some-commands December 1, 2023 19:42
@justin808 justin808 changed the base branch from dont-read-config-files-for-some-commands to main December 1, 2023 20:51
lib/core/config.rb Outdated Show resolved Hide resolved
@rafaelgomesxyz rafaelgomesxyz force-pushed the org-app-env-var-override branch from bdd5d05 to c313696 Compare December 12, 2023 14:40
@rafaelgomesxyz rafaelgomesxyz merged commit d5b1ae2 into main Dec 12, 2023
9 checks passed
@rafaelgomesxyz rafaelgomesxyz deleted the org-app-env-var-override branch December 12, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes to how we use CPLN_ORG and CPLN_APP env vars
3 participants