-
Notifications
You must be signed in to change notification settings - Fork 37.7k
test: set a name for CI Docker containers #18081
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, and LGTM.
What are the actual benefits of exporting |
db4df60
to
d87e029
Compare
Concept ACK.
It is used as argument for Docker ( |
I know it ;) |
From my perspective it would be a convenience feature right now: whenever as developer you make non-trivial changes in the CI scripts you very likely need to reproduce the travis build locally (as described in e.g. https://github.com/erdc/proteus/wiki/Replicating-the-TravisCI-Environment-on-your-Local-Machine) to dig deeper and inspect the container in some way (show logs, kill it, restart it, execute a command inside it etc. etc....) . For that it is way more comfortable to have deterministic names instead of the need to always find out the container hash or random name via |
In case a developer keeps travis docker containers locally, it is up to her to patch scripts locally. IMHO, no need for these changes to the repository (if the only use case is local running). |
Just a hint that how to run locally is described here: https://github.com/bitcoin/bitcoin/tree/master/ci#running-a-stage-locally Travis only provides the compute to use, we don't rely on any of its software |
While I agree that the changes are not strictly needed right now, I'd always prefer a reproducible behaviour to random behaviour in CI/testing, even if it concerns only something trivial as just container names.
I'm aware of that, but just because all CI stages pass on a local (highly individual) development environment doesn't necessarily mean it also does on the Travis environment. While working on #17900 locally everything was passing fine, but on Travis it failed. I didn't see any alternative as to recreate the Travis environment in a Docker container locally to reproduce exactly what's going an and what is different to my local development machine (that's why I wrote "non-trivial" changes in my reasoning).
Quick counter-example: from where would the testing scripts get the variable |
I do test all linux builds locally on an arm machine continuously. TRAVIS_OS_NAME is only used to distinguish osx from linux, and should work fine unless you want to run the osx build locally. |
I don't really understand the push back here. This is straightforward, and makes it easier to identify containers when you're running tests locally. I can't see why that's something you should have to " |
Please don't close.
It was not clear for me from the OP. Now I'm convinced that these changes are useful. Concept ACK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the PR description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, though I'd prefer to use the ci_
prefix for the name to avoid name collisions with identically named local containers.
Error: error creating container storage: the container name "centos_7" is already in use by "b61e5703bd1b6d0021dfc8d7b0b21cf2843721a4081bbdd7027c7c511e63a9b4". You have to remove that container to be able to reuse that name.: that name is already in use
d87e029
to
9e111db
Compare
Done, and addressed other comments. |
ACK 9e111db |
9e111db test: set a name for CI Docker containers (fanquake) Pull request description: Addresses one part of #16664, by making it easier to identify CI containers that are running locally. By default Docker will generate random names, like `peaceful_rubin`, with this change, we explicitly set names for all containers. ACKs for top commit: MarcoFalke: ACK 9e111db Tree-SHA512: 0a29ada0d8cf6b0e9ae7a35f4f6df7a3dcc448523ceaed01371124360d6e3d1bf351172104a5fb629488eeaa57994ba04134dcb83c261eb1dfd2f0d73edf5f60
Addresses one part of #16664, by making it easier to identify CI containers that are running locally. By default Docker will generate random names, like
peaceful_rubin
, with this change, we explicitly set names for all containers.