-
Notifications
You must be signed in to change notification settings - Fork 343
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
Move REPO_TOKEN
to CML_
environment variable namespace
#763
Comments
Closed #764 because violets are red. Do you have any brilliant solution to this issue? |
CML_TOKEN is misleading, sounds like if we had a token to be set instead of the SCM_TOKEN |
do you have a better suggestion? |
currently we do no have an issue with repo_token, but maybe scm_token? the user will know that we do not require anything on our side, just only in the SCM side. As I say CML_TOKEN sounds that we are the owners of that token. |
Don't feel the same.
|
GIT_PROVIDER_TOKEN of SCM_API_TOKEN? I feel CML_TOKEN is misleading but agree that SCM_TOKEN isn't clear about its use. Without being familiar with all the supported environments or introducing unneeded complexity, maybe something like |
|
|
So this is basically the portion we are referring to: Lines 36 to 47 in 766aac8
and the goal is to have an ENV name that the user could specify, that intuitively describes its use and isn't at risk of getting clobbered by some CI system? like with and this |
Footnotes
|
I'd suggest just replacing 🔔 @iterative/cml, please vote 👍🏼 👎🏼 on this comment. |
REPO_TOKEN
to CML_
environment variable namespace
currently still leaning towards |
And how does |
because that token is needed by all the actions we preform in the CI system? |
That's also the case with all the other tokens. 🤔 They're usually not named after the system that uses them, but after the system that requires them for authentication. E.g. if a token is used to authenticate with a cloud, it's a “cloud token” and not a “computer token” even if you use it from a computer. 😅 |
😄 it's more descriptive of what it is used for than If the issue is handling the chance for a collision just silently keep I'd argue for the moment there's no problem to fix so let's not make it one... |
Indeed, it has more words, although whether they help clarifying its purpose or not is arguable 😅
I fell on my own trap of #763 (comment); indeed, tokens should not be named after the system that uses them, but after the system that validates them. 🙈
That's really contorted. The token is being used from the continuous integration system, to authenticate against the forge API. 🙃
I don't mind if we use “forge” or not, but
Also arguably,
Too easy. Nobody will leave this thread alive. ⚔️
Documentation, probably. Nothing is broken in the sense that it doesn't work, but... |
A large portion of the token's usage is to register the CI Agent, and in terms of GitHub, the only case where a PAT is actually required. the
Being equally obtuse isn't a good enough reason to change it since its use is already established in documentation, blog posts, and [video] tutorials.
😢 but true 🤺
Our Documentation is already behind in some updates, so I don't see the value in adding more to it. |
Yes, roughly 1 command out of 7. 🤨😉
Tangential but true. Note that CML supports three different forges, and the token we're asking users to provide is being used for every operation, no matter which kind of token it is.
Almost agreed, in the sense that changing the documentation for such an insignificant detail is cumbersome. Still, that probably means that our documentation processes should be smoother; we'll always have to amend lots of bad API choices, and the earlier, the better. Sounds easier to fix 1 post and 4 videos now than 2 posts and 8 videos in six months. 1
Don't forget your hauberk! 😄
We can probably add it just as a reminder.2
That's why we're fixing it. 😉
Absolutely Wright. I was hoping for Brain... well, that language, but that's probably out of scope for this issue. Rust seems hard to justify, but Python would simplify quite a few integrations. Footnotes
|
In proving my point I would dispute your interpretation of these numbers; you can say I'm cherry-picking, but looking at non-error invocations, it is closer 1/4. As well I would further discount |
I would also like to state that |
Given we've agreed not to ever use the word "forge" in any context ever, I still think CI is fine because even GH doesn't really distinguish between "git provider" and "CI" (citation: https//api.github.com being used for both purposes, and the token perms including CI-specific functionality) |
Arguable as per comments linked from #1142 but, indeed, we can try not to use it.
I'm allergic to cache invalidation; worth visiting #1142 to find a generic name for GitHub/GitLab/Bitbucket if we really need one? 🤧 |
Following that rule of thumb, we can use |
I still haven't found alternatives (subjectively) better than
|
|
This would reduce this problem to “just” #1142 |
Opened #1272 as per #763 (comment) |
Use
CML_TOKEN
(or similar, e.g.CML_CI_TOKEN
etc.) instead ofREPO_TOKEN
toRUNNER_
environment variable prefix #738, cml-runner fails to deploy runners on ec2 #741, Convert yargs builder functions to options objects and add per–command environment variables #712The text was updated successfully, but these errors were encountered: