-
Notifications
You must be signed in to change notification settings - Fork 6
Antalya Smart tag selection for integration/runner #809
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
base: antalya
Are you sure you want to change the base?
Conversation
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.
Explanation required :)
docker_digester = DockerDigester() | ||
imagename_digest_dict = ( | ||
docker_digester.get_all_digests() | ||
) # 'image name - digest' mapping |
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.
What is in this map? As I understand, it's like altinityinfra/integration-test
=> sha256:74ac23582ebab40378fa66806e796f2143b4b5a6956a2daf9cd98ff33d0d6117
. Which digest it contains when multiple versions of image available?
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.
This contains the digests matching the states of the docker containers in your current branch.
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.
Sorry, I don't get the idea.
@strtgbb , could you explain it more explicitly/verbosely ?
What is the sequence of actions?
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.
When CICD runs, it calculates hashes for the dockerfiles that it builds. It then publishes the images using the hashes to form the tags.
DockerDigester.get_all_digests()
calculates the tags that CICD would use. The unspecified arguments can then be populated using those tags.
It's a relatively safe assumption that CICD has already run on the base of your branch and that you have not changed the dockerfiles (and thus the calculated hashes).
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.
Makes sense.
I suggest adding the comment above to the script.
Do you know what DIND stands for?
Shouldn't we promote the change to upstream?
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.
Not only a Dockerfile
, but rather a whole directory used to build the docker image, and all of it's dependent docker images.
docker/images.json
describes all docker images that are used in CI/CD, excerpt:
{
"docker/test/integration/base": {
"only_amd64": true,
"name": "altinityinfra/integration-test",
"dependent": [
"docker/test/integration/clickhouse_with_unity_catalog"
]
},
...
"docker/test/integration/clickhouse_with_unity_catalog": {
"name": "altinityinfra/integration-test-with-unity-catalog",
"dependent": []
}
}
Corresponding directories:
$ ls docker/test/integration/base
Dockerfile requirements.txt
$ ls docker/test/integration/clickhouse_with_unity_catalog
Dockerfile
So in order to get a hash for altinityinfra/integration-test
docker image, DockerDigester.get_all_digests()
will have to hash following files:
docker/test/integration/base/Dockerfile
docker/test/integration/base/requirements.txt
docker/test/integration/clickhouse_with_unity_catalog/Dockerfile
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.
@ilejn
DIND stands for Docker in Docker. It means that the image will be configured for nested Docker. It's the image that you're specifying with --docker-image-version
.
I don't think upstream will care for this. It's a little bit hacky, and they don't support old releases like we do.
Changelog category (leave one):
Allow the omission of
--docker-image-version
and--docker-compose-images-tags
in most circumstances.Exclude tests: