Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Version occasionally reverting to initial versions #1567

Closed
chingor13 opened this issue Aug 10, 2022 · 2 comments · Fixed by #1571
Closed

Version occasionally reverting to initial versions #1567

chingor13 opened this issue Aug 10, 2022 · 2 comments · Fixed by #1571
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@chingor13
Copy link
Contributor

It appears that when we are using Manifest.fromConfig(), our search for the latest release version can return invalid results.

  1. We grab the latest X commits on the target branch
  2. We look for a merged release pull request
  3. We fallback to latest GitHub releases that have a SHA matching a recent commit
  4. We fallback to latest GitHub tags that have a SHA matching a recent commit

If step 1 fails (GraphQL), then we have an empty commit set, so step 2, 3, and 4 all fail. Thus release-please assumes we've never created releases before and propose a new release with the initial default version.

Example: googleapis/java-storage#1564 (look at the initial proposed PR).

@chingor13 chingor13 added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 10, 2022
@chingor13
Copy link
Contributor Author

If step 1 fails, we probably want to error out in this case.

@suztomo
Copy link
Member

suztomo commented Aug 11, 2022

This happened to googleapis/java-notification#643

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
2 participants