NASA-PDS / roundup-action

Do a "roundup", a/k/a PDS-style continuous integration and delivery
Apache License 2.0
1 stars 4 forks source link

Missing snapshot tag cleanup prior to new unstable release #11

Closed jordanpadams closed 3 years ago

jordanpadams commented 3 years ago

Describe the bug The SNAPSHOT releases are being recreated for each unstable CI/CD run, but the tags are not being cleaned up. This causes the tags and release assets to get out of sync.

To Reproduce See latest validate snapshot.

It says @pdsen-ci pdsen-ci released this 6 minutes ago but then follows with 7 commits to master since this release indicating a new tag was not created with the new release

Proposed Fixes

Java:

    - name: Clean previous dev/snapshot tags
      run: |
        git fetch --prune --unshallow --tags
        git tag -l | grep 'SNAPSHOT' | xargs -t -I arg sh -c 'git tag -d arg;git push --delete origin arg;'

Python (haven't tested this with Python, but assuming it has the same issue?):

    - name: Clean previous dev/snapshot tags
      run: |
        git fetch --prune --unshallow --tags
        git tag -l | grep 'dev' | xargs -t -I arg sh -c 'git tag -d arg;git push --delete origin arg;'
nutjob4life commented 3 years ago

Unfortunately, when I tried git fetch --prune --unshallow --tags I get an error:

fatal: --unshallow on a complete repository does not make sense

I'm not sure what this means.

See:

nutjob4life commented 3 years ago

Further research: in my test environment, I do plain git clone during testing while the checkout action only clones the ref that triggered the workflow.

Pressing on!

nutjob4life commented 3 years ago

Ah I think I found the problem.

In Python I'm filtering for *dev* but in Maven I copied the same logic over when I should be looking for *SNAPSHOT*

(Also FYI, no need to pipe git tag -l into grep since it has filtering capability built-in.)

jordanpadams commented 3 years ago

@nutjob4life this unfortunately doesn't look to be fixed. see latest build of validate.

Screen Shot 2020-11-18 at 2 44 49 PM
jordanpadams commented 3 years ago

@nutjob4life unfortunately, it still doesn't look like this has been fixed?

https://github.com/NASA-PDS/validate/releases/tag/1.25.0-SNAPSHOT

tloubrieu-jpl commented 3 years ago

@nutjob4life needs to update the docker image with git-lfs

nutjob4life commented 3 years ago

Here's where I think the issue is: Screen Shot 2020-12-08 at 2 27 38 PM

nutjob4life commented 3 years ago

Okay, updated the base image with git-lfs and re-ran the action on validate. Here's a screenshot of the step now:

Screen Shot 2020-12-08 at 4 21 38 PM

Does that look like it fixed it @jordanpadams?

jordanpadams commented 3 years ago

🎉 looks good @nutjob4life. let me see what else I can break...