-
Notifications
You must be signed in to change notification settings - Fork 4.5k
connectors-ci/cat: validate image under test is the right one #27919
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
connectors-ci/cat: validate image under test is the right one #27919
Conversation
if not await connector_container.label("io.airbyte.version") == context.metadata["dockerImageTag"]: | ||
raise Exception( | ||
"Abusive caching might be happening. The connector container should have been built with the correct version as defined in metadata.yaml" | ||
) |
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.
👍
assert ( | ||
docker_runner.labels.get("io.airbyte.name") == connector_metadata["data"]["dockerRepository"] | ||
), "io.airbyte.name must be equal to dockerRepository in metadata.yaml" |
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.
One day, it would be nice to not need to modify the docker labels at all. I'm curious if we even still need them. I don't think the platform uses them at all...
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.
Agreed! It's just a good enough way for me right now to try to detect and understand the CI problem we might have with caching.
The metadata.yaml is not packaged into the connector image on the Python connectors, if we revamped as planned the build logic for python connector I think we shall package metadata.yaml in the connector image.
Wdyt about a new connector command like metadata
that would output the connector metadata?
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 like it. Then I can airbybye-ci connectors metadata --name source-foo | jq
:D
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.
@evantahler I meant a connector command:
docker run airbyte/pokeapi metadata | jq
/legacy-test connector=connectors/source-openweather connector-acceptance-test-version=dev
Build PassedTest summary info:
|
/legacy-publish connector=bases/connector-acceptance-test
if you have connectors that successfully published but failed definition generation, follow step 4 here |
/legacy-test connector=connectors/source-openweather
Build PassedTest summary info:
|
What
Addresses #27867
This PR aims at validating that the current image under test in CAT is the correct one to alert us explicitly when abusive caching might be happening on our test pipelines
How
:dev
and patch acceptance-test-config to use this git revision tag.