abra recipe upgrade calculates tag based on ghost tags in a repo #195

Closed
opened 2021-10-11 14:50:43 +00:00 by knoflook · 1 comment
Owner

Describe the current behavior

when running abra recipe upgrade --major/minor/patch a weird thing happens. Namely, abra uses the last tag ever created to calculate a new version even if this tag was deleted before running the command

Steps to reproduce

suppose you have the following tags in your repo:

1.4.0+whatever
1.5.0+whatever

remove the last tag from an app
git tag -d 1.5.0+whatever
then run
abra recipe release --minor <app name>
abra will tag the new release as 1.6.0+whatever

Describe the expected behavior

abra should use the latest available tag and tag the new release as 1.5.0+whatever

Additional information

  • version: dev-59bff9c (any recent version does this afaik)

I tried checking some things in the plumbing.Tag object we're getting from the repo: https://pkg.go.dev/github.com/go-git/go-git/v5@v5.4.2/plumbing/object#Tag
unfortunately, neither checking for empty Target nor empty Hash does the trick
I also tried running git gc --aggressive before letting abra do its thing and it didn't help either. I'm a bit stuck with that and need help from some git magician 🧙

## Describe the current behavior when running `abra recipe upgrade --major/minor/patch` a weird thing happens. Namely, abra uses the last tag ever created to calculate a new version **even if this tag was deleted before running the command** ## Steps to reproduce suppose you have the following tags in your repo: ``` 1.4.0+whatever 1.5.0+whatever ``` remove the last tag from an app `git tag -d 1.5.0+whatever` then run `abra recipe release --minor <app name>` abra will tag the new release as `1.6.0+whatever` ## Describe the expected behavior abra should use the latest available tag and tag the new release as `1.5.0+whatever` ## Additional information - version: dev-59bff9c (any recent version does this afaik) I tried checking some things in the `plumbing.Tag` object we're getting from the repo: https://pkg.go.dev/github.com/go-git/go-git/v5@v5.4.2/plumbing/object#Tag unfortunately, neither checking for empty `Target` nor empty `Hash` does the trick I also tried running `git gc --aggressive` before letting abra do its thing and it didn't help either. I'm a bit stuck with that and need help from some git magician 🧙
knoflook added this to the Versioning and deploy stability milestone 2021-10-11 14:50:43 +00:00
knoflook added the
bug
abra
labels 2021-10-11 14:50:43 +00:00
Owner
No idea what I'm doing. https://github.com/src-d/go-git/issues/983
Sign in to join this conversation.
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#195
No description provided.