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

update airbyte-ci bump-version to push more minimal changes #34339

Conversation

stephane-airbyte
Copy link
Contributor

@stephane-airbyte stephane-airbyte commented Jan 17, 2024

I noticed that airbyte-ci connectors bump-version changes more things than necessary. In particular, it reserialize json, which means we were losing comments and reordering the various keys. I moved to doing a search-and-replace. In addition, I also noticed that the changelog changes could be slightly improved: I'm not increasing the space for the version (so we can accomodate 0.21.53, or 0.125.2), and adding a new line at the end of the file (which was flagged as a difference by diff

Copy link

vercel bot commented Jan 17, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 3:22pm

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @stephane-airbyte and the rest of your teammates on Graphite Graphite

@stephane-airbyte stephane-airbyte force-pushed the stephane/01-17-update_airbyte-ci_bump-version_to_push_more_minimal_changes branch from a812a10 to eb63012 Compare January 18, 2024 16:06
@stephane-airbyte stephane-airbyte marked this pull request as ready for review January 18, 2024 16:09
@stephane-airbyte stephane-airbyte requested a review from a team January 18, 2024 16:09
@stephane-airbyte stephane-airbyte force-pushed the stephane/01-17-update_airbyte-ci_bump-version_to_push_more_minimal_changes branch 2 times, most recently from a7d3cdc to 45165a8 Compare January 18, 2024 16:11
updated_metadata = self.get_metadata_with_bumped_version(current_version, self.new_version, current_metadata)
repo_dir_with_updated_metadata = metadata_change_helpers.get_repo_dir_with_updated_metadata(
self.repo_dir, metadata_path, updated_metadata
updated_metadata_str = self.get_metadata_with_bumped_version(current_version, self.new_version, current_metadata_str)
Copy link
Contributor

Choose a reason for hiding this comment

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

I totally get the reason why you mutate the metadata as string and not yaml: preserving order and comment.
I would suggest adding a yaml.safe_load(current_metadata_step) step without assignation to make sure the yaml is still valid.
Or even better: run a MetadataValidation step..

FYI I think this python yaml package can preserve comment and order, but I never tried it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the call to get_current_metadata should already do that. We can't get the version number without having parsed the json succesfully.
Unless you meant that I need to run validation against the update_metadata_str ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Unless you meant that I need to run validation against the update_metadata_str ?

Yes this is what I meant

@stephane-airbyte stephane-airbyte force-pushed the stephane/01-17-update_airbyte-ci_bump-version_to_push_more_minimal_changes branch 2 times, most recently from c570cff to 837a63b Compare January 23, 2024 00:37
@stephane-airbyte stephane-airbyte force-pushed the stephane/01-17-update_airbyte-ci_bump-version_to_push_more_minimal_changes branch from 837a63b to 131861c Compare January 23, 2024 00:54
Copy link
Contributor

@alafanechere alafanechere left a comment

Choose a reason for hiding this comment

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

Approving to not block this. My remaining comments are not blocking.

@stephane-airbyte stephane-airbyte enabled auto-merge (squash) January 23, 2024 15:21
@stephane-airbyte stephane-airbyte merged commit b38b0e6 into master Jan 23, 2024
24 checks passed
@stephane-airbyte stephane-airbyte deleted the stephane/01-17-update_airbyte-ci_bump-version_to_push_more_minimal_changes branch January 23, 2024 15:35
Copy link
Contributor Author

Merge activity

jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
…q#34339)

I noticed that `airbyte-ci connectors bump-version ` changes more things than necessary. In particular, it reserialize json, which means we were losing comments and reordering the various keys. I moved to doing a search-and-replace. In addition, I also noticed that the changelog changes could be slightly improved: I'm not increasing the space for the version (so we can accomodate 0.21.53, or 0.125.2),  and adding a new line at the end of the file (which was flagged as a difference by `diff`
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
…q#34339)

I noticed that `airbyte-ci connectors bump-version ` changes more things than necessary. In particular, it reserialize json, which means we were losing comments and reordering the various keys. I moved to doing a search-and-replace. In addition, I also noticed that the changelog changes could be slightly improved: I'm not increasing the space for the version (so we can accomodate 0.21.53, or 0.125.2),  and adding a new line at the end of the file (which was flagged as a difference by `diff`
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
…q#34339)

I noticed that `airbyte-ci connectors bump-version ` changes more things than necessary. In particular, it reserialize json, which means we were losing comments and reordering the various keys. I moved to doing a search-and-replace. In addition, I also noticed that the changelog changes could be slightly improved: I'm not increasing the space for the version (so we can accomodate 0.21.53, or 0.125.2),  and adding a new line at the end of the file (which was flagged as a difference by `diff`
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.

None yet

2 participants