-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: Remove flag for allow repo config #3911
feat: Remove flag for allow repo config #3911
Conversation
08193eb
to
0d4e308
Compare
@lukemassa, could you fix this conflict? |
@jamengual fixed! |
@lukemassa test are failing with It looks like it happened after merging the main in (couldn't rebase). I'm checking the main branch commits |
Last commit looks fine: https://github.com/runatlantis/atlantis/actions/runs/7175678014/job/19539369727 |
Looking now |
Head branch was pushed to by a user without write access
* Remove option to allow repo * Fix internal test * Fix fmt * Fmt * Fix rebase --------- Co-authored-by: PePe Amengual <[email protected]> Co-authored-by: Dylan Page <[email protected]>
* Remove option to allow repo * Fix internal test * Fix fmt * Fmt * Fix rebase --------- Co-authored-by: PePe Amengual <[email protected]> Co-authored-by: Dylan Page <[email protected]>
what
Remove flag
--allow-repo-config
why
This has been deprecated since 1fcdaba.
That commit changed the semantics of
--allow-repo-config
, which is important to clarify for the flag's removal. Before the deprecation,--allow-repo-config
was the only way to allow or disallow reading the atlantis.yaml in repos. Afterwards, however, the repo level atlantis.yaml is always read, and the new role of--allow-repo-config
is to determine whether we should accept all values from the repo level yaml, or only particular ones, as specified in the new repo config.This is why the default of
--allow-repo-config
is false. Removing this as an option means it will be impossible to specify that all values from the repo level yaml should be trusted, rather the repo config is necessary to allow overrides to important settings likeapply_requirements
.I opted to keep AllowRepoConfig in
GlobalCfgArgs
, renaming it toAllowAllRepoSettings
, since it is convenient for testing. It however is not set inserver.go
so isfalse
in any production run.I also removed two deprecated functions from global_cfg.go, which between them were only called once, a call site that was easy to translate to the supported
NewGlobalCfgFromArgs
.tests
Running unit tests to confirm existing behavior. Actual flag was removed:
references