-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore: fix component tests in contributor flow #27883
chore: fix component tests in contributor flow #27883
Conversation
|
@@ -603,7 +603,7 @@ commands: | |||
if [[ <<parameters.type>> == 'ct' ]]; then | |||
# component tests are located side by side with the source codes. | |||
# for the app component tests, ignore specs that are known to cause failures on contributor PRs (see https://discuss.circleci.com/t/how-to-exclude-certain-files-from-circleci-test-globbing/41028) | |||
TESTFILES=$(find src -regextype posix-extended -name '*.cy.*' -not -regex '.*(FileMatch|PromoAction|SelectorPlayground|useDurationFormat|useTestingType|SpecPatterns|DebugPendingRunCounts|DebugRunStates|DebugPageHeader|DebugPendingRunSplash|DebugRunNavigation|DebugRunNavigationLimitMessage).cy.*' | circleci tests split --total=$CIRCLE_NODE_TOTAL) |
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 can probably remove even more of these since the error is fixed now - most of them were excluded because of this issue I believe. I want to do that in a different PR though, since we can't test the contributor workflow until it's merged into develop
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 know if there is a way to get snyk to run on contributor PRs? Looks like @young-robot doesn't have access to run those from his github context?
@@ -1342,11 +1342,13 @@ export default { | |||
const replacePreviousAttemptWith = (test) => { | |||
const prevAttempt = _testsById[test.id] | |||
|
|||
const prevAttempts = prevAttempt.prevAttempts || [] | |||
const prevAttempts = prevAttempt?.prevAttempts || [] |
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.
out of curiousity, why did you need to touch this code?
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 code was throwing errors in the app component tests job for some reason - see the link to the failure in the PR description. This is what fixes those tests in the contributor workflow
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.
Weird. Are those component tests retrying? I'm just trying to figure out why that would happen because there should be a previous attempt here if the currentRetry is 1 or more. I'm more so concerned there is some time of regression here, but I have no idea why this would be specifically on contributor PRs. any idea? I'm also OK with patching this after we get builds working it isn't a must to figure out right now imo
@AtofStryker we're working on getting the Snyk checks to pass on contributor PRs - see this Slack thread |
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.
LGTM
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.
I'm going to approve this, but I really think we should figure out what is going on in the runner for previous attempts and if it is a signal for bugs. Tracking this down would be difficult I suspect and don't think it should block this PR, but it is something we should investigate
This reverts commit b3b7d3b.
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
In the contributor PR workflow, we see failures with some component tests because we're trying to access a property on an undefined object in the runner code. For example.
This PR adds optional chaining and null checks so that we don't throw an error here. Still don't know why this is different from running the tests with an internal author but it is.