Skip to content

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

Open
wants to merge 4 commits into
base: antalya
Choose a base branch
from

Conversation

strtgbb
Copy link
Collaborator

@strtgbb strtgbb commented May 27, 2025

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Allow the omission of --docker-image-version and --docker-compose-images-tags in most circumstances.

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Copy link

@ianton-ru ianton-ru left a 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

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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?

Copy link
Collaborator Author

@strtgbb strtgbb Jun 11, 2025

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).

Copy link
Collaborator

@ilejn ilejn Jun 12, 2025

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?

Copy link
Member

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

Copy link
Collaborator Author

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.

@strtgbb strtgbb requested a review from ianton-ru May 30, 2025 15:24
@strtgbb strtgbb requested a review from ilejn June 11, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants