-
Notifications
You must be signed in to change notification settings - Fork 16
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
DOCK-2471: Fix flaky UI integration tests #1857
DOCK-2471: Fix flaky UI integration tests #1857
Conversation
…tps://github.com/dockstore/dockstore-ui2 into feature/dock-2471/fix-flaky-ui-integration-tests
@@ -13,7 +13,8 @@ | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<div *ngIf="tool || !displayAppTool; else appTool"> | |||
<app-workflow *ngIf="displayAppTool" [isWorkflowPublic]="isToolPublic"></app-workflow> | |||
<div *ngIf="tool && !displayAppTool"> |
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.
The previous logic that controlled whether to use the tool template (for old-style tools) or the workflow template (for apptools) was incorrect. It's fixed here, and I moved all of the code that conditionally delelegates to the workflow template to the top, to make it more clear what's happening without having to scan the entire template.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1857 +/- ##
===========================================
+ Coverage 40.49% 40.53% +0.04%
===========================================
Files 364 365 +1
Lines 11268 11283 +15
Branches 2891 2896 +5
===========================================
+ Hits 4563 4574 +11
- Misses 4405 4407 +2
- Partials 2300 2302 +2 ☔ View full report in Codecov by Sentry. |
Kudos, SonarCloud Quality Gate passed! |
@@ -43,7 +43,7 @@ describe('Entry Deletion', () => { | |||
function goToPrivatePage(entry: Entry): void { | |||
cy.visit('/'); | |||
cy.visit(`${entry.myPrefix}/${entry.path}`); | |||
cy.wait(2000); | |||
cy.contains(entry.path); |
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 indeed better than a hard-coded wait.
Description
This PR fixes some of the flakiness in the CircleCI UI2 tests, specifically related to failures due to problems in the "my tools" interface. Since it was related, the fix to https://ucsc-cgl.atlassian.net/browse/SEAB-5970 is included in this PR.
After I fixed the "my tools" issues, the CircleCI runs started consistently failing because of a browser crash in
myworkflows.ts
. This was weird, because I didn't change anything that should have made it more frequent. However, it needed to be fixed, and typically, per the internets, the crashes happen because the browser runs out of memory. One of thedescribes
inmyworkflows.ts
was huge, so I split it into pieces, in the hope that maybe it would reduce the memory load somewhere in the CircleCI/Chromium internals (maybe in the recording logic?). Now, the tests seem to pass, although it's very possible I didn't address the root issue and it is not actually fixed. Potentially Heisenbuggy. Let's run it this way for a bit, and if the crashes recur, we can dig deeper...So, in total, there are four significant changes:
MyToolComponent
, we now wait for both the "my" tools and "my" apptools responses to arrive before processing them.combineLatest
produces a series of values like so[(null, null), (A, null), (A, B)]
, and thus, previously, to display the entry denoted by current URL, the code was selecting/requesting an entry from the "my" entries based on incomplete information (from the list of old-style tools or apptools, whichever was updated in the combined observable, but not both), then another entry based on full information (the old-style tools + apptools). My best theory is that, occasionally, the response for the wrong entry arrived after the response for the correct entry, causing the wrong entry to be displayed, which triggered the test failures.workflow$
and set the template flag that causes delegation to the apptool template.describe
block inmyworkflows.ts
.Review Instructions
Check the CircleCI runs and confirm that the UI2 tests are not failing due to problems in the "my tools" interface Primarily, this will be failures in
mytools.ts
,deletion.ts
, andarchival.ts
(forthcoming). Also, confirm thatmyworkflows.ts
is consistently running fine.Issues
https://ucsc-cgl.atlassian.net/browse/DOCK-2471
#5696
https://ucsc-cgl.atlassian.net/browse/SEAB-5970
Security
If there are any concerns that require extra attention from the security team, highlight them here.
Please make sure that you've checked the following before submitting your pull request. Thanks!
npm run build
markdown-wrapper
component, which does extra sanitizationnpm audit
and ensure you are not introducing new vulnerabilities