Pushing Tags Error
drewbarontini opened this issue ยท 10 comments
Hey, there! ๐
Weโve been attempting to debug an issue with this package โ that has been working really well thus far โ and weโre a bit stuck. So Iโm reaching out here in hopes for some help and guidance. Any time or attention is greatly appreciated.
As part of our release, we trigger the following command:
github-semantic-version --bump --changelog --push
Here is the chain of logged events that work properly:
- Getting last change and determining the current version
- Incrementing the version in package.json with minor
- Appending latest change to CHANGELOG contents
- Writing the contents of the changelog
- Committing the changes and tagging a new version
And then the problem here:
Executing: git push origin master --tags
Results in the following error:
Error: Command failed: git push origin master --tags
at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at Function.exec (/opt/build/repo/node_modules/github-semantic-version/dist/Utils.js:62:48)
at Version._callee5$ (/opt/build/repo/node_modules/github-semantic-version/dist/Version.js:427:33)
at tryCatch (/opt/build/repo/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/opt/build/repo/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/opt/build/repo/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/opt/build/repo/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /opt/build/repo/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at new Promise (<anonymous>)
We have tried manually resetting the version, but the error crops up again. And we donโt currently have the ability to SSH into the server and review the logs for more information.
Any help is greatly appreciated! ๐
Is this with DEBUG= on? Can you paste me those logs?
@milesj DEBUG
should be on, yes. And the logs don't really have any other information outside of what I've pasted in (relevant information, at least). But here is the full log we're seeing:
Note: I added REMOVED_BY_ME
for any sensitive info. ๐
1:18:53 PM: Build ready to start
1:18:55 PM: Fetching cached dependencies
1:18:55 PM: Starting to download cache of 428.1MB
1:18:58 PM: Finished downloading cache in 3.238465148s
1:18:58 PM: Starting to extract cache
1:19:12 PM: Finished extracting cache in 13.959135259s
1:19:14 PM: Finished fetching cache in 18.686455666s
1:19:14 PM: Starting to prepare the repo for build
1:19:14 PM: Preparing Git Reference refs/heads/master
1:19:17 PM: Found netlify.toml. Overriding site configuration
1:19:17 PM: Different build command detected, going to use the one specified in the toml file: 'npm run release' versus 'npm run build' in the site
1:19:17 PM: Starting build script
1:19:17 PM: Installing dependencies
1:19:18 PM: Started restoring cached node version
1:19:20 PM: Finished restoring cached node version
1:19:20 PM: v8.11.1 is already installed.
1:19:21 PM: Now using node v8.11.1 (npm v5.6.0)
1:19:21 PM: Attempting ruby version 2.2.9, read from environment
1:19:22 PM: Using ruby version 2.2.9
1:19:22 PM: Using PHP version 5.6
1:19:22 PM: Started restoring cached node modules
1:19:22 PM: Finished restoring cached node modules
1:19:22 PM: Started restoring cached yarn cache
1:19:28 PM: Finished restoring cached yarn cache
1:19:29 PM: Installing NPM modules using Yarn version 1.3.2
1:19:29 PM: yarn install v1.3.2
1:19:29 PM: [1/4] Resolving packages...
1:19:30 PM: [2/4] Fetching packages...
1:19:51 PM: info fsevents@1.1.3: The platform "linux" is incompatible with this module.
1:19:51 PM: info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
1:19:51 PM: [3/4] Linking dependencies...
1:19:51 PM: warning " > @storybook/addon-actions@3.3.14" has unmet peer dependency "@storybook/addons@^3.3.0".
1:19:51 PM: warning " > @storybook/react@3.3.14" has unmet peer dependency "babel-core@^6.26.0 || ^7.0.0-0".
1:19:51 PM: warning "@storybook/react > babel-loader@7.1.2" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".
1:19:51 PM: warning "@storybook/react > babel-preset-react-app@3.1.1" has unmet peer dependency "babel-runtime@^6.23.0".
1:19:51 PM: warning "@storybook/react > @storybook/ui > react-icons > react-icon-base@2.1.0" has unmet peer dependency "prop-types@*".
1:19:51 PM: warning " > graphql-tools@1.2.3" has incorrect peer dependency "graphql@^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0".
1:19:51 PM: warning " > react-image-crop@3.0.10" has unmet peer dependency "prop-types@>=15.5.8".
1:19:51 PM: warning " > react-redux@5.0.7" has unmet peer dependency "redux@^2.0.0 || ^3.0.0 || ^4.0.0-0".
1:19:51 PM: warning " > eslint-config-prettier@2.9.0" has unmet peer dependency "eslint@>=3.14.1".
1:19:57 PM: [4/4] Building fresh packages...
1:19:59 PM: success Saved lockfile.
1:19:59 PM: Done in 29.30s.
1:19:59 PM: NPM modules installed using Yarn
1:19:59 PM: Started restoring cached go cache
1:19:59 PM: Finished restoring cached go cache
1:19:59 PM: unset GOOS;
1:19:59 PM: unset GOARCH;
1:19:59 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
1:19:59 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
1:19:59 PM: go version >&2;
1:19:59 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
1:19:59 PM: go version go1.10 linux/amd64
1:19:59 PM: Installing missing commands
1:19:59 PM: Verify run directory
1:19:59 PM: Executing user command: npm run release
1:19:59 PM: > bas-ui@0.220.0 prerelease /opt/build/repo
1:19:59 PM: > npm run build
1:20:00 PM: > bas-ui@0.220.0 build /opt/build/repo
1:20:00 PM: > react-scripts build
1:20:01 PM: Creating an optimized production build...
1:21:16 PM: Compiled successfully.
1:21:16 PM: File sizes after gzip:
1:21:17 PM: 758.45 KB build/static/js/main.a3aaa1f5.js
1:21:17 PM: 4.53 KB build/static/css/main.8cf94600.css
1:21:17 PM: The bundle size is significantly larger than recommended.
1:21:17 PM: Consider reducing it with code splitting: https://goo.gl/9VhYWB
1:21:17 PM: You can also analyze the project dependencies: https://goo.gl/LeUzfb
1:21:17 PM: The project was built assuming it is hosted at the server root.
1:21:17 PM: You can control this with the homepage field in your package.json.
1:21:17 PM: For example, add this to build it for GitHub Pages:
1:21:17 PM: "homepage" : "http://myname.github.io/myapp",
1:21:17 PM: The build folder is ready to be deployed.
1:21:17 PM: You may serve it with a static server:
1:21:17 PM: yarn global add serve
1:21:17 PM: serve -s build
1:21:17 PM: Find out more about deployment here:
1:21:17 PM: http://bit.ly/2vY88Kr
1:21:17 PM: > bas-ui@0.220.0 release /opt/build/repo
1:21:17 PM: > ./scripts/release.sh
1:21:17 PM: Executing git checkout master
1:21:17 PM: error: Your local changes to the following files would be overwritten by checkout:
1:21:17 PM: yarn.lock
1:21:17 PM: Please commit your changes or stash them before you switch branches.
1:21:17 PM: Aborting
1:21:17 PM: Executing git fetch origin master
1:21:18 PM: From https://github.com/REMOVED_BY_ME
1:21:18 PM: * branch master -> FETCH_HEAD
1:21:18 PM: * [new branch] master -> origin/master
1:21:18 PM: Executing git reset --hard origin/master
1:21:18 PM: HEAD is now at 38dc2806 Merge pull request #875 from REMOVED_BY_ME
1:21:18 PM: Executing /opt/build/repo/node_modules/.bin/github-semantic-version --bump --changelog --push
1:21:18 PM: Thu, 26 Apr 2018 17:21:18 GMT github-semantic-version:info Current branch: master
1:21:18 PM: Thu, 26 Apr 2018 17:21:18 GMT github-semantic-version:info Release branch: master
1:21:18 PM: Thu, 26 Apr 2018 17:21:18 GMT github-semantic-version:info Version updates will be pushed to the repo
1:21:18 PM: Thu, 26 Apr 2018 17:21:18 GMT github-semantic-version:info Executing: git fetch --tags && git tag -l v*
1:21:20 PM: From https://github.com/REMOVED_BY_ME
1:21:20 PM: * [new branch] 140-salesforce-user-authorization -> origin/140-salesforce-user-authorization
1:21:20 PM: * [new branch] 151-update-airflow-calculator-versions -> origin/151-update-airflow-calculator-versions
1:21:20 PM: * [new branch] 401-auto-semver -> origin/401-auto-semver
1:21:20 PM: * [new branch] 488-dependency-patch-upgrades -> origin/488-dependency-patch-upgrades
1:21:20 PM: * [new branch] 630-root-imports -> origin/630-root-imports
1:21:20 PM: * [new branch] 694-incorrect-fan-halos -> origin/694-incorrect-fan-halos
1:21:20 PM: * [new branch] 726-roof-section-tool -> origin/726-roof-section-tool
1:21:20 PM: * [new branch] 818-quote-flow-ui -> origin/818-quote-flow-ui
1:21:20 PM: * [new branch] 871-883-airflow-ui-cleanup -> origin/871-883-airflow-ui-cleanup
1:21:20 PM: * [new branch] Selected-Obstruction-Panel-Bug -> origin/Selected-Obstruction-Panel-Bug
1:21:20 PM: * [new branch] fan-model-update -> origin/fan-model-update
1:21:20 PM: * [new branch] mounting-structure-type -> origin/mounting-structure-type
1:21:20 PM: * [new branch] production -> origin/production
1:21:20 PM: * [new branch] staging -> origin/staging
1:21:20 PM: * [new tag] v0.210.3 -> v0.210.3
1:21:20 PM: * [new tag] v0.211.0 -> v0.211.0
1:21:20 PM: * [new tag] v0.212.0 -> v0.212.0
1:21:20 PM: * [new tag] v0.213.0 -> v0.213.0
1:21:20 PM: * [new tag] v0.214.0 -> v0.214.0
1:21:20 PM: * [new tag] v0.214.1 -> v0.214.1
1:21:20 PM: * [new tag] v0.215.0 -> v0.215.0
1:21:20 PM: * [new tag] v0.216.0 -> v0.216.0
1:21:20 PM: * [new tag] v0.216.1 -> v0.216.1
1:21:20 PM: * [new tag] v0.216.2 -> v0.216.2
1:21:20 PM: * [new tag] v0.217.0 -> v0.217.0
1:21:20 PM: * [new tag] v0.218.0 -> v0.218.0
1:21:20 PM: * [new tag] v0.219.0 -> v0.219.0
1:21:20 PM: * [new tag] v0.220.0 -> v0.220.0
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info Latest tag: v0.220.0
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info Executing: git log --merges -n1 --format='%an|%ae|%s' v0.220.0..HEAD
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info Executing: git log --format='%an|%ae|%s' v0.220.0..HEAD
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info Executing: git config --get remote.origin.url
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info User: REMOVED_BY_ME
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info Repo: REMOVED_BY_ME
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info Found minor label on PR #875.
1:21:20 PM: โ Getting last change and determining the current version
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info Bumping v0.220.0 with minor release...
1:21:20 PM: Thu, 26 Apr 2018 17:21:20 GMT github-semantic-version:info Executing: git fetch --tags && git tag -l v*
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Latest tag: v0.220.0
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git log -n1 --format='%an|%ae|%s' v0.220.0..HEAD
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Overriding default git user/email options
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git config user.name "REMOVED_BY_ME"
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git config user.email "REMOVED_BY_ME"
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Checking out the master branch
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git checkout master
1:21:21 PM: Previous HEAD position was 38dc2806 Merge pull request #875 from REMOVED_BY_ME
1:21:21 PM: Switched to branch 'master'
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: npm version minor --no-git-tag-version
1:21:21 PM: โ Incrementing the version in package.json with minor
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Adding package.json to commit list
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git add package.json
1:21:21 PM: โ Appending latest change to CHANGELOG contents
1:21:21 PM: โ Writing the contents of the changelog
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Adding CHANGELOG.md to the commit list
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git add CHANGELOG.md
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Committing the current changes and tagging new version
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git commit -m "Automated release: v0.221.0
1:21:21 PM: [ci skip]"
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git tag v0.221.0
1:21:21 PM: โ Committing the changes and tagging a new version
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git config --get remote.origin.url
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info User: REMOVED_BY_ME
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Repo: REMOVED_BY_ME
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Explicitly setting git origin to: https://REMOVED_BY_ME:${GH_TOKEN}@github.com/REMOVED_BY_ME.git
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git remote set-url origin https://REMOVED_BY_ME:${GH_TOKEN}@github.com/REMOVED_BY_ME.git
1:21:21 PM: Thu, 26 Apr 2018 17:21:21 GMT github-semantic-version:info Executing: git push origin master --tags
1:21:24 PM: Error: Command failed: git push origin master --tags
1:21:24 PM: at checkExecSyncError (child_process.js:601:13)
1:21:24 PM: at execSync (child_process.js:641:13)
1:21:24 PM: at Function.exec (/opt/build/repo/node_modules/github-semantic-version/dist/Utils.js:62:48)
1:21:24 PM: at Version._callee5$ (/opt/build/repo/node_modules/github-semantic-version/dist/Version.js:427:33)
1:21:24 PM: at tryCatch (/opt/build/repo/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
1:21:25 PM: at Generator.invoke [as _invoke] (/opt/build/repo/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
1:21:25 PM: at Generator.prototype.(anonymous function) [as next] (/opt/build/repo/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
1:21:25 PM: at step (/opt/build/repo/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
1:21:25 PM: at /opt/build/repo/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
1:21:25 PM: at new Promise (<anonymous>)
1:21:25 PM: npm ERR! code ELIFECYCLE
1:21:25 PM: npm ERR! errno 1
1:21:25 PM: npm ERR! REMOVED_BY_ME@0.220.0 release: `./scripts/release.sh`
1:21:25 PM: npm ERR! Exit status 1
1:21:25 PM: npm ERR!
1:21:25 PM: npm ERR! Failed at the REMOVED_BY_ME@0.220.0 release script.
1:21:25 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
1:21:25 PM: npm ERR! A complete log of this run can be found in:
1:21:25 PM: npm ERR! /opt/buildhome/.npm/_logs/2018-04-26T17_21_24_917Z-debug.log
1:21:25 PM: Caching artifacts
1:21:25 PM: Started saving node modules
1:21:25 PM: Finished saving node modules
1:21:25 PM: Started saving yarn cache
1:21:30 PM: Finished saving yarn cache
1:21:30 PM: Started saving pip cache
1:21:30 PM: Finished saving pip cache
1:21:30 PM: Started saving emacs cask dependencies
1:21:30 PM: Finished saving emacs cask dependencies
1:21:30 PM: Started saving maven dependencies
1:21:30 PM: Finished saving maven dependencies
1:21:30 PM: Started saving boot dependencies
1:21:30 PM: Finished saving boot dependencies
1:21:30 PM: Started saving go dependencies
1:21:30 PM: Finished saving go dependencies
1:21:30 PM: Error running command: Build script returned non-zero exit code: 1
1:21:30 PM: Failing build: Failed to build site
1:21:30 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:21:30 PM: Finished processing build request in 2m35.617519794s
Your GH key has repo access correct?
Yes. We've been using the package for awhile without any issues. It suddenly just started throwing this error and we can't seem to fix it.
Noticed the unstaged files. Does this happen to all releases?
1:21:17 PM: Executing git checkout master
1:21:17 PM: error: Your local changes to the following files would be overwritten by checkout:
1:21:17 PM: yarn.lock
1:21:17 PM: Please commit your changes or stash them before you switch branches.
1:21:17 PM: Aborting
1:21:17 PM: Executing git fetch origin master
No, that doesn't appear to happen on success, but I'm seeing that in the failed deploys when attempting to automate the release. If that's the issue, do you know the fix?
I think it's trying to push to master when not on master, so it's failing.
Perhaps for your yarn install
, you can try --no-lockfile
or --pure-lockfile
.
That would make sense. So it's in the DETACHED_HEAD
state, and the push
is going to fail. I'm not sure how we can modify the yarn install
as that's run on Netlify during the deploy using an open-source script we don't manage for the npm run build
command. ๐ค
@milesj I believe it's related to an internal issue we caused that is causing the dirty yarn.lock
file. Thanks for helping out, but I'll close this issue since this would be unrelated to this package in particular. ๐
Sure, no problem! Glad you figured it out.