Warning: Your username contains one or more banned words. Some operations on Dockstore will be blocked until you change
diff --git a/src/app/loginComponents/accounts/internal/change-username/change-username.component.ts b/src/app/loginComponents/accounts/internal/change-username/change-username.component.ts
index 357d800d9f..ec5861a2a1 100644
--- a/src/app/loginComponents/accounts/internal/change-username/change-username.component.ts
+++ b/src/app/loginComponents/accounts/internal/change-username/change-username.component.ts
@@ -34,7 +34,7 @@ export class ChangeUsernameComponent implements OnInit {
username: string;
user: User;
usernameTaken = false;
- usernameChangeRequired: boolean = false;
+ isUsernameChangeRequired$: Observable;
checkingIfValid = false;
canChangeUsername$: Observable;
showEmailWarning = false;
@@ -53,9 +53,9 @@ export class ChangeUsernameComponent implements OnInit {
this.user = user;
this.username = user.username;
this.showEmailWarning = this.user.username.includes('@');
- this.usernameChangeRequired = this.user.usernameChangeRequired;
}
});
+ this.isUsernameChangeRequired$ = this.userQuery.isUsernameChangeRequired$;
this.canChangeUsername$ = this.userQuery.canChangeUsername$;
this.enableDisableFormControl();
this.usernameFormControl.valueChanges.pipe(debounceTime(formInputDebounceTime), takeUntil(this.ngUnsubscribe)).subscribe((value) => {
diff --git a/src/app/my-notebooks/my-notebooks.module.ts b/src/app/my-notebooks/my-notebooks.module.ts
new file mode 100644
index 0000000000..6ca991e898
--- /dev/null
+++ b/src/app/my-notebooks/my-notebooks.module.ts
@@ -0,0 +1,8 @@
+import { NgModule } from '@angular/core';
+import { SharedWorkflowServicesNotebooksModule } from '../shared-workflow-services-notebooks/shared-workflow-services-notebooks.module';
+import { MyNotebooksRoutes } from './my-notebooks.routing';
+
+@NgModule({
+ imports: [MyNotebooksRoutes, SharedWorkflowServicesNotebooksModule],
+})
+export class MyNotebooksModule {}
diff --git a/src/app/my-notebooks/my-notebooks.routing.ts b/src/app/my-notebooks/my-notebooks.routing.ts
new file mode 100644
index 0000000000..401fff4d06
--- /dev/null
+++ b/src/app/my-notebooks/my-notebooks.routing.ts
@@ -0,0 +1,13 @@
+import { RouterModule, Routes } from '@angular/router';
+import { MyWorkflowComponent } from '../myworkflows/my-workflow/my-workflow.component';
+import { EntryType } from '../shared/enum/entry-type';
+
+const routes: Routes = [
+ {
+ path: '**',
+ component: MyWorkflowComponent,
+ data: { title: 'Dockstore | My Notebooks', entryType: EntryType.Notebook },
+ },
+];
+
+export const MyNotebooksRoutes = RouterModule.forChild(routes);
diff --git a/src/app/my-services/my-services.module.ts b/src/app/my-services/my-services.module.ts
index 3a6bec25c9..36ccc0c66b 100644
--- a/src/app/my-services/my-services.module.ts
+++ b/src/app/my-services/my-services.module.ts
@@ -1,8 +1,8 @@
import { NgModule } from '@angular/core';
-import { SharedWorkflowServicesModule } from '../shared-workflow-services/shared-workflow-services.module';
+import { SharedWorkflowServicesNotebooksModule } from '../shared-workflow-services-notebooks/shared-workflow-services-notebooks.module';
import { MyServicesRoutes } from './my-services.routing';
@NgModule({
- imports: [MyServicesRoutes, SharedWorkflowServicesModule],
+ imports: [MyServicesRoutes, SharedWorkflowServicesNotebooksModule],
})
export class MyServicesModule {}
diff --git a/src/app/my-sidebar/my-sidebar.component.html b/src/app/my-sidebar/my-sidebar.component.html
index ede24a963c..93a4793af5 100644
--- a/src/app/my-sidebar/my-sidebar.component.html
+++ b/src/app/my-sidebar/my-sidebar.component.html
@@ -43,13 +43,23 @@
-
-
-
+
+
- -->
+
+
+
+
+
+
+
+
You have not registered any {{ entryType$ | async }}s
your authorized organizations.
-
+
Shared with me
@@ -148,17 +134,19 @@
Shared with me
info
- There are currently no {{ entryType$ | async }}s registered under this account. To add your first
- {{ entryType$ | async }}, do one of the following:
+ There are currently no {{ entryType$ | async }}s registered under this account. To add your first {{ entryType$ | async
+ }}, do one of the following:
-
- Press the 'Manage on GitHub' button and follow the GitHub apps web interface to create services from your GitHub
- repositories.
-
- Press the 'Register {{ entryType$ | async | titlecase }}' button to manually add a {{ entryType$ | async }} using the
- registration wizard.
+ Press the 'Register a {{ entryType$ | async | titlecase }}' button
+ to manually add a {{ entryType$ | async }} using the registration wizard.
+ and follow the GitHub apps web interface to create {{ entryType$ | async }}s from your GitHub
+ repositories.
+ Navigate to GitHub to install our GitHub app on your repositories/organizations. See our
+
+ documentation open_in_new
+
+ for how to use GitHub Apps to automatically sync your {{ entryType }} with GitHub. A .dockstore.yml file is required.
+
+
diff --git a/src/app/workflow/register-workflow-modal/register-github-app-modal/register-github-app-modal.component.ts b/src/app/workflow/register-workflow-modal/register-github-app-modal/register-github-app-modal.component.ts
new file mode 100644
index 0000000000..04a00ae46b
--- /dev/null
+++ b/src/app/workflow/register-workflow-modal/register-github-app-modal/register-github-app-modal.component.ts
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2023 OICR, UCSC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Component, Inject, OnInit } from '@angular/core';
+import { SessionQuery } from 'app/shared/session/session.query';
+import { UserQuery } from 'app/shared/user/user.query';
+import { Observable } from 'rxjs';
+import { AlertQuery } from '../../../shared/alert/state/alert.query';
+import { Dockstore } from '../../../shared/dockstore.model';
+import { RegisterWorkflowModalService } from '../register-workflow-modal.service';
+import { MAT_DIALOG_DATA } from '@angular/material/dialog';
+import { EntryType } from 'app/shared/enum/entry-type';
+
+@Component({
+ selector: 'app-register-github-app-modal',
+ templateUrl: './register-github-app-modal.component.html',
+ styleUrls: ['../register-workflow-modal.component.scss'],
+})
+export class RegisterGithubAppModalComponent implements OnInit {
+ public EntryType = EntryType;
+ public isRefreshing$: Observable;
+ public gitHubAppInstallationLink$: Observable;
+ public isUsernameChangeRequired$: Observable;
+ public username$: Observable;
+ Dockstore = Dockstore;
+
+ constructor(
+ @Inject(MAT_DIALOG_DATA) public entryType: string,
+ private registerWorkflowModalService: RegisterWorkflowModalService,
+ private alertQuery: AlertQuery,
+ protected sessionQuery: SessionQuery,
+ private userQuery: UserQuery
+ ) {}
+
+ ngOnInit() {
+ this.username$ = this.userQuery.username$;
+ this.isUsernameChangeRequired$ = this.userQuery.isUsernameChangeRequired$;
+ this.isRefreshing$ = this.alertQuery.showInfo$;
+ this.gitHubAppInstallationLink$ = this.sessionQuery.gitHubAppInstallationLink$;
+ }
+
+ clearWorkflowRegisterError(): void {
+ this.registerWorkflowModalService.clearWorkflowRegisterError();
+ }
+}
diff --git a/src/app/workflow/register-workflow-modal/register-workflow-modal.component.html b/src/app/workflow/register-workflow-modal/register-workflow-modal.component.html
index 723c63ca86..bc996b916f 100644
--- a/src/app/workflow/register-workflow-modal/register-workflow-modal.component.html
+++ b/src/app/workflow/register-workflow-modal/register-workflow-modal.component.html
@@ -66,9 +66,9 @@
Register Workflow
add Manage Dockstore installations on GitHub
diff --git a/src/app/workflow/register-workflow-modal/register-workflow-modal.component.ts b/src/app/workflow/register-workflow-modal/register-workflow-modal.component.ts
index dbfccd8ce7..f4113acdd8 100644
--- a/src/app/workflow/register-workflow-modal/register-workflow-modal.component.ts
+++ b/src/app/workflow/register-workflow-modal/register-workflow-modal.component.ts
@@ -21,7 +21,7 @@ import { DescriptorLanguageService } from 'app/shared/entry/descriptor-language.
import { SessionQuery } from 'app/shared/session/session.query';
import { UserQuery } from 'app/shared/user/user.query';
import { Observable, Subject } from 'rxjs';
-import { debounceTime, map, takeUntil } from 'rxjs/operators';
+import { debounceTime, takeUntil } from 'rxjs/operators';
import { AlertQuery } from '../../shared/alert/state/alert.query';
import { formInputDebounceTime } from '../../shared/constants';
import { Dockstore } from '../../shared/dockstore.model';
@@ -61,7 +61,7 @@ export class RegisterWorkflowModalComponent implements OnInit, AfterViewChecked,
public Tooltip = Tooltip;
public workflowPathPlaceholder: string;
public gitHubAppInstallationLink$: Observable;
- public usernameChangeRequired$: Observable;
+ public isUsernameChangeRequired$: Observable;
public hostedWorkflow = {
repository: '',
descriptorType: Workflow.DescriptorTypeEnum.CWL,
@@ -120,7 +120,7 @@ export class RegisterWorkflowModalComponent implements OnInit, AfterViewChecked,
ngOnInit() {
this.username$ = this.userQuery.username$;
- this.usernameChangeRequired$ = this.userQuery.user$.pipe(map((user) => user.usernameChangeRequired));
+ this.isUsernameChangeRequired$ = this.userQuery.isUsernameChangeRequired$;
this.isRefreshing$ = this.alertQuery.showInfo$;
this.gitHubAppInstallationLink$ = this.sessionQuery.gitHubAppInstallationLink$;
this.registerWorkflowModalService.workflow.pipe(takeUntil(this.ngUnsubscribe)).subscribe((workflow: Service | BioWorkflow) => {
diff --git a/src/app/workflow/workflow.component.html b/src/app/workflow/workflow.component.html
index a6532353f2..b7c63779dc 100644
--- a/src/app/workflow/workflow.component.html
+++ b/src/app/workflow/workflow.component.html
@@ -104,7 +104,7 @@
diff --git a/src/app/home-page/widget/entry-box/entry-box.component.ts b/src/app/home-page/widget/entry-box/entry-box.component.ts
index 8612da79ca..d067d4ab65 100644
--- a/src/app/home-page/widget/entry-box/entry-box.component.ts
+++ b/src/app/home-page/widget/entry-box/entry-box.component.ts
@@ -83,14 +83,9 @@ export class EntryBoxComponent extends Base implements OnInit {
this.helpLink = Dockstore.DOCUMENTATION_URL + '/getting-started/notebooks/notebooks.html';
this.allEntriesLink = '/my-notebooks/';
this.entryTypeParam = 'NOTEBOOKS';
- // Not loading entries for Notebooks - remove when supported
- this.isLoading = false;
}
- // Do not get Notebook entries, unsupported - remove when suported
- if (this.entryType !== NewEntryType.NOTEBOOK) {
- this.getMyEntries();
- }
+ this.getMyEntries();
}
getMyEntries() {
diff --git a/src/materialColorScheme.scss b/src/materialColorScheme.scss
index dc085477b9..490626b68c 100644
--- a/src/materialColorScheme.scss
+++ b/src/materialColorScheme.scss
@@ -197,6 +197,8 @@ $workflow-selection-color: #d2fbf0;
$service-color: #ff6c44;
$service-selection-color: #ffdbcf;
+$notebook-selection-color: #dde1f2;
+
$org-selection-color: #dde1f2;
// Color used to indicate success in general (of an operation, verified badge, etc).
diff --git a/src/styles.scss b/src/styles.scss
index 802036df83..0be97462d4 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -894,6 +894,12 @@ app-workflow-sidebar-accordion
background: $workflow-selection-color !important;
}
+// Set the background to the color associated with notebooks (purple).
+// Used to set the background color in bubbles.
+.notebook-background {
+ background: $notebook-selection-color !important;
+}
+
// Set the background to the color associated with services (orange).
// Used to set the background color in bubbles.
.service-background {
From 246adc1c61184b7b0af0ee9dbbe6d244e16ba132 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 24 May 2023 11:42:49 -0400
Subject: [PATCH 014/128] Bump socket.io-parser from 4.2.1 to 4.2.3 (#1786)
* Bump socket.io-parser from 4.2.1 to 4.2.3
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.3.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.3)
---
updated-dependencies:
- dependency-name: socket.io-parser
dependency-type: indirect
...
Signed-off-by: dependabot[bot]
* Update license file
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
THIRD-PARTY-LICENSES.csv | 2 +-
package-lock.json | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/THIRD-PARTY-LICENSES.csv b/THIRD-PARTY-LICENSES.csv
index 6fbffe0bd9..19165bdecf 100644
--- a/THIRD-PARTY-LICENSES.csv
+++ b/THIRD-PARTY-LICENSES.csv
@@ -1095,7 +1095,7 @@
"slide@1.1.6","ISC","https://github.com/isaacs/slide-flow-control"
"smart-buffer@4.2.0","MIT","https://github.com/JoshGlazebrook/smart-buffer"
"socket.io-adapter@2.5.2","MIT","https://github.com/socketio/socket.io-adapter"
-"socket.io-parser@4.2.1","MIT","https://github.com/socketio/socket.io-parser"
+"socket.io-parser@4.2.3","MIT","https://github.com/socketio/socket.io-parser"
"socket.io@4.6.1","MIT","https://github.com/socketio/socket.io"
"sockjs@0.3.24","MIT","https://github.com/sockjs/sockjs-node"
"socks-proxy-agent@4.0.2","MIT","https://github.com/TooTallNate/node-socks-proxy-agent"
diff --git a/package-lock.json b/package-lock.json
index 12893943f3..c8dcb0e47f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15934,9 +15934,9 @@
}
},
"node_modules/socket.io-parser": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz",
- "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz",
+ "integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==",
"dev": true,
"dependencies": {
"@socket.io/component-emitter": "~3.1.0",
@@ -29372,9 +29372,9 @@
}
},
"socket.io-parser": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz",
- "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz",
+ "integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==",
"dev": true,
"requires": {
"@socket.io/component-emitter": "~3.1.0",
From 7d361a548e7b3561c593541992966d884690b2f8 Mon Sep 17 00:00:00 2001
From: Steve Von Worley
Date: Thu, 25 May 2023 08:06:32 -0700
Subject: [PATCH 015/128] add rudimentary smoke tests for notebooks
https://ucsc-cgl.atlassian.net/browse/SEAB-5530
---
.../smokeTests/sharedTests/basic-enduser.ts | 102 ++++++++++++++++--
package.json | 4 +-
scripts/run-webservice-script.sh | 2 +-
3 files changed, 96 insertions(+), 12 deletions(-)
diff --git a/cypress/e2e/smokeTests/sharedTests/basic-enduser.ts b/cypress/e2e/smokeTests/sharedTests/basic-enduser.ts
index 0b8b6ee75f..20cc0ff29f 100644
--- a/cypress/e2e/smokeTests/sharedTests/basic-enduser.ts
+++ b/cypress/e2e/smokeTests/sharedTests/basic-enduser.ts
@@ -2,17 +2,30 @@ import { ga4ghPath } from '../../../../src/app/shared/constants';
import { goToTab } from '../../../support/commands';
import { ToolDescriptor } from '../../../../src/app/shared/swagger/model/toolDescriptor';
-// Test an entry, these should be ambiguous between tools and workflows.
+// Test an entry, these should be ambiguous between tools, workflows, and notebooks.
describe('run stochastic smoke test', () => {
testEntry('Tools');
testEntry('Workflows');
+ testEntry('Notebooks');
});
function testEntry(tab: string) {
- beforeEach('get random entry on first page', () => {
- cy.visit('/search');
+ function goToRandomEntry() {
+ // Notebooks search is not functional in staging or prod in 1.14.
+ // TODO after 1.15 release: remove the following code path
+ if (tab === 'Notebooks' && isStagingOrProd()) {
+ cy.visit('/notebooks');
+ cy.get('[data-cy=entry-link]')
+ .eq(0)
+ .then((el) => {
+ cy.log(el.prop('href')); // log the href in case a test fails
+ cy.visit(el.prop('href'));
+ });
+ return;
+ }
+ cy.visit('/search' + (tab === 'Notebooks' ? '?notebooks' : ''));
cy.get('[data-cy=workflowColumn] a');
goToTab(tab);
- const linkName = tab === 'Workflows' ? 'workflowColumn' : 'toolNames';
+ const linkName = getLinkName(tab);
// select a random entry on the first page and navigate to it
let chosen_index = 0;
cy.get('[data-cy=' + linkName + ']')
@@ -26,12 +39,12 @@ function testEntry(tab: string) {
cy.visit(el.prop('href'));
});
});
- });
+ }
it('check info tab', () => {
- // test export to zip button
+ goToRandomEntry();
goToTab('Info');
-
+ // test export to zip button
cy.get('[data-cy=downloadZip]').within(() => {
cy.get('a').then((el) => {
cy.request(el.prop('href')).its('status').should('eq', 200);
@@ -40,18 +53,38 @@ function testEntry(tab: string) {
});
it('check files tab', () => {
+ goToRandomEntry();
goToTab('Files');
cy.url().should('contain', '?tab=files');
- cy.contains('Descriptor Files');
+ cy.contains(tab === 'Notebooks' ? 'Notebook Files' : 'Descriptor Files');
});
it('check versions tab', () => {
+ goToRandomEntry();
goToTab('Versions');
cy.url().should('contain', '?tab=versions');
cy.get('[data-cy=versionRow]').should('have.length.of.at.least', 1);
});
}
+function getLinkName(tab: string): string {
+ switch (tab) {
+ case 'Tools':
+ return 'toolNames';
+ case 'Workflows':
+ return 'workflowColumn';
+ case 'Notebooks':
+ return 'notebookColumn';
+ default:
+ throw new Error('unknown tab');
+ }
+}
+
+function isStagingOrProd() {
+ const baseUrl = Cypress.config('baseUrl');
+ return baseUrl === 'https://staging.dockstore.org' || baseUrl === 'https://dockstore.org';
+}
+
const organizations = [['Broad Institute']];
describe('Check organizations page', () => {
it('has multiple organizations and org with content', () => {
@@ -179,11 +212,18 @@ const workflowVersionTuples = [
'Galaxy',
],
];
-// This test shouldn't be run for smoke tests as it depends on 'real' entries
+const notebookVersionTuples = [
+ // TODO when we add notebooks that will persist in the prod database, detail a few here
+];
+
+// These tests shouldn't be run for smoke tests as it depends on 'real' entries
if (Cypress.config('baseUrl') !== 'http://localhost:4200') {
describe('Monitor workflows', () => {
workflowVersionTuples.forEach((t) => testWorkflow(t[0], t[1], t[2], t[3], t[4]));
});
+ describe('Monitor notebooks', () => {
+ notebookVersionTuples.forEach((t) => testNotebook(t[0], t[1], t[2], t[3], t[4], t[5]));
+ });
}
function testWorkflow(url: string, version1: string, version2: string, trsUrl: string, type: string) {
@@ -282,6 +322,50 @@ function testWorkflow(url: string, version1: string, version2: string, trsUrl: s
});
}
+function testNotebook(url: string, version1: string, version2: string, trsUrl: string, path: string, type: string) {
+ it('notebook tabs work for ' + url, () => {
+ cy.visit('/notebooks/' + url + ':' + version1);
+
+ goToTab('Info');
+ cy.url().should('contain', '?tab=info');
+ cy.contains('mat-card-header', 'Notebook Information');
+
+ goToTab('Preview');
+ cy.url().should('contain', '?tab=preview');
+
+ goToTab('Versions');
+ cy.url().should('contain', '?tab=versions');
+
+ // check that clicking on a different version goes to that version's url
+ if (version1 !== version2) {
+ cy.contains('[data-cy=versionName]', version2).click();
+ cy.url().should('contain', url + ':' + version2);
+ }
+
+ goToTab('Files');
+ cy.url().should('contain', '?tab=files');
+
+ // Check the "Launch with" buttons.
+ // Notebooks "Launch with" is not fully functional in staging or prod in 1.14.
+ // TODO after 1.15 release: make the following code execute in all cases.
+ if (!isStagingOrProd()) {
+ let launchWithTuples: any[] = [];
+ if (type === 'Jupyter') {
+ launchWithTuples = [
+ ['colabLaunchWith', 'blob/' + version2 + path],
+ ['mybinderLaunchWith', version2 + '?labpath=' + path],
+ ];
+ }
+ launchWithTuples.forEach((t) => {
+ cy.get('[data-cy=' + t[0] + ']').should(($el) => {
+ // @ts-ignore
+ expect($el.attr('href')).to.contain(t[1]);
+ });
+ });
+ }
+ });
+}
+
// TODO: uncomment after tooltester logs are fixed
// describe('Test existence of Logs', () => {
// it('Find Logs in Workflows', () => {
diff --git a/package.json b/package.json
index ea409de2e6..be9ef54ae7 100644
--- a/package.json
+++ b/package.json
@@ -5,8 +5,8 @@
"config": {
"webservice_version": "1.15.0",
"use_circle": true,
- "circle_ci_source": "https://app.circleci.com/pipelines/github/dockstore/dockstore/9912/workflows/6645ef57-f01a-4d65-8b0e-36d3dbd95081/jobs/33626/artifacts",
- "circle_build_id": "33626",
+ "circle_ci_source": "https://app.circleci.com/pipelines/github/dockstore/dockstore/9918/workflows/b8714bc1-49a2-424d-8b14-527bc3d4a4e3/jobs/33676/artifacts",
+ "circle_build_id": "33676",
"base_branch": "develop"
},
"scripts": {
diff --git a/scripts/run-webservice-script.sh b/scripts/run-webservice-script.sh
index a587a55aee..bd93202ae5 100755
--- a/scripts/run-webservice-script.sh
+++ b/scripts/run-webservice-script.sh
@@ -16,4 +16,4 @@ psql -h localhost -c "create user dockstore with password 'dockstore' createdb;"
psql -h localhost -c "ALTER USER dockstore WITH superuser;" -U postgres
psql -h localhost -c 'create database webservice_test with owner = dockstore;' -U postgres
psql -h localhost -f test/${DB_DUMP:-db_dump.sql} webservice_test -U postgres
-java -jar dockstore-webservice.jar db migrate -i 1.5.0,1.6.0,1.7.0,add_service_1.7.0,1.8.0,1.9.0,1.10.0,alter_test_user_1.10.2,1.11.0,1.12.0,1.13.0,1.14.0 test/web.yml
+java -jar dockstore-webservice.jar db migrate -i 1.5.0,1.6.0,1.7.0,add_service_1.7.0,1.8.0,1.9.0,1.10.0,alter_test_user_1.10.2,1.11.0,1.12.0,1.13.0,1.14.0,add_notebook_1.14.0 test/web.yml
From dc77aa3f7b02c8002d5e9e6b4ff20446fcce9963 Mon Sep 17 00:00:00 2001
From: Ying Yang <68610185+y-ng@users.noreply.github.com>
Date: Thu, 25 May 2023 17:31:21 -0400
Subject: [PATCH 016/128] SEAB-5479: add period (#1779)
---
src/app/about/about.component.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html
index a18d70c400..6b84932254 100644
--- a/src/app/about/about.component.html
+++ b/src/app/about/about.component.html
@@ -108,7 +108,7 @@
You can register your workflows and tools on Dockstore in three ways:
target="_blank"
rel="noopener noreferrer"
>github apps). You are responsible for ensuring that your descriptors point at valid Docker images
+ >). You are responsible for ensuring that your descriptors point at valid Docker images.
You can use our hosted workflows service to store tools and workflows directly on dockstore.org in order to quickly get
From e208c633aadb0adc59c651703dba7b330ebc958a Mon Sep 17 00:00:00 2001
From: Steve Von Worley
Date: Fri, 26 May 2023 15:47:04 -0700
Subject: [PATCH 017/128] add colab and mybinder notebooks "launch with" icons
https://ucsc-cgl.atlassian.net/browse/SEAB-5545
---
.../launch-third-party.component.html | 4 ++--
src/assets/images/thirdparty/binder.svg | 13 +++++++++++++
src/assets/images/thirdparty/colab.svg | 7 +++++++
3 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 src/assets/images/thirdparty/binder.svg
create mode 100644 src/assets/images/thirdparty/colab.svg
diff --git a/src/app/workflow/launch-third-party/launch-third-party.component.html b/src/app/workflow/launch-third-party/launch-third-party.component.html
index cea59307a9..f97d7df95a 100644
--- a/src/app/workflow/launch-third-party/launch-third-party.component.html
+++ b/src/app/workflow/launch-third-party/launch-third-party.component.html
@@ -283,7 +283,7 @@
"
[disabled]="(hasContent$ | async) === false"
data-cy="colabLaunchWith"
- >Google ColabGoogle Colab
mybinder.orgmybinder.org
diff --git a/src/assets/images/thirdparty/binder.svg b/src/assets/images/thirdparty/binder.svg
new file mode 100644
index 0000000000..2e82ba6b0a
--- /dev/null
+++ b/src/assets/images/thirdparty/binder.svg
@@ -0,0 +1,13 @@
+
diff --git a/src/assets/images/thirdparty/colab.svg b/src/assets/images/thirdparty/colab.svg
new file mode 100644
index 0000000000..accb455e02
--- /dev/null
+++ b/src/assets/images/thirdparty/colab.svg
@@ -0,0 +1,7 @@
+
From 5fc1ed6a35e8be101189fca3cd0f127689355099 Mon Sep 17 00:00:00 2001
From: Denis Yuen
Date: Mon, 29 May 2023 10:30:02 -0400
Subject: [PATCH 018/128] more stub fix (#1790)
* more stub fix
* duplicates
---
src/app/workflow/info-tab/info-tab.component.ts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/app/workflow/info-tab/info-tab.component.ts b/src/app/workflow/info-tab/info-tab.component.ts
index c966c50269..a9edfbff58 100644
--- a/src/app/workflow/info-tab/info-tab.component.ts
+++ b/src/app/workflow/info-tab/info-tab.component.ts
@@ -133,8 +133,13 @@ export class InfoTabComponent extends EntryTab implements OnInit, OnChanges {
this.authors = [...this.selectedVersion.authors, ...orcidAuthors];
});
} else {
- this.isValidVersion = false;
+ this.currentVersion = null;
+ this.publicAccessibleTestParameterFile = null;
this.trsLink = null;
+ this.sourceCodeFile = null;
+ this.isValidVersion = null;
+ this.downloadZipLink = null;
+ this.authors = null;
}
}
From b4fa97593823f76c828c086659e9b5f7a0e91309 Mon Sep 17 00:00:00 2001
From: Kathy Tran
Date: Thu, 1 Jun 2023 09:24:47 -0400
Subject: [PATCH 019/128] Determine base branch dynamically (#1791)
https://ucsc-cgl.atlassian.net/browse/SEAB-5531
- This PR moves the audit and accessibility tests from CircleCI to GitHub actions to take advantage of GitHub actions' support for workflows triggered by pull requests
---
.circleci/config.yml | 405 ++++++-----------------
.github/workflows/accessibility_test.yml | 131 ++++++++
.github/workflows/npm_audit_test.yml | 26 ++
package.json | 3 +-
scripts/npm-audit-comparison.sh | 9 +-
scripts/run-pa11y-ci.sh | 10 +-
6 files changed, 270 insertions(+), 314 deletions(-)
create mode 100644 .github/workflows/accessibility_test.yml
create mode 100644 .github/workflows/npm_audit_test.yml
diff --git a/.circleci/config.yml b/.circleci/config.yml
index a91a813b39..49e455ec86 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -30,29 +30,6 @@ executors:
- network.host: 127.0.0.1
- http.port: 9200
- discovery.type: single-node
- accessibility_test_exec:
- docker:
- - image: cimg/base:stable-20.04
- auth:
- username: dockstoretestuser
- password: $DOCKERHUB_PASSWORD
- - image: cimg/postgres:13.3
- command: postgres -c max_connections=200 -c jit=off
- auth:
- username: dockstoretestuser
- password: $DOCKERHUB_PASSWORD
- environment:
- POSTGRES_USER: postgres
- POSTGRES_DB: postgres
- POSTGRES_PASSWORD: postgres
- POSTGRES_HOST_AUTH_METHOD: trust
- - image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
- environment:
- - xpack.security.enabled: false
- - transport.host: localhost
- - network.host: 127.0.0.1
- - http.port: 9200
- - discovery.type: single-node
jobs:
# Specify the webpage url (https://dev.dockstore.net or https://staging.dockstore.org or https://dockstore.org)
@@ -69,7 +46,6 @@ jobs:
password: $DOCKERHUB_PASSWORD
steps:
- setup_nightly_tests
- - install_cypress_dependencies
- run:
name: Run remote verification test against << parameters.stack >> (no auth)
command: bash -i -c 'npm run test-<< parameters.stack >>-no-auth'
@@ -104,7 +80,6 @@ jobs:
password: $DOCKERHUB_PASSWORD
steps:
- setup_nightly_tests
- - install_cypress_dependencies
- run:
name: Run remote verification test against << parameters.stack >> (with auth)
command: bash -i -c 'npm run test-<< parameters.stack >>-auth'
@@ -124,34 +99,6 @@ jobs:
event: pass
template: basic_success_1
- audit:
- working_directory: ~/repo
- docker:
- - image: cimg/base:stable-20.04
- auth:
- username: dockstoretestuser
- password: $DOCKERHUB_PASSWORD
- steps:
- - checkout
- - browser-tools/install-chrome
- - browser-tools/install-chromedriver
- - run:
- name: Checkout merge commit (PRs only)
- command: |
- if [[ -n "${CIRCLE_PULL_REQUEST}" ]]
- then
- git fetch origin +refs/pull/${CIRCLE_PULL_REQUEST##*/}/merge:
- git checkout -qf FETCH_HEAD
- fi
- - install_container_dependencies
- - run:
- name: Run npm audit
- # Run npm audit on current branch and compare it with the results of running npm audit on the base branch that is set in the package.json. If there are more
- # high or critical findings in the current branch, then the test fails. If the same number of findings are found, then check that the vulnerabilities are the same.
- # If they are are different, then the test fails.
- command: |
- bash -i -c "npm run compare-audits"
-
lint_license_unit_test_coverage:
working_directory: ~/repo
docker:
@@ -161,27 +108,10 @@ jobs:
password: $DOCKERHUB_PASSWORD
steps:
- checkout
- - browser-tools/install-chrome
- - browser-tools/install-chromedriver
- - run:
- name: Checkout merge commit (PRs only)
- command: |
- if [[ -n "${CIRCLE_PULL_REQUEST}" ]]
- then
- git fetch origin +refs/pull/${CIRCLE_PULL_REQUEST##*/}/merge:
- git checkout -qf FETCH_HEAD
- fi
+ - install_browser_tools
+ - checkout_merge_commit
- install_container_dependencies
- - restore_cache:
- key: dep-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
- - run:
- name: Install dependencies
- #Only run 'npm ci' if node_modules was not restored from cache
- command: |
- if [ ! -d "./node_modules" ]
- then
- bash -i -c 'npm ci'
- fi
+ - install_ui_dependencies
- save_cache:
key: dep-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
paths:
@@ -202,9 +132,7 @@ jobs:
command: |
bash -i -c 'npm run circle-ci-license-test-file'
bash scripts/detect-package-json-changes.sh
- - run:
- name: Build
- command: NODE_OPTIONS="--max-old-space-size=1610" bash -i -c 'npm run build.prod'
+ - build_ui
- run:
name: Install codecov
command: bash -i -c 'npm i --no-save codecov'
@@ -218,140 +146,31 @@ jobs:
root: .
paths:
- .
- integration_test_1:
- executor: integration_test_exec
- working_directory: ~/repo
- steps:
- - setup_integration_test
- - restore_cache:
- key: cypress-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
- - run:
- name: Test
- command: bash -i -c 'npx cypress run --record --config numTestsKeptInMemory=1 --reporter junit --spec cypress/e2e/group1/**/*'
- no_output_timeout: 30m
- environment:
- MOCHA_FILE: integration-tests/test-results/junit/test-results-[hash].xml
- when: always
- - upload_artifacts
- integration_test_2:
- executor: integration_test_exec
- working_directory: ~/repo
- steps:
- - setup_integration_test
- - restore_cache:
- key: cypress-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
- - run:
- name: Test
- command: bash -i -c 'npx cypress run --record --config numTestsKeptInMemory=1 --reporter junit --spec cypress/e2e/group2/**/*'
- no_output_timeout: 30m
- environment:
- MOCHA_FILE: integration-tests/test-results/junit/test-results-[hash].xml
- when: always
- - upload_artifacts
- integration_test_3:
- executor: integration_test_exec
- working_directory: ~/repo
- steps:
- - setup_integration_test
- - restore_cache:
- key: cypress-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
- - run:
- name: Test
- command: bash -i -c 'npx cypress run --record --config numTestsKeptInMemory=1 --reporter junit --spec cypress/e2e/group3/**/*'
- no_output_timeout: 30m
- environment:
- MOCHA_FILE: integration-tests/test-results/junit/test-results-[hash].xml
- when: always
- - upload_artifacts
- integration_test_4:
+
+ # Reusable job to run integration tests. Specify the integration test folder name (examples: group1, group2, etc.)
+ integration_test:
+ parameters:
+ integration_test_name:
+ description: The name of the folder containing the integration tests to run
+ type: string
executor: integration_test_exec
working_directory: ~/repo
steps:
- setup_integration_test
- - restore_cache:
- key: cypress-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
- run:
name: Test
- command: bash -i -c 'npx cypress run --record --config numTestsKeptInMemory=1 --reporter junit --spec cypress/e2e/immutableDatabaseTests/**/*'
+ command: bash -i -c 'npx cypress run --record --config numTestsKeptInMemory=1 --reporter junit --spec cypress/e2e/<< parameters.integration_test_name >>/**/*'
no_output_timeout: 30m
environment:
MOCHA_FILE: integration-tests/test-results/junit/test-results-[hash].xml
when: always
- upload_artifacts
- accessibility_test:
- resource_class: medium+
- executor: accessibility_test_exec
- working_directory: ~/repo
- parameters:
- db_dump:
- type: string
- default: "db_dump.sql"
- steps:
- - checkout
- - install_container_dependencies
- - prepare_accessibility_test
- - run:
- name: Run accesibility test on current branch
- command: bash -i -c "npm run accessibility-test -- -R"
- - persist_to_workspace:
- root: .
- paths:
- - accessibility-results
- - store_artifacts:
- path: accessibility-results
-
- accessibility_test_base:
- resource_class: medium+
- executor: accessibility_test_exec
- working_directory: ~/repo
- steps:
- - checkout
- - checkout:
- path: accessibility
- - install_container_dependencies
- - run:
- name: Checkout base branch
- command: bash -i -c "npm run accessibility-test -- -C"
- - prepare_accessibility_test
- - run:
- name: Run accesibility test on base branch
- command: bash -i -c "npm run accessibility-test -- -RB"
- working_directory: accessibility
- - persist_to_workspace:
- root: accessibility
- paths:
- - accessibility-results
- - store_artifacts:
- path: accessibility/accessibility-results
-
- compare_accessibility_results:
- working_directory: ~/repo
- docker:
- - image: cimg/base:stable-20.04
- auth:
- username: dockstoretestuser
- password: $DOCKERHUB_PASSWORD
- steps:
- - checkout
- - run:
- name: Install npm
- command: |
- wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
- bash -i -c 'nvm install'
- - get_workspace
- - store_artifacts:
- path: accessibility-results
- - run:
- name: Compare accessibility results
- command: bash -i -c "npm run accessibility-test -- -A"
local_smoke_tests:
executor: integration_test_exec
working_directory: ~/repo
steps:
- setup_smoke_tests
- - restore_cache:
- key: cypress-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
- run:
name: Run local smoke tests (no auth)
command: bash -i -c 'npm run test-local-no-auth'
@@ -416,9 +235,7 @@ jobs:
- run:
name: set webservice to develop
command: bash -i -c 'npm config set dockstore-ui2:webservice_version develop'
- - run:
- name: Build
- command: NODE_OPTIONS="--max-old-space-size=1610" bash -i -c 'npm run build.prod'
+ - build_ui
parameters:
run_nightly_auth:
@@ -438,19 +255,15 @@ workflows:
- << pipeline.parameters.run_nightly_no_auth >>
jobs:
# Add the tags filter to all jobs so they will run before upload_to_s3
- - audit:
- filters:
- tags:
- only: /.*/
- context:
- - dockerhub
- lint_license_unit_test_coverage:
filters:
tags:
only: /.*/
context:
- dockerhub
- - integration_test_1:
+ - integration_test:
+ name: integration_test_1
+ integration_test_name: group1
filters:
tags:
only: /.*/
@@ -458,7 +271,9 @@ workflows:
- lint_license_unit_test_coverage
context:
- dockerhub
- - integration_test_2:
+ - integration_test:
+ name: integration_test_2
+ integration_test_name: group2
filters:
tags:
only: /.*/
@@ -466,7 +281,9 @@ workflows:
- lint_license_unit_test_coverage
context:
- dockerhub
- - integration_test_3:
+ - integration_test:
+ name: integration_test_3
+ integration_test_name: group3
filters:
tags:
only: /.*/
@@ -474,7 +291,9 @@ workflows:
- lint_license_unit_test_coverage
context:
- dockerhub
- - integration_test_4:
+ - integration_test:
+ name: integration_test_4
+ integration_test_name: immutableDatabaseTests
filters:
tags:
only: /.*/
@@ -482,21 +301,6 @@ workflows:
- lint_license_unit_test_coverage
context:
- dockerhub
- - accessibility_test:
- filters:
- tags:
- only: /.*/
- - accessibility_test_base:
- filters:
- tags:
- only: /.*/
- - compare_accessibility_results:
- filters:
- tags:
- only: /.*/
- requires:
- - accessibility_test_base
- - accessibility_test
- local_smoke_tests:
filters:
tags:
@@ -508,7 +312,6 @@ workflows:
# Upload builds for tags and branches to s3.
- upload_to_s3:
requires:
- - audit
- lint_license_unit_test_coverage
filters:
tags:
@@ -584,50 +387,6 @@ commands:
command: |
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
bash -i -c 'nvm install'
- prepare_accessibility_test:
- parameters:
- db_dump:
- type: string
- default: "db_dump.sql"
- steps:
- - browser-tools/install-chrome
- - browser-tools/install-chromedriver
- - restore_cache:
- key: dep-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
- - run:
- name: Install dependencies
- command: bash -i -c 'npm ci'
- - run:
- name: Build
- command: NODE_OPTIONS="--max-old-space-size=1610" bash -i -c 'npm run build.prod'
- no_output_timeout: 30m
- - run:
- name: Install postgresql client
- command: sudo apt install -y postgresql-client || true
- - run:
- name: Prepare webservice
- command: bash -i -c 'DB_DUMP=<< parameters.db_dump >> npm run webservice'
- environment:
- PAGER: cat # prevent psql commands using less https://stackoverflow.com/questions/53055044/rails-rake-dbstructureload-times-out-on-circleci-2-0
- - run:
- name: Install nginx
- command: sudo apt install -y nginx || true
- - run:
- name: Prepapre nginx config
- command: sed "s%REPLACEME%`pwd`%" .circleci/nginx.conf.tmpl > .circleci/nginx.conf
- - run:
- name: Run nginx
- command: sudo nginx -c `pwd`/.circleci/nginx.conf
- background: true
- - run:
- name: Run webservice
- command: java -jar dockstore-webservice.jar server test/web.yml 1>/dev/null
- background: true
- - run: mkdir -p integration-tests/test-results/junit
- - run:
- name: Wait for services
- command: bash scripts/wait-for.sh
-
get_workspace:
steps:
- attach_workspace:
@@ -653,14 +412,77 @@ commands:
type: string
default: "db_dump.sql"
steps:
- - browser-tools/install-chrome
- - browser-tools/install-chromedriver
+ - install_browser_tools
- get_workspace
- install_container_dependencies
+ - install_cypress_dependencies
+ - run_services:
+ db_dump: << parameters.db_dump >>
+ - run: mkdir -p integration-tests/test-results/junit
+ - restore_cypress_cache
+ setup_nightly_tests:
+ steps:
+ - checkout
+ - install_browser_tools
+ - install_container_dependencies
+ - install_cypress_dependencies
+ - restore_cypress_cache
+ - install_ui_dependencies
+ - run:
+ name: Create test results directory
+ command: mkdir -p nightly-test-results/junit
+ - run:
+ name: Prebuild
+ command: bash -i -c 'npm run prebuild.prod'
+ setup_smoke_tests:
+ steps:
+ - setup_integration_test:
+ db_dump: "smoke_test_db.sql"
+ - run:
+ name: Index ES
+ command: |
+ curl -X POST "localhost:4200/api/api/ga4gh/v2/extended/tools/index" -H "accept: text/plain" -H "Authorization: Bearer fake-admin-token"
+ requires:
+ - setup_integration_test
+ upload_nightly_artifacts:
+ steps:
+ - store_test_results:
+ path: nightly-test-results/
+ - store_artifacts:
+ path: nightly-test-results/
+ - store_artifacts:
+ path: cypress/videos
+ - store_artifacts:
+ path: cypress/screenshots
+ install_ui_dependencies:
+ steps:
+ - restore_dep_cache
+ - run:
+ name: Install dependencies
+ #Only run 'npm ci' if node_modules was not restored from cache
+ command: |
+ if [ ! -d "./node_modules" ]
+ then
+ bash -i -c 'npm ci'
+ fi
+ install_browser_tools:
+ steps:
+ - browser-tools/install-chrome
+ - browser-tools/install-chromedriver
+ build_ui:
+ steps:
+ - run:
+ name: Build
+ command: NODE_OPTIONS="--max-old-space-size=1610" bash -i -c 'npm run build.prod'
+ run_services:
+ parameters:
+ db_dump:
+ type: string
+ default: "db_dump.sql"
+ steps:
- run:
name: Install postgresql client
command: sudo apt install -y postgresql-client || true
- - install_cypress_dependencies
- run:
name: Prepare webservice
command: bash -i -c 'DB_DUMP=<< parameters.db_dump >> npm run webservice'
@@ -680,47 +502,24 @@ commands:
name: Run webservice
command: java -jar dockstore-webservice.jar server test/web.yml 1>/dev/null
background: true
- - run: mkdir -p integration-tests/test-results/junit
- run:
name: Wait for services
command: bash scripts/wait-for.sh
- setup_nightly_tests:
+ restore_cypress_cache:
steps:
- - checkout
- - browser-tools/install-chrome
- - browser-tools/install-chromedriver
- - install_container_dependencies
- restore_cache:
key: cypress-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
+ restore_dep_cache:
+ steps:
+ - restore_cache:
+ key: dep-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "./package-lock.json" }}
+ checkout_merge_commit:
+ steps:
- run:
- name: Install dependencies
- #Only run 'npm ci' if node_modules was not restored from cache
+ name: Checkout merge commit (PRs only)
command: |
- if [ ! -d "./node_modules" ]
+ if [[ -n "${CIRCLE_PULL_REQUEST}" ]]
then
- bash -i -c 'npm ci'
+ git fetch origin +refs/pull/${CIRCLE_PULL_REQUEST##*/}/merge:
+ git checkout -qf FETCH_HEAD
fi
- mkdir -p nightly-test-results/junit
- - run:
- name: Prebuild
- command: bash -i -c 'npm run prebuild.prod'
- setup_smoke_tests:
- steps:
- - setup_integration_test:
- db_dump: "smoke_test_db.sql"
- - run:
- name: Index ES
- command: |
- curl -X POST "localhost:4200/api/api/ga4gh/v2/extended/tools/index" -H "accept: text/plain" -H "Authorization: Bearer fake-admin-token"
- requires:
- - setup_integration_test
- upload_nightly_artifacts:
- steps:
- - store_test_results:
- path: nightly-test-results/
- - store_artifacts:
- path: nightly-test-results/
- - store_artifacts:
- path: cypress/videos
- - store_artifacts:
- path: cypress/screenshots
diff --git a/.github/workflows/accessibility_test.yml b/.github/workflows/accessibility_test.yml
new file mode 100644
index 0000000000..5285131445
--- /dev/null
+++ b/.github/workflows/accessibility_test.yml
@@ -0,0 +1,131 @@
+name: Accessibility test
+
+on: pull_request
+
+jobs:
+ run-accessibility-test:
+ strategy:
+ matrix:
+ # Run against the current branch (represented by '', which will use the default ref when using the checkout action) and the base branch
+ branch: [ '', '${{ github.base_ref }}' ]
+
+ # Uses if/else expression evaluation workaround from https://github.com/actions/runner/issues/409#issuecomment-752775072
+ # 'matrix.branch == github.base_ref' is the condition, 'base' is the true value and 'current' is the false value
+ name: Accessibility test (${{ matrix.branch == github.base_ref && 'base' || 'current' }} branch)
+
+ runs-on: ubuntu-20.04
+ services:
+ postgres:
+ image: postgres:13.3
+ env:
+ POSTGRES_USER: postgres
+ POSTGRES_DB: postgres
+ POSTGRES_PASSWORD: postgres
+ POSTGRES_HOST_AUTH_METHOD: trust
+ ports:
+ # Maps tcp port 5432 on service container to the host
+ - 5432:5432
+ elasticsearch:
+ image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
+ env:
+ xpack.security.enabled: false
+ transport.host: localhost
+ network.host: 127.0.0.1
+ http.port: 9200
+ discovery.type: single-node
+
+ steps:
+ - name: Checkout branch
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ matrix.branch }}
+
+ - name: Install browser
+ uses: browser-actions/setup-chrome@v1
+
+ - name: Set up JDK
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17.0.4+8'
+ distribution: 'adopt'
+
+ - name: Install npm
+ uses: actions/setup-node@v3
+ with:
+ node-version-file: '.nvmrc'
+
+ - name: Cache dependencies
+ id: cache-dependencies
+ uses: actions/cache@v3
+ env:
+ cache-version: version1
+ with:
+ path: ./node_modules
+ key: dep-cache-${{ env.cache-version }}-${{ hashFiles('**/package-lock.json') }}
+
+ - if: ${{ steps.cache-dependencies.outputs.cache-hit != 'true' }}
+ name: Install dependencies if cache miss
+ run: npm ci
+
+ - name: Build
+ run: NODE_OPTIONS="--max-old-space-size=1610" npm run build.prod
+
+ # Run the services
+ - name: Install postgresql client
+ run: sudo apt install -y postgresql-client || true
+
+ - name: Prepare webservice
+ run: DB_DUMP="db_dump.sql" npm run webservice
+
+ - name: Install nginx
+ run: sudo apt install -y nginx || true
+
+ - name: Prepare nginx config
+ run: sed "s%REPLACEME%`pwd`%" .circleci/nginx.conf.tmpl > .circleci/nginx.conf
+
+ - name: Run nginx
+ run: sudo nginx -c `pwd`/.circleci/nginx.conf &
+
+ - name: Run webservice
+ run: java -jar dockstore-webservice.jar server test/web.yml 1>/dev/null &
+
+ - name: Wait for services
+ run: bash scripts/wait-for.sh
+
+ - name: Run accessibility test
+ run: |
+ if [[ "${{ matrix.branch }}" == "$GITHUB_BASE_REF" ]]; then
+ echo "Running accessibility test for base branch"
+ npm run accessibility-test -- -RB
+ else
+ echo "Running accessibility test for current branch"
+ npm run accessibility-test -- -R
+ fi
+
+ - name: Save accessibility results
+ uses: actions/upload-artifact@v3
+ with:
+ name: accessibility-results
+ path: accessibility-results/
+
+ compare_accessibility_results:
+ needs: run-accessibility-test
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Install npm
+ uses: actions/setup-node@v3
+ with:
+ node-version-file: '.nvmrc'
+
+ - name: Download accessibility results
+ uses: actions/download-artifact@v3
+ with:
+ name: accessibility-results
+ # Download to this directory because this is the directory that the accessibility script looks at for the results
+ path: accessibility-results
+
+ - name: Compare accessibility results
+ run: npm run accessibility-test -- -A
+
\ No newline at end of file
diff --git a/.github/workflows/npm_audit_test.yml b/.github/workflows/npm_audit_test.yml
new file mode 100644
index 0000000000..b4367cebff
--- /dev/null
+++ b/.github/workflows/npm_audit_test.yml
@@ -0,0 +1,26 @@
+name: npm audit test
+
+on: pull_request
+
+jobs:
+ npm-audit-test:
+ name: npm audit test
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout branch
+ uses: actions/checkout@v3
+ with:
+ # Fetches all history for all branches and tags
+ # Needed because the audit script checks out the base branch
+ fetch-depth: 0
+
+ - name: Install npm
+ uses: actions/setup-node@v3
+ with:
+ node-version-file: '.nvmrc'
+
+ - name: Run npm audit
+ # Run npm audit on current branch and compare it with the results of running npm audit on the base branch that is set in the built-in $GITHUB_BASE_REF environment variable.
+ # If there are more high or critical findings in the current branch, then the test fails. If the same number of findings are found, then check that the vulnerabilities are the same.
+ # If they are are different, then the test fails.
+ run: npm run compare-audits -- $GITHUB_BASE_REF
diff --git a/package.json b/package.json
index be9ef54ae7..3bf13818fc 100644
--- a/package.json
+++ b/package.json
@@ -6,8 +6,7 @@
"webservice_version": "1.15.0",
"use_circle": true,
"circle_ci_source": "https://app.circleci.com/pipelines/github/dockstore/dockstore/9918/workflows/b8714bc1-49a2-424d-8b14-527bc3d4a4e3/jobs/33676/artifacts",
- "circle_build_id": "33676",
- "base_branch": "develop"
+ "circle_build_id": "33676"
},
"scripts": {
"ng": "npx ng",
diff --git a/scripts/npm-audit-comparison.sh b/scripts/npm-audit-comparison.sh
index 3b96f13c00..02afd3cef2 100755
--- a/scripts/npm-audit-comparison.sh
+++ b/scripts/npm-audit-comparison.sh
@@ -4,6 +4,13 @@ set -o pipefail
set -o nounset
set -o xtrace
+if [[ -z ${1} ]]; then
+ echo "Usage: $0 "
+ exit 1
+fi
+
+BASE_BRANCH="${1}"
+
# Run npm audit on current branch and compare it with the results of running npm audit on the base branch that is set in the package.json. If there are more
# high or critical findings in the current branch, then the test fails. If the same number of findings are found, then check that the vulnerabilities are the same.
# If they are are different, then the test fails.
@@ -22,7 +29,7 @@ echo $HIGH_VULN > compare-num-vulnerabilities.txt
echo $CRITICAL_VULN >> compare-num-vulnerabilities.txt
# Save high and critical vulns from the base branch (e.g. develop, hotfix/1.11.2)
-git checkout "$npm_package_config_base_branch"
+git checkout "${BASE_BRANCH}"
npm ci
npm audit | grep -E "(High)" -B3 -A10 > base-branch-high-vulnerabilities.txt || true
npm audit | grep -E "(Critical)" -B3 -A10 > base-branch-critical-vulnerabilities.txt || true
diff --git a/scripts/run-pa11y-ci.sh b/scripts/run-pa11y-ci.sh
index e490e83a24..47e303e2a0 100755
--- a/scripts/run-pa11y-ci.sh
+++ b/scripts/run-pa11y-ci.sh
@@ -3,7 +3,7 @@
set -o errexit
set -o pipefail
set -o nounset
-#set -o xtrace
+set -o xtrace
# Run pa11y-ci shows any accessibility issues related to the UI.
# NOTE: This script will not be useful if you are running it locally,
@@ -20,7 +20,6 @@ usage() {
echo ""
echo "-H, Display help command"
echo "-B, Do all commands on base branch (if this option is not given all commands are done on current branch)"
- echo "-C, Checkouts the code from the base branch (note: the option -B is not required to do this)"
echo "-R, Runs pa11y-ci on branch (requires webservice to be running) and outputs results in a form that can be analysed"
echo "-A, Determines if current branch has more accessibility issues then base branch, requires the results from option -R to be available"
}
@@ -30,7 +29,7 @@ RUN_ACCESSIBILITY_TEST="false"
COMPARE_RESULTS="false"
no_args="true"
-while getopts 'HBCRA' OPTION; do
+while getopts 'HBRA' OPTION; do
case "$OPTION" in
H)
usage
@@ -39,11 +38,6 @@ while getopts 'HBCRA' OPTION; do
B)
RESULT_FILE="$BASE_BRANCH_RESULT_FILE_NAME"
;;
- C)
- git checkout "$npm_package_config_base_branch"
- echo "The base branch has been checked out, all other flags (if any) have been ignored"
- exit 0
- ;;
R)
RUN_ACCESSIBILITY_TEST="true"
if [ "$COMPARE_RESULTS" == "true" ]
From 36277b681e3a362d0f97e3386b00d7df6a86b018 Mon Sep 17 00:00:00 2001
From: Charles Overbeck
Date: Fri, 2 Jun 2023 09:16:50 -0700
Subject: [PATCH 020/128] Display correct message for no stargazers (#1792)
#5535
The "organization" property doesn't exist, so it's undefined, not null,
which caused it to display the text "organization".
Also got rid of an any.
---
src/app/stargazers/stargazers.component.html | 2 +-
src/app/stargazers/stargazers.component.ts | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/app/stargazers/stargazers.component.html b/src/app/stargazers/stargazers.component.html
index abd2a97ab8..723d4eb64f 100644
--- a/src/app/stargazers/stargazers.component.html
+++ b/src/app/stargazers/stargazers.component.html
@@ -20,7 +20,7 @@
warning
- There are no stargazers for this {{ organization !== null ? 'organization' : 'entry' }}.
+ There are no stargazers for this entry.
info This collection is part of an organization that is pending approval by a Dockstore curator.
@@ -93,15 +93,18 @@
-
+ info This collection has no associated entries. To add an entry, navigate to the public page of the tool or
workflow you want to add and select `Add to collection`
info This collection is part of an organization that is pending approval by a Dockstore curator.
@@ -93,21 +90,16 @@
-
+ info This collection has no associated entries. To add an entry, navigate to the public page of the tool or
workflow you want to add and select `Add to collection`