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
feat: Improve CLOUD_PARALLEL_GROUP_PARAMS_MISMATCH error message #24799
feat: Improve CLOUD_PARALLEL_GROUP_PARAMS_MISMATCH error message #24799
Conversation
Thanks for taking the time to open a PR!
|
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
"differentSpecs": [ | ||
"cypress/integration/foo_spec.js" | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious how different specs come into play here. If this is starting the same parallel run, shouldn't this be a different set of specs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is possible that in the same way that the params can change, the --spec
flag can be set in one machine, running a different set of specs?
CLOUD_PARALLEL_GROUP_PARAMS_MISMATCH: (arg1: {runUrl: string, parameters: any, payload: any }) => { | ||
let params: any = arg1.parameters | ||
|
||
if (arg1.payload?.differentParams) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when would differentParams
not exist if there is a mismatch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more a safeguard in case the cloud changes were released after the app
packages/errors/src/errors.ts
Outdated
params = {} | ||
|
||
_.map(arg1.parameters, (value, key) => { | ||
if (key === 'specs') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (key === 'specs') { | |
if (key === 'specs' && arg1.payload.differentSpecs) { |
do we need to include differentSpecs
at all if there is nothing to show the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to show different error messages depending on the payload? If there are no differentSpecs
we show specs
with all the specs ran but if there're different specs, we are showing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the payload is meant to show the differences on why this errored, I think providing: differentSpecs: []
is a little confusing / doesn't provide much but can go either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to remove that field in case it is empty! you're right! it can be confusing
packages/errors/src/errors.ts
Outdated
|
||
_.map(arg1.parameters, (value, key) => { | ||
if (key === 'specs') { | ||
params['differentSpecs'] = arg1.payload.differentSpecs ?? [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is show this attribute as the negative where as the? Are we able to differentiate if a new spec was sent or a specific spec was missing from the payload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're able to get the different values in the cloud, keeping track of the specs sent by the TR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so diff specs is only tied to the current run that errored right?
How does this look if it sent 1 additional spec vs sent 1 spec less?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When there's one spec extra, its gonna show that spec extra, and the same when there's one less, it shows the spec missing
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
…ATCH-error' of github.com:cypress-io/cypress into alejandro/feat/improve-CLOUD_PARALLEL_GROUP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
@estrada9166 there's a failing system-test. |
…ATCH-error' of github.com:cypress-io/cypress into alejandro/feat/improve-CLOUD_PARALLEL_GROUP_PARAMS_MISMATCH-error
…o/feat/improve-CLOUD_PARALLEL_GROUP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
…UP_PARAMS_MISMATCH-error
User facing changelog
Using the returned payload by the cloud, we should be able to show an error message displaying the mismatch information when
CLOUD_PARALLEL_GROUP_PARAMS_MISMATCH
is thrownAdditional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?