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

airbyte-ci: rework RC promotion #46675

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Oct 9, 2024

What

We want to use -rc suffix on release candidate.
It means we have to rework our promotion flow to cut release a main version when the RC is deemed stable by the system.

Promoting a RC to a main version then just means:

  • Update its version to a non rc one
  • Set isReleaseCandidate to false

How

Rework the airbyte-ci connectors publish --promote-release-candidate command to:

  • Bump the connector version to a main one
  • Set isReleaseCandidate to false
  • Commit and push all this to a PR with the auto-merge label.
  • Update the changelog

Bonus: significant refacto on Step that modify files to have more shared logic and cleaner code.

Review guide

User Impact

  • Check that /bump-version still works following the refacto
  • Check that up-to-date still works following the refacto

Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Oct 14, 2024 3:24pm

Copy link
Contributor Author

alafanechere commented Oct 9, 2024

@alafanechere alafanechere force-pushed the augustin/10-08-metadata-service_lib_validate_that_release_candidate_have_rc_suffix_in_their_version branch from 0296422 to 3d5bcfa Compare October 9, 2024 16:00
@alafanechere alafanechere force-pushed the augustin/10-08-airbyte-ci_rework_RC_promotion branch from 94050e0 to ee619da Compare October 9, 2024 16:01
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated change to make the linter happy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated change to make the linter happy

@alafanechere alafanechere force-pushed the augustin/10-08-airbyte-ci_rework_RC_promotion branch from ee619da to 3eb9e57 Compare October 9, 2024 16:11
@alafanechere alafanechere marked this pull request as ready for review October 9, 2024 16:17
@alafanechere alafanechere requested a review from a team as a code owner October 9, 2024 16:17
@alafanechere alafanechere force-pushed the augustin/10-08-metadata-service_lib_validate_that_release_candidate_have_rc_suffix_in_their_version branch from 3d5bcfa to 1d7193a Compare October 10, 2024 09:23
@alafanechere alafanechere force-pushed the augustin/10-08-airbyte-ci_rework_RC_promotion branch from 3eb9e57 to 0a6c454 Compare October 10, 2024 09:24
@alafanechere alafanechere force-pushed the augustin/10-08-metadata-service_lib_validate_that_release_candidate_have_rc_suffix_in_their_version branch from 1d7193a to f0c71ef Compare October 10, 2024 09:37
@alafanechere alafanechere force-pushed the augustin/10-08-airbyte-ci_rework_RC_promotion branch from 0a6c454 to bd41b41 Compare October 10, 2024 09:37
@alafanechere alafanechere force-pushed the augustin/10-08-metadata-service_lib_validate_that_release_candidate_have_rc_suffix_in_their_version branch from f0c71ef to 1a998df Compare October 10, 2024 10:11
Base automatically changed from augustin/10-08-metadata-service_lib_validate_that_release_candidate_have_rc_suffix_in_their_version to master October 10, 2024 12:45
@alafanechere alafanechere force-pushed the augustin/10-08-airbyte-ci_rework_RC_promotion branch from bd41b41 to 5db8b0d Compare October 10, 2024 13:34
@alafanechere alafanechere force-pushed the augustin/10-08-airbyte-ci_rework_RC_promotion branch from 5db8b0d to 81f1b5c Compare October 10, 2024 14:43
Copy link
Contributor

@clnoll clnoll left a comment

Choose a reason for hiding this comment

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

Approving so I don't block merge, but there are a few places where I'm afraid we'll swallow any errors that might happen, which will make it difficult to debug. If you could add some logging and possibly error handling too that would address my concern.

Comment on lines +681 to +682
if reset_release_candidate_results.success:
all_modified_files.update(await reset_release_candidate.export_modified_files(context.connector.code_directory))
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question as above.

Comment on lines +674 to +675
if set_promoted_version_results.success:
all_modified_files.update(await set_promoted_version.export_modified_files(context.connector.code_directory))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be exiting early on error here? What's the justification for moving onto the next step if this one wasn't successful?

I think we at least want some logging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we at least want some logging.
Errors will appear in the report as I added step results to the results list.
I choosed to not early exit because:

  • If the step result is skipped we want to continue to the next step (e.g. a partial bump worked previously)
  • If it's failing I think it's interesting to observe in the report if the next step is also failing or working.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay cool - maybe add a comment explaining why we're okay continuing on failure?

initial_pr_creation_result = await initial_pr_creation.run(*pr_creation_args, **pr_creation_kwargs)
results.append(initial_pr_creation_result)
# Update changelog and update PR
if initial_pr_creation_result.success:
Copy link
Contributor

Choose a reason for hiding this comment

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

Mind adding some logging here if it wasn't successful?

)
add_changelog_entry_result = await add_changelog_entry.run()
results.append(add_changelog_entry_result)
if add_changelog_entry_result.success:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above.

@alafanechere alafanechere force-pushed the augustin/10-08-airbyte-ci_rework_RC_promotion branch from 0189a00 to 2ddecef Compare October 14, 2024 15:06
@alafanechere alafanechere force-pushed the augustin/10-08-airbyte-ci_rework_RC_promotion branch from 2ddecef to 8e6a057 Compare October 14, 2024 15:23
@alafanechere alafanechere enabled auto-merge (squash) October 14, 2024 15:24
@alafanechere alafanechere merged commit 19f556f into master Oct 14, 2024
34 checks passed
@alafanechere alafanechere deleted the augustin/10-08-airbyte-ci_rework_RC_promotion branch October 14, 2024 16:27
Copy link

sentry-io bot commented Oct 17, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: Method dagger.client.gen.Host.directory() parameter include='metadata.yaml' was expected to be of... pipelines.models.contexts.pipeline_context in g... View Issue

Did you find this useful? React with a 👍 or 👎

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.

2 participants