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

Unexpected intermittent error when running changeset in Github workflow #447

Open
pavinduLakshan opened this issue Mar 9, 2025 · 2 comments

Comments

@pavinduLakshan
Copy link

Im getting the following error intermittently in the github workflow changeset step.

2025-02-24T13:56:02.9790461Z Done in 29.3s
2025-02-24T13:56:14.5804990Z [command]/usr/bin/git status --porcelain
2025-02-24T13:56:14.5921466Z /home/runner/work/_actions/changesets/action/v1.4.9/dist/index.js:1
2025-02-24T13:56:14.6415388Z (()=>{var webpack_modules={87351:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);a(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=i(r(22037));const o=r(5278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const p="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=p+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=${r}=${escapeProperty(n)}}}}}e+=${p}${escapeData(this.message)};return e}}function escapeData(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},42186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule....

My workflow file:

https://github.com/wso2/identity-apps/blob/master/.github/workflows/release-workflow.yml

@elpddev
Copy link

elpddev commented Mar 22, 2025

I got the same recently. I looks like a token authorization problem. the GITHUB_TOKEN does not seems to be sufficient for pushing the branch changeset-main from the github actions vm to the origin repo and open a versions PR.

I tried adding to the workflow the suggested contents: write permission, but that did not help.

permissions:
  contents: write

Eventually I created a PAT - personal-access-token with permission for PR and code write. That fixed the problem for now

@pavinduLakshan
Copy link
Author

We had this problem for some time. As we observed, this occurred when the change set pr description is too long. There was an experimental config we were using to update the dependents of all changed packages, so it would update all dependents and add that info to change set pr, which made the pr description too big and caused $subject intermittently.

As a workaround, we removed using that experimental config and intermittent workflow failures didn't occur after that.

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