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

How to handle argument placement? #327

Open
jeremylvln opened this issue Jan 30, 2023 · 2 comments
Open

How to handle argument placement? #327

jeremylvln opened this issue Jan 30, 2023 · 2 comments

Comments

@jeremylvln
Copy link
Member

Following this comment from @ValeriyMaslenikov. I'm questioning myself how to place the arguments in the Nx command:

  • Placing them by default after a -- will cause them to be ignored by Nx
  • So one cannot add Nx-specific arguments to the command (like --configuration=prod to handle production builds)
  • However, removing this -- will require anybody to add them on their own for their arguments to be handled correctly by the executor (and not by Nx directly)

Two solutions:

  1. We add another input called nxArgs (or something like that) to the action for specific arguments to add before the --
  2. We expect anybody to add the -- manually, which could lead to hard debugging
@ValeriyMaslenikov
Copy link

Hey, @IamBlueSlime !

I think that probably these changes are still the reason for the incompatibility problems. We're using the @ago-dev/nx-aws-cdk-v2:deploy library to deploy the infrastructure using CDK constructs and based on the CI logs today it looks like this:

image

And on Friday we had a successful pipeline with the following output:
image

There were no changes in the configuration within these days and here it's hot it looks like:

      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 16
      - run: npm ci
      - name: Configure aws credentials
        uses: aws-actions/configure-aws-credentials@master
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
          aws-region: 'us-east-2'
      - name: Deploy
        uses: MansaGroup/nrwl-nx-action@v3
        with:
          targets: deploy
          projects: project-name
          args: '--configuration=prod'

@jeremylvln
Copy link
Member Author

@ValeriyMaslenikov I've shipped a v3.2.2 update (without updating the v3 tag for now). I decided not to ship a breaking change and require the users to add the -- separator on their side if they need it (which not everybody does, including you with your usecase).

It would be awesome if you could test this release and report me if everything work as intended :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants