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

chore: update generation config #10955

Merged
merged 8 commits into from
Jun 11, 2024
Merged

Conversation

JoeWang1127
Copy link
Contributor

@JoeWang1127 JoeWang1127 commented Jun 11, 2024

In this PR:

  • Update generator version to latest in generation_config.yaml.
  • Update libraries-bom version to latest in generation_config.yaml.
  • Move workflow related shell scripts to .github/scripts.
  • Always update pr title/body.

Example run: https://github.com/JoeWang1127/google-cloud-java/actions/runs/9472827989/job/26098842644

@JoeWang1127 JoeWang1127 marked this pull request as ready for review June 11, 2024 19:03
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner June 11, 2024 19:03
.github/scripts/update_generation_config.sh Outdated Show resolved Hide resolved
local group_id=$1
local artifact_id=$2
local major_version=$3
latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | grep ^"${major_version}". | sort -V | tail -n 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need a major_version to get the latest released version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't want to introduce major version bump to the generator in a branch.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that's something should be guarded in google-cloud-java. Major version bump of the generator should be rare and it should be guarded in the sdk-platform-java. Assuming there is indeed a major version bump, the automation would not work and we have to manually update the generator version.

Copy link
Contributor

@blakeli0 blakeli0 Jun 11, 2024

Choose a reason for hiding this comment

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

Same thing for libraries bom version, it is only used for generating README, and I don't think there is a need of guarding libraries bom version update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is used in supporting multi-version of gapic generator.

For example, we have two version of gapic generator, v2 and v3. In google-cloud-java, one branch (branch-a) is using v2 and another one is using v3. I think we don't want to update the generator to v3 in branch-a in this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see your point now. I think it is a good consideration and could work well for multi-JDK version scenario, but we probably don't want to guard it this way at this moment because there are other scenarios of multi-version support as well

  1. We could have multiple branches using the same major version but different minor version of gapic generator.
  2. We could have multiple branches using the exact same version of gapic generator but different protoc version.
  3. We may not want any automated version updates in a branch(LTS).

I think for now we can always update to the latest, and adjust our scripts as needed in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll remove the major version limitation here. We can adjust the script when new use case arises.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@JoeWang1127 JoeWang1127 merged commit 89b548f into main Jun 11, 2024
31 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/update-repo-lev-params branch June 11, 2024 21:42
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.

3 participants