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

v2.2.6 is breaking builds #59

Closed
nhammond101 opened this issue Sep 2, 2022 · 14 comments
Closed

v2.2.6 is breaking builds #59

nhammond101 opened this issue Sep 2, 2022 · 14 comments

Comments

@nhammond101
Copy link

Issue:
CI Builds are failing on the Setup nx step

Expected:
Builds to continue past the step with the correct SHAs set for affected:* commands

Actual:

Run nrwl/nx-set-shas@v2
  with:
    main-branch-name: main
    set-environment-variables-for-job: true
    error-on-no-successful-workflow: false
    last-successful-event: push
    working-directory: .
  env:
    ...
Run node $GITHUB_ACTION_PATH/dist/index.js
  node $GITHUB_ACTION_PATH/dist/index.js
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ...
Warning: 

Warning: WARNING: Working directory '' doesn't exist.

fatal: Not a valid object name origin/
(node:1[7](https://github.com/Unity-Technologies/sol-naemo-world-monorepo/runs/8154717695?check_suite_focus=true#step:8:7)12) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
node:internal/errors:[8](https://github.com/Unity-Technologies/sol-naemo-world-monorepo/runs/8154717695?check_suite_focus=true#step:8:8)56
  const err = new Error(message);
              ^

Error: Command failed: git merge-base origin/"" HEAD
fatal: Not a valid object name origin/

    at checkExecSyncError (node:child_process:841:11)
    at execSync (node:child_process:[9](https://github.com/Unity-Technologies/sol-naemo-world-monorepo/runs/8154717695?check_suite_focus=true#step:8:9)12:15)
    at /home/runner/work/_actions/nrwl/nx-set-shas/v2/dist/index.js:62822:16
    at /home/runner/work/_actions/nrwl/nx-set-shas/v2/dist/index.js:62855:3
    at /home/runner/work/_actions/nrwl/nx-set-shas/v2/dist/index.js:62930:3
    at Object.<anonymous> (/home/runner/work/_actions/nrwl/nx-set-shas/v2/dist/index.js:62933:12)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:[10](https://github.com/Unity-Technologies/sol-naemo-world-monorepo/runs/8154717695?check_suite_focus=true#step:8:10))
    at Module.load (node:internal/modules/cjs/loader:1004:32) {
  status: [12](https://github.com/Unity-Technologies/sol-naemo-world-monorepo/runs/8154717695?check_suite_focus=true#step:8:12)8,
  signal: null,
  output: [ null, '', 'fatal: Not a valid object name origin/\n' ],
  pid: [17](https://github.com/Unity-Technologies/sol-naemo-world-monorepo/runs/8154717695?check_suite_focus=true#step:8:17)[21](https://github.com/Unity-Technologies/sol-naemo-world-monorepo/runs/8154717695?check_suite_focus=true#step:8:22),
  stdout: '',
  stderr: 'fatal: Not a valid object name origin/\n'
}
Error: Process completed with exit code 1.

Workaround:
Pin the step to v2.2.5

- name: Setup nx
  uses: nrwl/[email protected]

Further information:
The checkout step is pulling the full repo

- uses: actions/checkout@v3
  with:
    fetch-depth: 0
@breningham
Copy link

@pgte
Copy link

pgte commented Sep 2, 2022

Happening to me too

@tamascsaba
Copy link

tamascsaba commented Sep 2, 2022

I think it will be related lot of projects and companies 😥
Thank you @nrwl for making my Friday fun 🤣

My temporally solution set exact version:
- uses: nrwl/[email protected]

@timlohse1104
Copy link

We get the error too.
Seems like the transferred arguments (working_directory and main-branch-name) doesn't get hooked up.

@flaviouk
Copy link

flaviouk commented Sep 2, 2022

Same with us, reverting to the workaround solution for now

@zbaibolov
Copy link

same situation

@tamascsaba
Copy link

tamascsaba commented Sep 2, 2022

Here is a good meme to tide everyone over until the guys resolve this issue :)

image
image

@rmlevangelio
Copy link

😓

@PodStuart
Copy link

PodStuart commented Sep 2, 2022

I think it will be related lot of projects and companies 😥 Thank you @nrwl for making my Friday fun 🤣

My temporally solution set exact version: - uses: nrwl/[email protected]

Don't think workaround is viable if using the nx-cloud-main.yml workflow.

@JamesHenry
Copy link
Collaborator

Hi Folks, deja vu from yesterday, but I saw these notifications and have again reverted the relevant PR and cut a later patch - 2.2.7, so things should hopefully be working again now

@mkurczewski
Copy link

image

@ricardodantas
Copy link

Same here

@LayZeeDK
Copy link
Contributor

LayZeeDK commented Sep 2, 2022

@JamesHenry
I had already submitted a bugfix patch and linked it to this issue. I will rework it to include the security improvement at some other time then.

@tamascsaba
Copy link

tamascsaba commented Sep 2, 2022

Thanks a lot man, we really appreciate your quick fix 👍

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

Successfully merging a pull request may close this issue.