Skip to content
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: publish strict-encrypt first #26644

Merged

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented May 26, 2023

What

Closes #26635
The metadata upload step on publish checks if the the connectors referenced in the metadata file are already published to DockerHub. Non strict-encrypt variant reference the strict-encrypt variant in their metadata file for cloud.
So if we publish the non strict-encrypt variant first, the metadata upload will fail if the strict-encrypt variant is not published yet.
As strict-encrypt variant are often modified in the same PR as the non strict-encrypt variant, we want to publish them first.

How

Hacky approach: as connector names with -strict-encrypt/secure prefix are longer, they will be sorted first with a reverse sort below.

@alafanechere
Copy link
Contributor Author

alafanechere commented May 26, 2023

Confirmed the sorts works with this pre-release workflow.

@alafanechere alafanechere requested a review from bnchrch May 26, 2023 08:13
@alafanechere alafanechere enabled auto-merge (squash) May 26, 2023 14:33
Copy link
Contributor

@bnchrch bnchrch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment

they will be sorted first with our reverse sort below.
"""

return sorted(contexts, key=lambda context: context.connector.technical_name, reverse=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I like this!

But, I think concurrency might still bite us

i.e. if we have concurrency set to 5 we might build source-file and source-file-secure at the same time

Perhaps we want the sort to pull the strict-encrypt variants to the start and their counter parts to the end of the list?

Or at the conncurreny level we explicitly try and build all strict encrypts in one block before anything else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On publish concurrency is forced to 1 for safety/stability.

@alafanechere alafanechere requested a review from bnchrch May 29, 2023 17:53
@alafanechere alafanechere merged commit c094df4 into master May 31, 2023
18 checks passed
@alafanechere alafanechere deleted the augustin/connectors-ci/publish-strict-encrypt-first branch May 31, 2023 08:06
marcosmarxm pushed a commit to natalia-miinto/airbyte that referenced this pull request Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build strict-encrypt/secure version first
2 participants