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

spurious build failures #26

Open
ryepup opened this issue Sep 7, 2023 · 2 comments
Open

spurious build failures #26

ryepup opened this issue Sep 7, 2023 · 2 comments

Comments

@ryepup
Copy link
Collaborator

ryepup commented Sep 7, 2023

Describe the bug

When dependabot updates a devDependency, our workflows are trying to release a new version of the reference-lib package. This fails:

$ npm publish
npm notice 
npm notice 📦  @nginxinc/[email protected]
npm notice === Tarball Contents === 
npm notice 668B  README.md      
npm notice 8[9](https://github.com/nginxinc/nginx-directive-reference/actions/runs/6110721544/job/16584389628#step:8:10)9B  dist/index.d.ts
npm notice 1.4MB dist/index.js  
npm notice 635B  package.json   
npm notice === Tarball Details === 
npm notice name:          @nginxinc/reference-lib                 
npm notice version:       1.0.3                                   
npm notice filename:      @nginxinc/reference-lib-1.0.3.tgz       
npm notice package size:  206.8 kB                                
npm notice unpacked size: 1.4 MB                                  
npm notice shasum:        ff2e1e5b40ce3f1c139e3348c4f70a326f1f15f3
npm notice integrity:     sha5[12](https://github.com/nginxinc/nginx-directive-reference/actions/runs/6110721544/job/16584389628#step:8:13)-[14](https://github.com/nginxinc/nginx-directive-reference/actions/runs/6110721544/job/16584389628#step:8:15)Nn6bKn0FTyp[...]1iMWjahQ5gBlw==
npm notice total files:   4                                       
npm notice 
npm notice Publishing to https://npm.pkg.github.com/
npm ERR! code EPUBLISHCONFLICT
npm ERR! publish fail Cannot publish over existing version.
npm ERR! publish fail Update the 'version' field in package.json and try again.
npm ERR! publish fail 
npm ERR! publish fail To automatically increment version numbers, see:
npm ERR! publish fail     npm help version

Example job: https://github.com/nginxinc/nginx-directive-reference/actions/runs/6110721544/job/16584389628

To reproduce

Steps to reproduce the behavior:

  1. merge a change to reference-lib without bumping the version number in package.json
  2. See error

Expected behavior

The CI does not attempt to publish if nothing relevant has changed (i.e. devDependency change)

Your environment

github CI workers

Additional context

It's possible that a devDependency change might be something we want to release as a new reference-lib npm package, if something in rollup changed, but that seems unlikely with how simple this library is.

zsteinkamp added a commit that referenced this issue Apr 18, 2024
… from triggering an `npm publish`; also move to node-20 for future support
zsteinkamp added a commit that referenced this issue Apr 18, 2024
…ot[bot]` from triggering an `npm publish` and tag; also move to node-20 for future support"

This reverts commit b6e2d52.
@zsteinkamp
Copy link
Contributor

Perhaps we just accept the failures? We can bump the version in package.json and push to the branch if we want to publish anew. Not sure there's a cooler way around it that doesn't require much thinking and time.

@ryepup
Copy link
Collaborator Author

ryepup commented Jun 18, 2024

One possibility: check to see if we have a git tag that matches the package.json version. If we already have a tag, then we must have already npm published and we can skip it.

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

No branches or pull requests

2 participants