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
Regression - Cypress executor does not respect env cli parameters. #10808
Comments
@danr-za I just tried this locally and it works correctly. WkMacM1-ZCjfRdC8_06231513.mp4 |
@barbados-clemens so this is what I see:
yarn app:e2e:production --browser=chrome --baseUrl=<URL> --env.NX_API_URL=<API URL>
--record -- --parallel --ci-build-id=<build> --key=<key> When running that, I get: NX Nx didn't recognize the following args: browser, baseUrl, env, record
When using '--' all executor args have to be defined after '--'. The reason we append it is because of #8014 Moving it to the beginning results in: yarn app:e2e:production -- --browser=chrome --baseUrl=<URL> --env.NX_API_URL=<API URL>
--record --parallel --ci-build-id=<build> --key=<key> Here, for some reason, the NX_API_URL is not set and is using the default one from the cypress.env.json file. I will try running without the additional dashes and update. |
Running this: nx run management-e2e:e2e:production --browser=chrome --baseUrl=http://10.11.103.227/ --env.NX_API_URL=http://10.1.2.3 --record=true --ci-build-id=1234 --key=12345578 Results with: You passed the --ci-build-id flag but did not provide either a --group or --parallel flag. So there's an issue anyway. |
@barbados-clemens any news about this? thanks |
that error doesn't look like it's related to the issue you initially raised. I've yet to be able to reproduce this locally as I demoed in the above comments.
I'm not seeing your command pass either flag. |
correction - the command I posted was after I ran the following: nx run management-e2e:e2e:production --browser=chrome --baseUrl=http://10.11.103.227/ --env.NX_API_URL=http://10.1.2.3 --parallel --record=true --ci-build-id=1234 --key=12345578
|
I've run randomly into this issue too within Github Actions, seems that additional flags are randomly being ignored. I've also tried removing parallel without success. This began happening suddenly, so it seems to be a regression on NX |
Any news about this? If there's anything else I can check or do lmk |
@barbados-clemens - it's still labeled as waiting for repro, is there something else you want me to provide? |
Hey all, so just a status update. this is next on my list of things to look more into after #10857 which should be soon as I found the root cause of my last issue. but last time looking at myself and @FrozenPandaz were not able to reproduce this locally. so any extra info you can give about the environment and versions would be helpful. also, double checking with the latest nx version with cypress 10 support would also be helpful. nx v14.5.1 |
Unfortunately, I already tried with the latest version and Cypress 10, but it seems that it has something to do with the CLI args not passing. This breaks in:
But as I previously mentioned, locally on my M1 Mac it seems to be working (even though I couldn't fully check that as I don't have the access to the env I need) |
you should be able to set that option via the project executor options, you can make a ci configuration so you can do though I just saw an issue with env options via the project config aren't being properly passed in #10392 so will have to figure that |
I'm also not only able to reproduce it on my Mac, but I can on Github actions using NX Cloud and distributed execution. If you need any extra info, let me know (I'm currently passing 3 --env args) |
We managed to reproduce it also for one client. Again, locally (Mac, Windows) works fine, but fails on CI (Azure with hosted Ubuntu). Not sure how we can test/debug this. Any ideas @barbados-clemens? |
So I just set this up in a GitHub action on Ubuntu latest and it worked https://github.com/barbados-clemens/testing-validation-bench/runs/7811470886?check_suite_focus=true Gonna keep looking into this but might be more going on than just OS? |
cypress env arg parsing has had multiple regressions this change asserts the usage of commandline, cypress.env.json file, and executor options will work properly ISSUES CLOSED: nrwl#10808
Status update. this looks to be related to DTE? see cloud run: https://nx.app/runs/8nkrV8kxzNP @ureciocais mentioned they have DTE on as well. @danr-za and @rodrigomata are any of y'all using nx cloud + DTE with this error? |
cypress env arg parsing has had multiple regressions this change asserts the usage of commandline, cypress.env.json file, and executor options will work properly ISSUES CLOSED: nrwl#10808
Hmm not us |
@danr-za are you getting any errors or just env vars being undefined with the usage of |
An update on my side: |
@danr-za that's very interesting. presumably that should have just worked anyways, and also the fact it's influencing the --env params is also interesting. I'll investigate some on my side to see what I find, thanks for more info.
Correct, they will be still be passed to the executors as expected, unless you use DTE, where they are currently getting mangled, but presumably this recent change made will fix that. I also have a PR up to document usage patterns with env that adds using |
The recent change doesn't appear to fix the issue |
@barbados-clemens, I've tried with the latest version, but still arguments aren't passed in when using DTE |
@acomben-cais @ureciocais what are the exact values you are passing through the command line? |
@barbados-clemens we are doing something like this: |
@ureciocais can you run |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Oops, not stale. sorry about that. |
Avoid outputting object args as [object Object]. Is related to nrwl#10808
I am facing the same issue with 11564 did not get rid completely of |
Avoid outputting object args as [object Object]. Is related to nrwl#10808
@barbados-clemens @meeroslav In my PR I adjusted also the way how the section "With additional flags" will print the arguments as I think they should be printed in unparsed way mirroring the actual input. So this way:
rather than
Maybe somebody of you will be willing to have a look at this? |
Avoid outputting object args as [object Object]. Is related to nrwl#10808
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Regression of #9764.
I upgraded from 14.2.4 where it worked.
Expected Behavior
Steps to Reproduce
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: