Ready for review: In order: 1. <https://github.com...
# atmos-dev
s
Ready for review: In order: 1. https://github.com/cloudposse/atmos/pull/1146 2. https://github.com/cloudposse/atmos/pull/1147 cc: @Andriy Knysh (Cloud Posse)
a
i'll review these Regarding
go-getter
utils, I have a PR that touches it as well - we'll merge mine first (it's needed for a customer), then i'll ask you to resolve conflicts in your PR
s
😅 okay...
Hey @Andriy Knysh (Cloud Posse) is there somehow i can help you accellerate your go-getter task?
a
we’ll merge it today, i’ll ask you to rebase your PRs
please resolve the conflicts https://github.com/cloudposse/atmos/pull/1146 please address the comments https://github.com/cloudposse/atmos/pull/1147 (and open the PR against the
main
branch)
s
Thanks for the update
I have a curious question Why we only have atmos/pkg/utils/go_getter_utils.go at main · cloudposse/atmos
InjectGithubToken
boolean Why do we not have boolean for
gitlab
and
bitbucket
a
i don't remember who implemented the tokens. Please review the closed PRs and ask the person who implemented it
s
a
@Shubham Tholiya hi, if I recall correctly for github token we had initial design to have this switch and a respective field in atmos.yaml. For gitlab and bitbucket we just check and if any of respective tokens are set we try to inject them starting with ATMOS_xxxx ones and then checking the variables like BITBUCKET_USER_NAME. You may want to check with Erik on how he wants it/what is the right way.
s
@Erik Osterman (Cloud Posse) according to me for efficiency we can keep priorties like ATMOS_GITHUB_TOKEN> GITHUB_TOKEN> atmosConfig Let me know what do you think. Because adding one more variable to override seems not necessary especially when we don't do the same for ATMOS_BITBUCKET_TOKEN, BITBUCKET_TOKEN and ATMOS_GITLAB_TOKEN, GITLAB_TOKEN What do you think do we really need
InjectGithubToken
e
I think we should have a feature flag for each token.
✅ ATMOS_GITHUB_TOKEN> GITHUB_TOKEN> atmosConfig
s
> I think we should have a feature flag for each token. So you mean we need
InjectBitbucketToken
and
InjectGitlabToken
boolean as well?
e
Yes exactly.
s
@Erik Osterman (Cloud Posse) I am curious about this. What is the core reason behind this decision. Because according to me this will require users to add one more env variable just for this but i would like to know your perspective
e
No, they are all default to true
We don’t require the env today and automatically inject the GitHub token. Injecting the token modifyies the URL. In general the idea is have sane defaults for everything but let the user change the defaults.
s
I think this is an overkill User can still use the env variable he/she wants directly by using
github_token: !env SOME_RANDOM_ENV
and it should do the trick. Having a Inject flag is making it more complex from a user perspective.
e
Which part is overkill
s
Making user use
InjectGithubToken
,
injectBitbucketToken
,
injectGitlabToken
to be set to
false
if they want to avoid using
env
variable
ATMOS_GITHUB_TOKEN
,
ATMOS_BITBUCKET_TOKEN
and
ATMOS_GITLAB_TOKEN
and use the one without native
ATMOS_
prefix User can easily unset
ATMOS_
env if they want to use the native ones... why would they opt for these
INJECT_GITHUB_TOKEN
anyway?
e
Why would they opt for it? Without it, you get rate limited and cannot access private repos. With the wrong token, you get denied and requests fail. With no token it works for anonymous access where available. The ATMOS_ prefix is an incredibly common convention on CLI tools, whereby if the user doesn’t what to use the default token they can specify their own. Using !env can work, but that token can leak in describe commands, while the other env vars will not leak. GitHub for example always set the env, but the user might want to set another one. Again none of this is unique to atmos, standard CLI conventions.
The flags to disable env are more unique,
Another example is where running in GitHub actions, the GitHub token is automatically set, but the scope is restricted to the current repo. Setting the GITHUB_TOKEN is forbidden, so prefixing it is convenient when a cross repo token is required
s
While i understand the usage of ATMOS_<git>_TOKEN I am still not convinced about Inject variables.. But i guess let us do it, if customer complains then probably we can see Because i was thinking we don't need Inject, we can directly priotize ATMOS_ over Native env if ATMOS_<git>_TOKEN is present... just like we do currently for BITBUCKET and GITLAB but... Will add INJECT_BITBUCKET_TOKEN and INJECT_GITLAB_TOKEN
a
i'm reviewing the PRs
some of the PRs are merged, a few require the conflict resolution and addressing comments
s
interesting how code rabbit had new comments after the base changed ... but happy at least go getter was merged 🙂
a
yep,
go-getter
is merged, will be released in the next release
s
Let us review 1147 🙂
💬 1
a
@Shubham Tholiya please see comments
s
@Andriy Knysh (Cloud Posse) need a bit a help with your comments. But i did update the help. Hope this is better 🙂 For the website update i was thinking to do that as follow up because the pr is already huge. But ofcourse i can still add it to the same pr like we used to do before 🙂
@Andriy Knysh (Cloud Posse) bringing this up 🙂
a
@Erik Osterman (Cloud Posse) we need to discuss the PR and the
atmos validate schema
command
s
@Erik Osterman (Cloud Posse) pinging you again because @Andriy Knysh (Cloud Posse) wants to discuss 🙂
e
Let me check with @Andriy Knysh (Cloud Posse)
s
@Andriy Knysh (Cloud Posse) need to meet you only for the schema comment. 😅