MansaGroup / nrwl-nx-action

A GitHub Action to wrap Nrwl Nx commands in your workflows.
MIT License
224 stars 19 forks source link

Use of scan flag for NxCloud is deprecated #311

Closed samuelfernandez closed 2 years ago

samuelfernandez commented 2 years ago

Bug Report

When using Nx Cloud, the --scan param is added. However, it has been deprecated and now results in errors:

Current behavior

https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490

Run mansagroup/nrwl-nx-action@v3.1.0
  with:
    targets: e[2](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:2)e
    affected: true
    parallel: 1
    nxCloud: true
    all: false
  env:
    NX_RUN_GROUP: [3](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:3)30392379[4](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:4)
    NX_CLOUD_AUTH_TOKEN: ***
    NX_BASE: 990f3da1988d2719eb4eb2d[5](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:5)a[6](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:6)c1580e252b1b99
    NX_HEAD: b3a913818ee698ce[7](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:7)e5994df6e2a6d94e2[8](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:8)270d5
🏷 Retrieving Git boundaries (affected command)
/opt/hostedtoolcache/node/16.17.1/x64/bin/npx nx affected --target=e2e --base=[9](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:9)90f3da1988d2719eb4eb2d5a6c1580e252b1b99 --head=bc2a795eb3d51caef0f5dee40d73e649[18](https://github.com/nx-squeezer/squeezer/actions/runs/3303923794/jobs/5452427490#step:6:20)f0ee04 --scan --parallel=1

 >  NX   Running target e2e for 1 project(s):

    - workspace-e2e

   With additional flags:
     --scan=true

> nx run workspace-e2e:e2e --scan=true

 >  NX   'scan' is not found in schema

Expected behavior

scan argument is no longer used

Possible Solution

Just remove it


Others:

Reference:

https://github.com/nrwl/nx/blob/840f4625638080f4ffea9b7665c407552145f165/packages/nx/src/utils/command-line-utils.ts#L69

samuelfernandez commented 2 years ago

Happy to submit a PR

samuelfernandez commented 2 years ago

@IamBlueSlime thanks so much for the quick fix! Would it be possible to release a new version so as to get the latest fix? Thanks