From 2736258a804a4fd0cca6f6ae3522c9cd03661559 Mon Sep 17 00:00:00 2001 From: Kathy Tran Date: Thu, 22 Aug 2024 11:01:54 -0400 Subject: [PATCH 01/13] Reset version --- dockstore-common/generated/src/main/resources/pom.xml | 2 +- .../generated/src/main/resources/pom.xml | 10 +++++----- .../generated/src/main/resources/pom.xml | 4 ++-- .../generated/src/main/resources/pom.xml | 6 +++--- .../src/main/resources/openapi3/openapi.yaml | 2 +- .../generated/src/main/resources/pom.xml | 4 ++-- reports/generated/src/main/resources/pom.xml | 8 ++++---- .../generated/src/main/resources/pom.xml | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dockstore-common/generated/src/main/resources/pom.xml b/dockstore-common/generated/src/main/resources/pom.xml index 7f460d7f5c..174149472f 100644 --- a/dockstore-common/generated/src/main/resources/pom.xml +++ b/dockstore-common/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-common - 1.15.4 + 1.15.0-SNAPSHOT Apache Software License, Version 2.0 diff --git a/dockstore-integration-testing/generated/src/main/resources/pom.xml b/dockstore-integration-testing/generated/src/main/resources/pom.xml index d9d8718b60..cf131d1143 100644 --- a/dockstore-integration-testing/generated/src/main/resources/pom.xml +++ b/dockstore-integration-testing/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-integration-testing - 1.15.4 + 1.15.0-SNAPSHOT Apache Software License, Version 2.0 @@ -72,25 +72,25 @@ io.dockstore swagger-java-client - 1.15.4 + 1.15.0-SNAPSHOT compile io.dockstore dockstore-common - 1.15.4 + 1.15.0-SNAPSHOT compile io.dockstore dockstore-webservice - 1.15.4 + 1.15.0-SNAPSHOT compile io.dockstore openapi-java-client - 1.15.4 + 1.15.0-SNAPSHOT compile diff --git a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml index d4960808cd..2e62f3741e 100644 --- a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml +++ b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-language-plugin-parent - 1.15.4 + 1.15.0-SNAPSHOT Apache Software License, Version 2.0 @@ -30,7 +30,7 @@ io.dockstore dockstore-common - 1.15.4 + 1.15.0-SNAPSHOT compile diff --git a/dockstore-webservice/generated/src/main/resources/pom.xml b/dockstore-webservice/generated/src/main/resources/pom.xml index f6caf6407b..14487b7e5f 100644 --- a/dockstore-webservice/generated/src/main/resources/pom.xml +++ b/dockstore-webservice/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-webservice - 1.15.4 + 1.15.0-SNAPSHOT Apache Software License, Version 2.0 @@ -90,13 +90,13 @@ io.dockstore dockstore-common - 1.15.4 + 1.15.0-SNAPSHOT compile io.dockstore dockstore-language-plugin-parent - 1.15.4 + 1.15.0-SNAPSHOT compile diff --git a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml index 46b13e55c5..062f011ac8 100644 --- a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml +++ b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml @@ -13,7 +13,7 @@ info: url: https://github.com/dockstore/dockstore/blob/develop/LICENSE termsOfService: https://github.com/dockstore/dockstore-ui2/raw/develop/src/assets/docs/Dockstore_Terms_of_Service.pdf title: Dockstore API - version: 1.15.4 + version: 1.15.0-SNAPSHOT servers: - description: Current server when hosted on AWS url: /api diff --git a/openapi-java-client/generated/src/main/resources/pom.xml b/openapi-java-client/generated/src/main/resources/pom.xml index aa86d68dc8..b86c9b6d24 100644 --- a/openapi-java-client/generated/src/main/resources/pom.xml +++ b/openapi-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore openapi-java-client - 1.15.4 + 1.15.0-SNAPSHOT Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.15.4 + 1.15.0-SNAPSHOT provided diff --git a/reports/generated/src/main/resources/pom.xml b/reports/generated/src/main/resources/pom.xml index 4eb969e3f9..0442b1bf03 100644 --- a/reports/generated/src/main/resources/pom.xml +++ b/reports/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore reports - 1.15.4 + 1.15.0-SNAPSHOT Apache Software License, Version 2.0 @@ -30,19 +30,19 @@ io.dockstore dockstore-webservice - 1.15.4 + 1.15.0-SNAPSHOT compile io.dockstore dockstore-common - 1.15.4 + 1.15.0-SNAPSHOT compile io.dockstore dockstore-integration-testing - 1.15.4 + 1.15.0-SNAPSHOT compile diff --git a/swagger-java-client/generated/src/main/resources/pom.xml b/swagger-java-client/generated/src/main/resources/pom.xml index 7aaaeeb274..6677c9bdef 100644 --- a/swagger-java-client/generated/src/main/resources/pom.xml +++ b/swagger-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore swagger-java-client - 1.15.4 + 1.15.0-SNAPSHOT Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.15.4 + 1.15.0-SNAPSHOT provided From 2c20b24adf951367bba95983c616e9cb8f66c000 Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Thu, 31 Oct 2024 14:28:04 -0400 Subject: [PATCH 02/13] Reset version --- dockstore-common/generated/src/main/resources/pom.xml | 2 +- .../generated/src/main/resources/pom.xml | 10 +++++----- .../generated/src/main/resources/pom.xml | 4 ++-- .../generated/src/main/resources/pom.xml | 6 +++--- .../src/main/resources/openapi3/openapi.yaml | 2 +- .../generated/src/main/resources/pom.xml | 4 ++-- reports/generated/src/main/resources/pom.xml | 8 ++++---- .../generated/src/main/resources/pom.xml | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dockstore-common/generated/src/main/resources/pom.xml b/dockstore-common/generated/src/main/resources/pom.xml index ad6ed31e1e..1302bc632a 100644 --- a/dockstore-common/generated/src/main/resources/pom.xml +++ b/dockstore-common/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-common - 1.16.0 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 diff --git a/dockstore-integration-testing/generated/src/main/resources/pom.xml b/dockstore-integration-testing/generated/src/main/resources/pom.xml index 1ef3a1ef10..f6bd131c54 100644 --- a/dockstore-integration-testing/generated/src/main/resources/pom.xml +++ b/dockstore-integration-testing/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-integration-testing - 1.16.0 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -72,25 +72,25 @@ io.dockstore swagger-java-client - 1.16.0 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-common - 1.16.0 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-webservice - 1.16.0 + 1.16.0-SNAPSHOT compile io.dockstore openapi-java-client - 1.16.0 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml index 2decbcced3..c94e5d1863 100644 --- a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml +++ b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-language-plugin-parent - 1.16.0 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -30,7 +30,7 @@ io.dockstore dockstore-common - 1.16.0 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-webservice/generated/src/main/resources/pom.xml b/dockstore-webservice/generated/src/main/resources/pom.xml index 36c251b134..b715bb04bc 100644 --- a/dockstore-webservice/generated/src/main/resources/pom.xml +++ b/dockstore-webservice/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-webservice - 1.16.0 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -90,13 +90,13 @@ io.dockstore dockstore-common - 1.16.0 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-language-plugin-parent - 1.16.0 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml index e3de14f7bf..af6bc9f9c2 100644 --- a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml +++ b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml @@ -13,7 +13,7 @@ info: url: https://github.com/dockstore/dockstore/blob/develop/LICENSE termsOfService: https://github.com/dockstore/dockstore-ui2/raw/develop/src/assets/docs/Dockstore_Terms_of_Service.pdf title: Dockstore API - version: 1.16.0 + version: 1.16.0-SNAPSHOT servers: - description: Current server when hosted on AWS url: /api diff --git a/openapi-java-client/generated/src/main/resources/pom.xml b/openapi-java-client/generated/src/main/resources/pom.xml index 49771babc8..e143bfdb88 100644 --- a/openapi-java-client/generated/src/main/resources/pom.xml +++ b/openapi-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore openapi-java-client - 1.16.0 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.0 + 1.16.0-SNAPSHOT provided diff --git a/reports/generated/src/main/resources/pom.xml b/reports/generated/src/main/resources/pom.xml index f0361928e2..716a19e51d 100644 --- a/reports/generated/src/main/resources/pom.xml +++ b/reports/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore reports - 1.16.0 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -30,19 +30,19 @@ io.dockstore dockstore-webservice - 1.16.0 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-common - 1.16.0 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-integration-testing - 1.16.0 + 1.16.0-SNAPSHOT compile diff --git a/swagger-java-client/generated/src/main/resources/pom.xml b/swagger-java-client/generated/src/main/resources/pom.xml index c621921622..9b66266326 100644 --- a/swagger-java-client/generated/src/main/resources/pom.xml +++ b/swagger-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore swagger-java-client - 1.16.0 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.0 + 1.16.0-SNAPSHOT provided From f62867c5a42b0b658520a7e28b27185f646fff38 Mon Sep 17 00:00:00 2001 From: Steve Von Worley Date: Mon, 2 Dec 2024 13:57:25 -0800 Subject: [PATCH 03/13] improve relative readMePath error message https://ucsc-cgl.atlassian.net/browse/DOCK-2571 #5982 --- .../src/main/java/io/dockstore/common/yaml/YamlNotebook.java | 1 + .../src/main/java/io/dockstore/common/yaml/YamlWorkflow.java | 1 + .../io/dockstore/common/yaml/constraints/AbsolutePath.java | 2 +- .../test/java/io/dockstore/common/yaml/DockstoreYamlTest.java | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlNotebook.java b/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlNotebook.java index 9ec87c9e74..6ecaaf636e 100644 --- a/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlNotebook.java +++ b/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlNotebook.java @@ -188,6 +188,7 @@ public String getPrimaryDescriptorPath() { } @Override + @AbsolutePath public String getReadMePath() { return readMePath; } diff --git a/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlWorkflow.java b/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlWorkflow.java index e581e0dfcc..1d35534c98 100644 --- a/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlWorkflow.java +++ b/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlWorkflow.java @@ -133,6 +133,7 @@ public void setLatestTagAsDefault(boolean latestTagAsDefault) { } @Override + @AbsolutePath public String getReadMePath() { return readMePath; } diff --git a/dockstore-common/src/main/java/io/dockstore/common/yaml/constraints/AbsolutePath.java b/dockstore-common/src/main/java/io/dockstore/common/yaml/constraints/AbsolutePath.java index 862cab1dd1..ddfc5b4579 100644 --- a/dockstore-common/src/main/java/io/dockstore/common/yaml/constraints/AbsolutePath.java +++ b/dockstore-common/src/main/java/io/dockstore/common/yaml/constraints/AbsolutePath.java @@ -32,7 +32,7 @@ @Constraint(validatedBy = AbsolutePathValidator.class) public @interface AbsolutePath { - String message() default "the path must be an absolute path to be valid"; + String message() default "must be an absolute path to be valid"; Class[] groups() default {}; Class[] payload() default {}; diff --git a/dockstore-common/src/test/java/io/dockstore/common/yaml/DockstoreYamlTest.java b/dockstore-common/src/test/java/io/dockstore/common/yaml/DockstoreYamlTest.java index 45cc385aec..1254688890 100644 --- a/dockstore-common/src/test/java/io/dockstore/common/yaml/DockstoreYamlTest.java +++ b/dockstore-common/src/test/java/io/dockstore/common/yaml/DockstoreYamlTest.java @@ -207,7 +207,7 @@ void testRelativePrimaryDescriptor() { } catch (DockstoreYamlHelper.DockstoreYamlException e) { // check that the error message contains the name of the property and an appropriate adjective assertTrue(e.getMessage().contains("primaryDescriptor")); - assertTrue(e.getMessage().contains("the path must be an absolute path to be valid")); + assertTrue(e.getMessage().contains("must be an absolute path to be valid")); } } @@ -220,7 +220,7 @@ void testRelativeTestDescriptorPaths() { } catch (DockstoreYamlHelper.DockstoreYamlException e) { // check that the error message contains the name of the property and an appropriate adjective assertTrue(e.getMessage().contains("testParameterFiles")); - assertTrue(e.getMessage().contains("the path must be an absolute path to be valid")); + assertTrue(e.getMessage().contains("must be an absolute path to be valid")); } } From daa7b3d6b50923ec8d4fad4de1807d8261bd07cb Mon Sep 17 00:00:00 2001 From: Kathy Tran Date: Fri, 6 Dec 2024 08:14:23 -0500 Subject: [PATCH 04/13] Add enableAutoDois field to .dockstore.yml and allow disabling auto DOIs (#6045) https://ucsc-cgl.atlassian.net/browse/SEAB-6805 --- .../common/yaml/AbstractYamlService.java | 12 ++++++ .../io/dockstore/common/yaml/Workflowish.java | 1 + .../dockstore/common/yaml/YamlNotebook.java | 12 ++++++ .../dockstore/common/yaml/YamlWorkflow.java | 12 ++++++ .../common/yaml/DockstoreYamlTest.java | 20 +++++++++ .../test/resources/fixtures/dockstore12.yml | 3 ++ .../io/dockstore/webservice/ZenodoIT.java | 41 ++++++++++++++++++- .../resources/AbstractWorkflowResource.java | 6 +++ 8 files changed, 106 insertions(+), 1 deletion(-) diff --git a/dockstore-common/src/main/java/io/dockstore/common/yaml/AbstractYamlService.java b/dockstore-common/src/main/java/io/dockstore/common/yaml/AbstractYamlService.java index bde00e45e4..94eed19ab6 100644 --- a/dockstore-common/src/main/java/io/dockstore/common/yaml/AbstractYamlService.java +++ b/dockstore-common/src/main/java/io/dockstore/common/yaml/AbstractYamlService.java @@ -16,6 +16,7 @@ package io.dockstore.common.yaml; import jakarta.validation.Valid; +import jakarta.validation.constraints.AssertFalse; import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; @@ -69,6 +70,8 @@ public abstract class AbstractYamlService { private boolean latestTagAsDefault = false; + private Boolean enableAutoDois; + public String getAuthor() { return author; } @@ -158,6 +161,15 @@ public void setLatestTagAsDefault(boolean latestTagAsDefault) { this.latestTagAsDefault = latestTagAsDefault; } + @AssertFalse // TODO: Added as part of https://ucsc-cgl.atlassian.net/browse/SEAB-6805. Remove when we turn on automatic DOIs for everyone + public Boolean getEnableAutoDois() { + return enableAutoDois; + } + + public void setEnableAutoDois(Boolean enableAutoDois) { + this.enableAutoDois = enableAutoDois; + } + /** * Scripts is essentially a map, but with a known set of keys. The values are scripts that should be run at different stages * in the lifecycle of a service diff --git a/dockstore-common/src/main/java/io/dockstore/common/yaml/Workflowish.java b/dockstore-common/src/main/java/io/dockstore/common/yaml/Workflowish.java index 991cfcf73a..b0dc1f8b73 100644 --- a/dockstore-common/src/main/java/io/dockstore/common/yaml/Workflowish.java +++ b/dockstore-common/src/main/java/io/dockstore/common/yaml/Workflowish.java @@ -17,6 +17,7 @@ public interface Workflowish { Filters getFilters(); List getTestParameterFiles(); String getPrimaryDescriptorPath(); + Boolean getEnableAutoDois(); /** * Optional: Document a specific readme path that can override the base readme file. diff --git a/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlNotebook.java b/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlNotebook.java index 6ecaaf636e..2b51ca677d 100644 --- a/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlNotebook.java +++ b/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlNotebook.java @@ -21,6 +21,7 @@ import io.dockstore.common.yaml.constraints.ValidDescriptorLanguage; import io.dockstore.common.yaml.constraints.ValidDescriptorLanguageSubclass; import jakarta.validation.Valid; +import jakarta.validation.constraints.AssertFalse; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Pattern; import jakarta.validation.constraints.Size; @@ -45,6 +46,7 @@ public class YamlNotebook implements Workflowish { private List authors = new ArrayList<>(); private List testParameterFiles = new ArrayList<>(); private List otherFiles = new ArrayList<>(); + private Boolean enableAutoDois; @EntryName public String getName() { @@ -204,4 +206,14 @@ public String getTopic() { public void setTopic(String topic) { this.topic = topic; } + + @Override + @AssertFalse // TODO: Added as part of https://ucsc-cgl.atlassian.net/browse/SEAB-6805. Remove when we turn on automatic DOIs for everyone + public Boolean getEnableAutoDois() { + return enableAutoDois; + } + + public void setEnableAutoDois(Boolean enableAutoDois) { + this.enableAutoDois = enableAutoDois; + } } diff --git a/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlWorkflow.java b/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlWorkflow.java index 1d35534c98..00481eeb52 100644 --- a/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlWorkflow.java +++ b/dockstore-common/src/main/java/io/dockstore/common/yaml/YamlWorkflow.java @@ -21,6 +21,7 @@ import io.dockstore.common.yaml.constraints.EntryName; import io.dockstore.common.yaml.constraints.ValidDescriptorLanguage; import jakarta.validation.Valid; +import jakarta.validation.constraints.AssertFalse; import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; @@ -42,6 +43,7 @@ public class YamlWorkflow implements Workflowish { private String primaryDescriptorPath; private String readMePath; private String topic; + private Boolean enableAutoDois; /** * Change the workflow's publish-state, if set. @@ -149,4 +151,14 @@ public String getTopic() { public void setTopic(String topic) { this.topic = topic; } + + @Override + @AssertFalse // TODO: Added as part of https://ucsc-cgl.atlassian.net/browse/SEAB-6805. Remove when we turn on automatic DOIs for everyone + public Boolean getEnableAutoDois() { + return enableAutoDois; + } + + public void setEnableAutoDois(Boolean enableAutoDois) { + this.enableAutoDois = enableAutoDois; + } } diff --git a/dockstore-common/src/test/java/io/dockstore/common/yaml/DockstoreYamlTest.java b/dockstore-common/src/test/java/io/dockstore/common/yaml/DockstoreYamlTest.java index 1254688890..e1e315b026 100644 --- a/dockstore-common/src/test/java/io/dockstore/common/yaml/DockstoreYamlTest.java +++ b/dockstore-common/src/test/java/io/dockstore/common/yaml/DockstoreYamlTest.java @@ -33,6 +33,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.util.List; +import java.util.Objects; import java.util.Optional; import java.util.Set; import org.apache.commons.io.IOUtils; @@ -567,4 +568,23 @@ void testScalarWhereListExpected() throws DockstoreYamlHelper.DockstoreYamlExcep assertTrue(ex.getMessage().contains(DockstoreYamlHelper.BETTER_NO_SINGLE_ARGUMENT_CONSTRUCTOR_YAML_EXCEPTION_MESSAGE)); } } + + @Test + void testEnableAutoDoisMustBeFalse() { + try { + DockstoreYamlHelper.readDockstoreYaml(DOCKSTORE12_YAML.replace("enableAutoDois: false", "enableAutoDois: true"), true); + fail("Should not succeed because only false is allowed for enableAutoDois"); + } catch (DockstoreYamlHelper.DockstoreYamlException ex) { + assertTrue(ex.getMessage().contains("must be false")); + } + } + + @Test + void testDisableDoiGeneration() throws DockstoreYamlHelper.DockstoreYamlException { + final DockstoreYaml12 dockstoreYaml12 = DockstoreYamlHelper.readAsDockstoreYaml12(DOCKSTORE12_YAML, true); + assertEquals(1, dockstoreYaml12.getWorkflows().stream().map(YamlWorkflow::getEnableAutoDois).filter(Objects::nonNull).count(), + "There should be 1 workflow with enableAutoDois = false "); + assertEquals(1, dockstoreYaml12.getNotebooks().stream().map(YamlNotebook::getEnableAutoDois).filter(Objects::nonNull).count(), + "There should be 1 notebook with enableAutoDois = false "); + } } diff --git a/dockstore-common/src/test/resources/fixtures/dockstore12.yml b/dockstore-common/src/test/resources/fixtures/dockstore12.yml index 299a34c9fa..539f987ad0 100644 --- a/dockstore-common/src/test/resources/fixtures/dockstore12.yml +++ b/dockstore-common/src/test/resources/fixtures/dockstore12.yml @@ -17,6 +17,7 @@ workflows: - develop tags: - gwas* + enableAutoDois: false - name: foobar2 subclass: cwl publish: no @@ -43,6 +44,7 @@ service: multi-omic and clinical/phenotype data. It is recommended that you configure a reverse proxy to handle HTTPS publish: True + enableAutoDois: false files: - docker-compose.yml - README.md @@ -93,3 +95,4 @@ notebooks: - name: notebook1 path: /notebook1.ipynb kernel: quay.io/seqware/seqware_full/1.1 + enableAutoDois: false diff --git a/dockstore-integration-testing/src/test/java/io/dockstore/webservice/ZenodoIT.java b/dockstore-integration-testing/src/test/java/io/dockstore/webservice/ZenodoIT.java index 343871a598..d014ce6b35 100644 --- a/dockstore-integration-testing/src/test/java/io/dockstore/webservice/ZenodoIT.java +++ b/dockstore-integration-testing/src/test/java/io/dockstore/webservice/ZenodoIT.java @@ -293,6 +293,46 @@ void testAutomaticDoiCreationOnPublishGitHubApp(Hoverfly hoverfly) { assertEquals(DoiSelectionEnum.DOCKSTORE, workflow.getDoiSelection(), "DOI selection should update to DOCKSTORE since there were previously no DOIs"); } + @Test + void testDisableDoiGenerationInDockstoreYml(Hoverfly hoverfly) { + hoverfly.simulate(ZENODO_SIMULATION_SOURCE); + final ApiClient webClient = getOpenAPIWebClient(true, USER_2_USERNAME, testingPostgres); + final WorkflowsApi workflowsApi = new WorkflowsApi(webClient); + final WorkflowsApi adminWorkflowsApi = new WorkflowsApi(getOpenAPIWebClient(true, ADMIN_USERNAME, testingPostgres)); + + // Create a GitHub App workflow and enable DOI generation + handleGitHubRelease(workflowsApi, DockstoreTesting.WORKFLOW_DOCKSTORE_YML, "refs/tags/0.8", USER_2_USERNAME); + Workflow foobar2 = workflowsApi.getWorkflowByPath("github.com/" + DockstoreTesting.WORKFLOW_DOCKSTORE_YML + "/foobar2", WorkflowSubClass.BIOWORKFLOW, "versions"); + final long foobar2Id = foobar2.getId(); + final AutoDoiRequest autoDoiRequest = new AutoDoiRequest(); + autoDoiRequest.setAutoGenerateDois(true); + adminWorkflowsApi.autoGenerateDois(autoDoiRequest, foobar2Id); + + handleGitHubRelease(workflowsApi, DockstoreTesting.WORKFLOW_DOCKSTORE_YML, "refs/tags/0.8", USER_2_USERNAME); + foobar2 = workflowsApi.getWorkflowByPath("github.com/" + DockstoreTesting.WORKFLOW_DOCKSTORE_YML + "/foobar2", WorkflowSubClass.BIOWORKFLOW, "versions"); + WorkflowVersion foobar2TagVersion08 = getWorkflowVersion(foobar2, "0.8").orElse(null); + assertNotNull(foobar2TagVersion08); + + // No DOIs should've been automatically created because the workflow is unpublished + assertTrue(foobar2TagVersion08.getDois().isEmpty()); + // Publish workflow. This should create a DOI for the tag + workflowsApi.publish1(foobar2Id, new PublishRequest().publish(true)); + foobar2TagVersion08 = workflowsApi.getWorkflowVersionById(foobar2Id, foobar2TagVersion08.getId(), ""); + assertFalse(foobar2TagVersion08.isFrozen(), "Version should not be snapshotted for automatic DOI creation"); + assertNotNull(foobar2TagVersion08.getDois().get(DoiInitiator.DOCKSTORE.name()).getName()); + foobar2 = workflowsApi.getWorkflow(foobar2Id, ""); + assertEquals(DoiSelectionEnum.DOCKSTORE, foobar2.getDoiSelection(), "DOI selection should update to DOCKSTORE since there were previously no DOIs"); + + // Release a tag with a .dockstore.yml with enableAutoDois: false + handleGitHubRelease(workflowsApi, DockstoreTesting.WORKFLOW_DOCKSTORE_YML, "refs/tags/disableAutoDoiGeneration", USER_2_USERNAME); + foobar2 = workflowsApi.getWorkflow(foobar2Id, ""); + assertFalse(foobar2.isAutoGenerateDois(), "Auto DOI generation should be disabled for the workflow"); + WorkflowVersion disableDoiGenerationVersion = getWorkflowVersion(foobar2, "disableAutoDoiGeneration").orElse(null); + assertNotNull(disableDoiGenerationVersion); + // There should be no DOIs for this version + assertTrue(disableDoiGenerationVersion.getDois().isEmpty()); + } + @Test void testAutomaticDoiCreationOnPublishManualRegister(Hoverfly hoverfly) { hoverfly.simulate(ZENODO_SIMULATION_SOURCE); @@ -537,5 +577,4 @@ void testExistingConceptDoiNotOverwritten(Hoverfly hoverfly) { assertEquals(0, workflowsApi.updateDois(null).size(), "There is a new concept DOI, but the existing concept DOI takes precedence"); } - } diff --git a/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java b/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java index b76e61e512..e34a1d3410 100644 --- a/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java +++ b/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java @@ -961,6 +961,12 @@ private WorkflowAndExisted createOrGetWorkflow(Class workflowType, String reposi } } + // Update the automatic DOI creation setting if it's been disabled. Enabling is currently controlled by an admin endpoint + if (Boolean.FALSE.equals(wf.getEnableAutoDois())) { + // TODO: Added as part of https://ucsc-cgl.atlassian.net/browse/SEAB-6805. Allow enabling when we turn on automatic DOIs for everyone + workflowToUpdate.setAutoGenerateDois(wf.getEnableAutoDois()); + } + return new WorkflowAndExisted(workflowToUpdate, existingWorkflow.isPresent()); } From 9e2c31680d4d029a580d2477d7c3a6bb2783af96 Mon Sep 17 00:00:00 2001 From: Charles Overbeck Date: Wed, 11 Dec 2024 11:18:51 -0800 Subject: [PATCH 05/13] Handle expired GitHub token (#6051) Co-authored-by: Stephen Von Worley --- .../client/cli/GitHubWorkflowIT.java | 2 +- .../io/dockstore/webservice/WebhookIT.java | 28 +++++++++++++++++++ .../resources/AbstractWorkflowResource.java | 11 ++++++-- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/dockstore-integration-testing/src/test/java/io/dockstore/client/cli/GitHubWorkflowIT.java b/dockstore-integration-testing/src/test/java/io/dockstore/client/cli/GitHubWorkflowIT.java index cab1d92f7d..a57f666934 100644 --- a/dockstore-integration-testing/src/test/java/io/dockstore/client/cli/GitHubWorkflowIT.java +++ b/dockstore-integration-testing/src/test/java/io/dockstore/client/cli/GitHubWorkflowIT.java @@ -453,7 +453,7 @@ void testTRSImageName() { trsVersion = ga4Ghv20Api.toolsIdVersionsVersionIdGet("#workflow/github.com/" + DockstoreTesting.HELLO_WDL_WORKFLOW, quayDigestVersionName); assertEquals(1, trsVersion.getImages().size(), "Should be one image in this TRS version"); trsVersion.getImages().forEach(image -> assertEquals( - "quay.io/ga4gh-dream/dockstore-tool-helloworld@sha256:3a854fd1ebd970011fa57c8c099347314eda36cc746fd831f4deff9a1d433718", image.getImageName())); + "quay.io/ga4gh-dream/dockstore-tool-helloworld@sha256:71c0f43d9081cb14411adae56773762b1e829f7175645484571dcb1c6e120d23", image.getImageName())); // Workflow with Docker Hub image specified using a tag (6 images actually retrieved, one per architecture type) String dockerHubTagVersionName = "dockerHubTagImage"; diff --git a/dockstore-integration-testing/src/test/java/io/dockstore/webservice/WebhookIT.java b/dockstore-integration-testing/src/test/java/io/dockstore/webservice/WebhookIT.java index a81cef6080..ad90fe3b76 100644 --- a/dockstore-integration-testing/src/test/java/io/dockstore/webservice/WebhookIT.java +++ b/dockstore-integration-testing/src/test/java/io/dockstore/webservice/WebhookIT.java @@ -1094,6 +1094,34 @@ void testGitHubReleaseNoWorkflowSenderNotADockstoreUser() { } + /** + * https://ucsc-cgl.atlassian.net/browse/SEAB-6850 + */ + @Test + void testGitHubReleaseUserHasAnExpiredGitHubToken() { + final ApiClient webClient = getOpenAPIWebClient(USER_2_USERNAME, testingPostgres); + WorkflowsApi client = new WorkflowsApi(webClient); + + final Long initialWorkflowCount = testingPostgres.runSelectStatement("select count(*) from workflow", long.class); + assertEquals(0, initialWorkflowCount, "There should be no workflows to start"); + // Make USER_2_USERNAME's token invalid, which behaves similar to an expired token + testingPostgres.runUpdateStatement("update token set content='expiredtoken' where username = '%s' and tokensource='github.com'".formatted(USER_2_USERNAME)); + handleGitHubRelease(client, DockstoreTestUser2.WORKFLOW_DOCKSTORE_YML, "refs/tags/0.1", "thisisafakeuser", null, List.of(USER_2_USERNAME)); + final Long userlessWorkflows = testingPostgres.runSelectStatement( + "select count(*) from workflow w where w.id not in (select entryid from user_entry)", long.class); + assertEquals(1, userlessWorkflows); + final Long wvCount1 = testingPostgres.runSelectStatement("select count(*) from workflowversion", long.class); + assertEquals(1, wvCount1, "The userless workflow should now have 1 version"); + + + // Ensure update also doesn't fail + handleGitHubRelease(client, DockstoreTestUser2.WORKFLOW_DOCKSTORE_YML, "refs/tags/0.2", "thisisafakeuser", null, List.of(USER_2_USERNAME)); + + // 0.2 also creates a CWL version, so only look for WDL versions + final Long wvCount2 = testingPostgres.runSelectStatement("select count(*) from workflowversion where workflowpath = '/Dockstore.wdl'", long.class); + assertEquals(2, wvCount2, "The userless workflow should now have 2 WDL versions"); + } + /** * Tests: * An unpublished workflow with invalid versions can have its descriptor type changed diff --git a/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java b/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java index e34a1d3410..d6da93dba8 100644 --- a/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java +++ b/dockstore-webservice/src/main/java/io/dockstore/webservice/resources/AbstractWorkflowResource.java @@ -768,8 +768,15 @@ private List usersWithRepoPermissions(String repository, Set usern final GitHubSourceCodeRepo userSourceCodeRepo = new GitHubSourceCodeRepo(profile.username, gitHubToken.getContent()); // Get a map of all repos the user has permissions to - final Map map = userSourceCodeRepo.getWorkflowGitUrl2RepositoryId(); - return map.values().contains(repository); + try { + final Map map = userSourceCodeRepo.getWorkflowGitUrl2RepositoryId(); + return map.values().contains(repository); + } catch (CustomWebApplicationException ex) { + // https://ucsc-cgl.atlassian.net/browse/SEAB-6850 - User had an expired token, exception wrapped here: + // io.dockstore.webservice.helpers.SourceCodeRepoInterface.handleGetWorkflowGitUrl2RepositoryIdError + LOG.info("Error listing user's repositories for determining permissions", ex); + return false; + } } return false; }).toList(); From 7b95e497dbadaf49867efb8b1d3f8f8765cbfed0 Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Wed, 11 Dec 2024 14:23:24 -0500 Subject: [PATCH 06/13] Update artifacts --- dockstore-common/generated/src/main/resources/pom.xml | 2 +- .../generated/src/main/resources/pom.xml | 10 +++++----- .../generated/src/main/resources/pom.xml | 4 ++-- .../generated/src/main/resources/pom.xml | 6 +++--- .../src/main/resources/openapi3/openapi.yaml | 2 +- .../generated/src/main/resources/pom.xml | 4 ++-- reports/generated/src/main/resources/pom.xml | 8 ++++---- .../generated/src/main/resources/pom.xml | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dockstore-common/generated/src/main/resources/pom.xml b/dockstore-common/generated/src/main/resources/pom.xml index 1302bc632a..9c5499619b 100644 --- a/dockstore-common/generated/src/main/resources/pom.xml +++ b/dockstore-common/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.1 Apache Software License, Version 2.0 diff --git a/dockstore-integration-testing/generated/src/main/resources/pom.xml b/dockstore-integration-testing/generated/src/main/resources/pom.xml index f6bd131c54..fa886efcc1 100644 --- a/dockstore-integration-testing/generated/src/main/resources/pom.xml +++ b/dockstore-integration-testing/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-integration-testing - 1.16.0-SNAPSHOT + 1.16.1 Apache Software License, Version 2.0 @@ -72,25 +72,25 @@ io.dockstore swagger-java-client - 1.16.0-SNAPSHOT + 1.16.1 compile io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.1 compile io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.1 compile io.dockstore openapi-java-client - 1.16.0-SNAPSHOT + 1.16.1 compile diff --git a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml index c94e5d1863..4435772b84 100644 --- a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml +++ b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-language-plugin-parent - 1.16.0-SNAPSHOT + 1.16.1 Apache Software License, Version 2.0 @@ -30,7 +30,7 @@ io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.1 compile diff --git a/dockstore-webservice/generated/src/main/resources/pom.xml b/dockstore-webservice/generated/src/main/resources/pom.xml index b715bb04bc..de9ff8e33a 100644 --- a/dockstore-webservice/generated/src/main/resources/pom.xml +++ b/dockstore-webservice/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.1 Apache Software License, Version 2.0 @@ -90,13 +90,13 @@ io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.1 compile io.dockstore dockstore-language-plugin-parent - 1.16.0-SNAPSHOT + 1.16.1 compile diff --git a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml index af6bc9f9c2..1d6348bdb2 100644 --- a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml +++ b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml @@ -13,7 +13,7 @@ info: url: https://github.com/dockstore/dockstore/blob/develop/LICENSE termsOfService: https://github.com/dockstore/dockstore-ui2/raw/develop/src/assets/docs/Dockstore_Terms_of_Service.pdf title: Dockstore API - version: 1.16.0-SNAPSHOT + version: 1.16.1 servers: - description: Current server when hosted on AWS url: /api diff --git a/openapi-java-client/generated/src/main/resources/pom.xml b/openapi-java-client/generated/src/main/resources/pom.xml index e143bfdb88..4be2f9b629 100644 --- a/openapi-java-client/generated/src/main/resources/pom.xml +++ b/openapi-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore openapi-java-client - 1.16.0-SNAPSHOT + 1.16.1 Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.1 provided diff --git a/reports/generated/src/main/resources/pom.xml b/reports/generated/src/main/resources/pom.xml index 716a19e51d..82ff317eed 100644 --- a/reports/generated/src/main/resources/pom.xml +++ b/reports/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore reports - 1.16.0-SNAPSHOT + 1.16.1 Apache Software License, Version 2.0 @@ -30,19 +30,19 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.1 compile io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.1 compile io.dockstore dockstore-integration-testing - 1.16.0-SNAPSHOT + 1.16.1 compile diff --git a/swagger-java-client/generated/src/main/resources/pom.xml b/swagger-java-client/generated/src/main/resources/pom.xml index 9b66266326..ea14e5c86d 100644 --- a/swagger-java-client/generated/src/main/resources/pom.xml +++ b/swagger-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore swagger-java-client - 1.16.0-SNAPSHOT + 1.16.1 Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.1 provided From 74d2f769f60d0f50f2c39a05e1a3ffe501a30163 Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Wed, 11 Dec 2024 14:25:54 -0500 Subject: [PATCH 07/13] Reset version --- dockstore-common/generated/src/main/resources/pom.xml | 2 +- .../generated/src/main/resources/pom.xml | 10 +++++----- .../generated/src/main/resources/pom.xml | 4 ++-- .../generated/src/main/resources/pom.xml | 6 +++--- .../src/main/resources/openapi3/openapi.yaml | 2 +- .../generated/src/main/resources/pom.xml | 4 ++-- reports/generated/src/main/resources/pom.xml | 8 ++++---- .../generated/src/main/resources/pom.xml | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dockstore-common/generated/src/main/resources/pom.xml b/dockstore-common/generated/src/main/resources/pom.xml index 9c5499619b..1302bc632a 100644 --- a/dockstore-common/generated/src/main/resources/pom.xml +++ b/dockstore-common/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-common - 1.16.1 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 diff --git a/dockstore-integration-testing/generated/src/main/resources/pom.xml b/dockstore-integration-testing/generated/src/main/resources/pom.xml index fa886efcc1..f6bd131c54 100644 --- a/dockstore-integration-testing/generated/src/main/resources/pom.xml +++ b/dockstore-integration-testing/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-integration-testing - 1.16.1 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -72,25 +72,25 @@ io.dockstore swagger-java-client - 1.16.1 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-common - 1.16.1 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-webservice - 1.16.1 + 1.16.0-SNAPSHOT compile io.dockstore openapi-java-client - 1.16.1 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml index 4435772b84..c94e5d1863 100644 --- a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml +++ b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-language-plugin-parent - 1.16.1 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -30,7 +30,7 @@ io.dockstore dockstore-common - 1.16.1 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-webservice/generated/src/main/resources/pom.xml b/dockstore-webservice/generated/src/main/resources/pom.xml index de9ff8e33a..b715bb04bc 100644 --- a/dockstore-webservice/generated/src/main/resources/pom.xml +++ b/dockstore-webservice/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-webservice - 1.16.1 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -90,13 +90,13 @@ io.dockstore dockstore-common - 1.16.1 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-language-plugin-parent - 1.16.1 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml index 1d6348bdb2..af6bc9f9c2 100644 --- a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml +++ b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml @@ -13,7 +13,7 @@ info: url: https://github.com/dockstore/dockstore/blob/develop/LICENSE termsOfService: https://github.com/dockstore/dockstore-ui2/raw/develop/src/assets/docs/Dockstore_Terms_of_Service.pdf title: Dockstore API - version: 1.16.1 + version: 1.16.0-SNAPSHOT servers: - description: Current server when hosted on AWS url: /api diff --git a/openapi-java-client/generated/src/main/resources/pom.xml b/openapi-java-client/generated/src/main/resources/pom.xml index 4be2f9b629..e143bfdb88 100644 --- a/openapi-java-client/generated/src/main/resources/pom.xml +++ b/openapi-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore openapi-java-client - 1.16.1 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.1 + 1.16.0-SNAPSHOT provided diff --git a/reports/generated/src/main/resources/pom.xml b/reports/generated/src/main/resources/pom.xml index 82ff317eed..716a19e51d 100644 --- a/reports/generated/src/main/resources/pom.xml +++ b/reports/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore reports - 1.16.1 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -30,19 +30,19 @@ io.dockstore dockstore-webservice - 1.16.1 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-common - 1.16.1 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-integration-testing - 1.16.1 + 1.16.0-SNAPSHOT compile diff --git a/swagger-java-client/generated/src/main/resources/pom.xml b/swagger-java-client/generated/src/main/resources/pom.xml index ea14e5c86d..9b66266326 100644 --- a/swagger-java-client/generated/src/main/resources/pom.xml +++ b/swagger-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore swagger-java-client - 1.16.1 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.1 + 1.16.0-SNAPSHOT provided From af2325dadc2058e9ea013f688b2c0a22d0ec97eb Mon Sep 17 00:00:00 2001 From: Kathy Tran Date: Thu, 5 Dec 2024 09:11:45 -0500 Subject: [PATCH 08/13] Use reusable deploy artifacts workflow (#6043) https://ucsc-cgl.atlassian.net/browse/SEAB-6771 --- .github/collab-mvn-settings.xml | 9 -- .github/snapshot-mvn-settings.xml | 9 -- ...ploy_snapshot.yml => deploy_artifacts.yml} | 78 +++++------------ .github/workflows/deploy_tagged.yml | 87 ------------------- 4 files changed, 20 insertions(+), 163 deletions(-) delete mode 100644 .github/collab-mvn-settings.xml delete mode 100644 .github/snapshot-mvn-settings.xml rename .github/workflows/{deploy_snapshot.yml => deploy_artifacts.yml} (50%) delete mode 100644 .github/workflows/deploy_tagged.yml diff --git a/.github/collab-mvn-settings.xml b/.github/collab-mvn-settings.xml deleted file mode 100644 index 711bbdc0d6..0000000000 --- a/.github/collab-mvn-settings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - central - dockstore-bot - ${env.COLLAB_DEPLOY_TOKEN} - - - diff --git a/.github/snapshot-mvn-settings.xml b/.github/snapshot-mvn-settings.xml deleted file mode 100644 index ce26d73bed..0000000000 --- a/.github/snapshot-mvn-settings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - snapshots - dockstore-snapshot-bot - ${env.SNAPSHOT_DEPLOY_TOKEN} - - - diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_artifacts.yml similarity index 50% rename from .github/workflows/deploy_snapshot.yml rename to .github/workflows/deploy_artifacts.yml index 2921d969c5..7ee1b5088f 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_artifacts.yml @@ -1,21 +1,30 @@ -name: Deploy develop snapshot - +name: Deploy artifacts on: push: - branches: - - develop - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: + tags: + - '**' + # Run for all branches except the following + branches-ignore: + - 'master' + - 'release/**' + - 'hotfix/**' + - 'dependabot/**' jobs: - build: + deploy_artifacts: + uses: dockstore/workflow-actions/.github/workflows/deploy_artifacts.yaml@main + with: + createDockerImage: true + quayRepository: dockstore-webservice + secrets: inherit + + deploy_db_docs: + if: ${{ github.ref_type == 'branch' && github.ref_name == 'develop' }} runs-on: ubuntu-22.04 permissions: contents: read pages: write - id-token: write # Service containers to run with `container-job` services: @@ -54,54 +63,8 @@ jobs: java-version: '21.0.2+13.0.LTS' distribution: 'adopt' - - name: Deploy with mvnw - run: ./mvnw --batch-mode deploy -ntp -s .github/snapshot-mvn-settings.xml -DskipTests - env: - SNAPSHOT_DEPLOY_TOKEN: ${{ secrets.SNAPSHOT_DEPLOY_TOKEN }} - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - role-session-name: docker_checksum_upload_from_github - aws-region: ${{ secrets.AWS_REGION }} - - # neat, quay itself uses manual github actions https://github.com/quay/quay/blob/master/.github/workflows/build-and-publish.yaml - - name: Login to Quay.io - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ secrets.QUAY_USER }} - password: ${{ secrets.QUAY_TOKEN }} - - - name: Set folder name - run: | - S3_FOLDER=${GITHUB_REF##refs/tags/} - if [ $GITHUB_REF == $S3_FOLDER ]; then - # If this isn't a tag, it must be a branch - S3_FOLDER=${GITHUB_REF##refs/heads/} - fi - echo "S3_FOLDER=${S3_FOLDER//\//_}" >> $GITHUB_ENV - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: quay.io/dockstore/dockstore-webservice:${{env.S3_FOLDER}} - - - name: Create checksums - run: | - docker inspect quay.io/dockstore/dockstore-webservice:${{env.S3_FOLDER}} | grep -A 1 RepoDigests - docker inspect quay.io/dockstore/dockstore-webservice:${{env.S3_FOLDER}} | grep -A 1 RepoDigests | grep -oPm1 'sha256:\K\w+' > image-digest.txt - - - name: Get short SHA - id: slug - run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)" - - - name: Copy checksum files - run: aws s3 cp image-digest.txt s3://${{ secrets.AWS_BUCKET }}/${{ env.S3_FOLDER }}-${{ steps.slug.outputs.sha7 }}/image-digest.txt + - name: Build + run: ./mvnw -B clean install -DskipTests # deploy database documentation and also verify that non-confidential migrations seem sane - name: Setup Pages @@ -119,4 +82,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 - diff --git a/.github/workflows/deploy_tagged.yml b/.github/workflows/deploy_tagged.yml deleted file mode 100644 index ca063dd234..0000000000 --- a/.github/workflows/deploy_tagged.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: Tagged release deploy - -on: - workflow_dispatch: - inputs: - changelist: - description: 'patch and pre-release metadata' - required: true - default: '.0-alpha.1' - - -jobs: - build: - runs-on: ubuntu-22.04 - - # Should only release tags - # TODO: should only release tags where the required status checks are passing - if: startsWith(github.ref, 'refs/tags/') - - permissions: - id-token: write - - steps: - - uses: actions/checkout@v4 - # Step that does that actual cache save and restore - - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '21.0.2+13.0.LTS' - distribution: 'adopt' - - - name: Store Maven project version - run: echo "maven_project_version=$(mvn help:evaluate -Dexpression=project.version -Dchangelist=${{ github.event.inputs.changelist }} -q -DforceStdout)" >> $GITHUB_ENV - - - name: Read exported variable - run: | - echo "${{ env.maven_project_version }}" - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - role-session-name: docker_checksum_upload_from_github - aws-region: ${{ secrets.AWS_REGION }} - - - name: Deploy with mvnw - run: | - git config --global user.email "${{ github.actor }}" - git config --global user.name "${{ github.actor }}" - ./mvnw --batch-mode deploy -ntp -s .github/collab-mvn-settings.xml -DskipTests -Dchangelist=${{ github.event.inputs.changelist }} - env: - COLLAB_DEPLOY_TOKEN: ${{ secrets.COLLAB_DEPLOY_TOKEN }} - - # neat, quay itself uses manual github actions https://github.com/quay/quay/blob/master/.github/workflows/build-and-publish.yaml - - name: Login to Quay.io - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ secrets.QUAY_USER }} - password: ${{ secrets.QUAY_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: quay.io/dockstore/dockstore-webservice:${{ env.maven_project_version }} - - - name: Create checksums - run: | - docker inspect quay.io/dockstore/dockstore-webservice:${{ env.maven_project_version }} | grep -A 1 RepoDigests - docker inspect quay.io/dockstore/dockstore-webservice:${{ env.maven_project_version }} | grep -A 1 RepoDigests | grep -oPm1 'sha256:\K\w+' > image-digest.txt - - - name: Get short SHA - id: slug - run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)" - - - name: Copy checksum files - run: aws s3 cp image-digest.txt s3://${{ secrets.AWS_BUCKET }}/${{ env.maven_project_version }}-${{ steps.slug.outputs.sha7 }}/image-digest.txt From 7a0277d828ddfac30364df4023ab84873b00b1b9 Mon Sep 17 00:00:00 2001 From: Kathy Tran Date: Thu, 5 Dec 2024 13:07:08 -0500 Subject: [PATCH 09/13] Add id-token write permisson for deploying db docs (#6047) https://ucsc-cgl.atlassian.net/browse/SEAB-6771 --- .github/workflows/deploy_artifacts.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_artifacts.yml b/.github/workflows/deploy_artifacts.yml index 7ee1b5088f..9c3e8b0896 100644 --- a/.github/workflows/deploy_artifacts.yml +++ b/.github/workflows/deploy_artifacts.yml @@ -25,6 +25,7 @@ jobs: permissions: contents: read pages: write + id-token: write # Service containers to run with `container-job` services: From 4b4f813ec77b5ee6a45117f94d5bbfcdcd10f85a Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Wed, 11 Dec 2024 14:49:42 -0500 Subject: [PATCH 10/13] Update artifacts --- dockstore-common/generated/src/main/resources/pom.xml | 2 +- .../generated/src/main/resources/pom.xml | 10 +++++----- .../generated/src/main/resources/pom.xml | 4 ++-- .../generated/src/main/resources/pom.xml | 6 +++--- .../src/main/resources/openapi3/openapi.yaml | 2 +- .../generated/src/main/resources/pom.xml | 4 ++-- reports/generated/src/main/resources/pom.xml | 8 ++++---- .../generated/src/main/resources/pom.xml | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dockstore-common/generated/src/main/resources/pom.xml b/dockstore-common/generated/src/main/resources/pom.xml index 1302bc632a..d18b85c65f 100644 --- a/dockstore-common/generated/src/main/resources/pom.xml +++ b/dockstore-common/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.2 Apache Software License, Version 2.0 diff --git a/dockstore-integration-testing/generated/src/main/resources/pom.xml b/dockstore-integration-testing/generated/src/main/resources/pom.xml index f6bd131c54..d2d256b6c8 100644 --- a/dockstore-integration-testing/generated/src/main/resources/pom.xml +++ b/dockstore-integration-testing/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-integration-testing - 1.16.0-SNAPSHOT + 1.16.2 Apache Software License, Version 2.0 @@ -72,25 +72,25 @@ io.dockstore swagger-java-client - 1.16.0-SNAPSHOT + 1.16.2 compile io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.2 compile io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.2 compile io.dockstore openapi-java-client - 1.16.0-SNAPSHOT + 1.16.2 compile diff --git a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml index c94e5d1863..488524df5c 100644 --- a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml +++ b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-language-plugin-parent - 1.16.0-SNAPSHOT + 1.16.2 Apache Software License, Version 2.0 @@ -30,7 +30,7 @@ io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.2 compile diff --git a/dockstore-webservice/generated/src/main/resources/pom.xml b/dockstore-webservice/generated/src/main/resources/pom.xml index b715bb04bc..0c700033c5 100644 --- a/dockstore-webservice/generated/src/main/resources/pom.xml +++ b/dockstore-webservice/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.2 Apache Software License, Version 2.0 @@ -90,13 +90,13 @@ io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.2 compile io.dockstore dockstore-language-plugin-parent - 1.16.0-SNAPSHOT + 1.16.2 compile diff --git a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml index af6bc9f9c2..d065305c42 100644 --- a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml +++ b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml @@ -13,7 +13,7 @@ info: url: https://github.com/dockstore/dockstore/blob/develop/LICENSE termsOfService: https://github.com/dockstore/dockstore-ui2/raw/develop/src/assets/docs/Dockstore_Terms_of_Service.pdf title: Dockstore API - version: 1.16.0-SNAPSHOT + version: 1.16.2 servers: - description: Current server when hosted on AWS url: /api diff --git a/openapi-java-client/generated/src/main/resources/pom.xml b/openapi-java-client/generated/src/main/resources/pom.xml index e143bfdb88..5b4f2ebad1 100644 --- a/openapi-java-client/generated/src/main/resources/pom.xml +++ b/openapi-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore openapi-java-client - 1.16.0-SNAPSHOT + 1.16.2 Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.2 provided diff --git a/reports/generated/src/main/resources/pom.xml b/reports/generated/src/main/resources/pom.xml index 716a19e51d..e489d3baa0 100644 --- a/reports/generated/src/main/resources/pom.xml +++ b/reports/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore reports - 1.16.0-SNAPSHOT + 1.16.2 Apache Software License, Version 2.0 @@ -30,19 +30,19 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.2 compile io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.2 compile io.dockstore dockstore-integration-testing - 1.16.0-SNAPSHOT + 1.16.2 compile diff --git a/swagger-java-client/generated/src/main/resources/pom.xml b/swagger-java-client/generated/src/main/resources/pom.xml index 9b66266326..946a4c59a5 100644 --- a/swagger-java-client/generated/src/main/resources/pom.xml +++ b/swagger-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore swagger-java-client - 1.16.0-SNAPSHOT + 1.16.2 Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.2 provided From 47062539aaad3b8143ff69c7b0b2032ad0a48158 Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Wed, 11 Dec 2024 14:52:33 -0500 Subject: [PATCH 11/13] Reset version --- dockstore-common/generated/src/main/resources/pom.xml | 2 +- .../generated/src/main/resources/pom.xml | 10 +++++----- .../generated/src/main/resources/pom.xml | 4 ++-- .../generated/src/main/resources/pom.xml | 6 +++--- .../src/main/resources/openapi3/openapi.yaml | 2 +- .../generated/src/main/resources/pom.xml | 4 ++-- reports/generated/src/main/resources/pom.xml | 8 ++++---- .../generated/src/main/resources/pom.xml | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dockstore-common/generated/src/main/resources/pom.xml b/dockstore-common/generated/src/main/resources/pom.xml index d18b85c65f..1302bc632a 100644 --- a/dockstore-common/generated/src/main/resources/pom.xml +++ b/dockstore-common/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-common - 1.16.2 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 diff --git a/dockstore-integration-testing/generated/src/main/resources/pom.xml b/dockstore-integration-testing/generated/src/main/resources/pom.xml index d2d256b6c8..f6bd131c54 100644 --- a/dockstore-integration-testing/generated/src/main/resources/pom.xml +++ b/dockstore-integration-testing/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-integration-testing - 1.16.2 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -72,25 +72,25 @@ io.dockstore swagger-java-client - 1.16.2 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-common - 1.16.2 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-webservice - 1.16.2 + 1.16.0-SNAPSHOT compile io.dockstore openapi-java-client - 1.16.2 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml index 488524df5c..c94e5d1863 100644 --- a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml +++ b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-language-plugin-parent - 1.16.2 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -30,7 +30,7 @@ io.dockstore dockstore-common - 1.16.2 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-webservice/generated/src/main/resources/pom.xml b/dockstore-webservice/generated/src/main/resources/pom.xml index 0c700033c5..b715bb04bc 100644 --- a/dockstore-webservice/generated/src/main/resources/pom.xml +++ b/dockstore-webservice/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-webservice - 1.16.2 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -90,13 +90,13 @@ io.dockstore dockstore-common - 1.16.2 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-language-plugin-parent - 1.16.2 + 1.16.0-SNAPSHOT compile diff --git a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml index d065305c42..af6bc9f9c2 100644 --- a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml +++ b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml @@ -13,7 +13,7 @@ info: url: https://github.com/dockstore/dockstore/blob/develop/LICENSE termsOfService: https://github.com/dockstore/dockstore-ui2/raw/develop/src/assets/docs/Dockstore_Terms_of_Service.pdf title: Dockstore API - version: 1.16.2 + version: 1.16.0-SNAPSHOT servers: - description: Current server when hosted on AWS url: /api diff --git a/openapi-java-client/generated/src/main/resources/pom.xml b/openapi-java-client/generated/src/main/resources/pom.xml index 5b4f2ebad1..e143bfdb88 100644 --- a/openapi-java-client/generated/src/main/resources/pom.xml +++ b/openapi-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore openapi-java-client - 1.16.2 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.2 + 1.16.0-SNAPSHOT provided diff --git a/reports/generated/src/main/resources/pom.xml b/reports/generated/src/main/resources/pom.xml index e489d3baa0..716a19e51d 100644 --- a/reports/generated/src/main/resources/pom.xml +++ b/reports/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore reports - 1.16.2 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -30,19 +30,19 @@ io.dockstore dockstore-webservice - 1.16.2 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-common - 1.16.2 + 1.16.0-SNAPSHOT compile io.dockstore dockstore-integration-testing - 1.16.2 + 1.16.0-SNAPSHOT compile diff --git a/swagger-java-client/generated/src/main/resources/pom.xml b/swagger-java-client/generated/src/main/resources/pom.xml index 946a4c59a5..9b66266326 100644 --- a/swagger-java-client/generated/src/main/resources/pom.xml +++ b/swagger-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore swagger-java-client - 1.16.2 + 1.16.0-SNAPSHOT Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.2 + 1.16.0-SNAPSHOT provided From 09527d7f3fb4539336fdca158a970b7b527427fb Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Wed, 11 Dec 2024 18:27:42 -0500 Subject: [PATCH 12/13] Update artifacts --- dockstore-common/generated/src/main/resources/pom.xml | 2 +- .../generated/src/main/resources/pom.xml | 10 +++++----- .../generated/src/main/resources/pom.xml | 4 ++-- .../generated/src/main/resources/pom.xml | 6 +++--- .../src/main/resources/openapi3/openapi.yaml | 2 +- .../generated/src/main/resources/pom.xml | 4 ++-- reports/generated/src/main/resources/pom.xml | 8 ++++---- .../generated/src/main/resources/pom.xml | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dockstore-common/generated/src/main/resources/pom.xml b/dockstore-common/generated/src/main/resources/pom.xml index 1302bc632a..6127b7c6af 100644 --- a/dockstore-common/generated/src/main/resources/pom.xml +++ b/dockstore-common/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.3 Apache Software License, Version 2.0 diff --git a/dockstore-integration-testing/generated/src/main/resources/pom.xml b/dockstore-integration-testing/generated/src/main/resources/pom.xml index f6bd131c54..4cf7c5aaa5 100644 --- a/dockstore-integration-testing/generated/src/main/resources/pom.xml +++ b/dockstore-integration-testing/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-integration-testing - 1.16.0-SNAPSHOT + 1.16.3 Apache Software License, Version 2.0 @@ -72,25 +72,25 @@ io.dockstore swagger-java-client - 1.16.0-SNAPSHOT + 1.16.3 compile io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.3 compile io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.3 compile io.dockstore openapi-java-client - 1.16.0-SNAPSHOT + 1.16.3 compile diff --git a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml index c94e5d1863..fbc00abd52 100644 --- a/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml +++ b/dockstore-language-plugin-parent/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-language-plugin-parent - 1.16.0-SNAPSHOT + 1.16.3 Apache Software License, Version 2.0 @@ -30,7 +30,7 @@ io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.3 compile diff --git a/dockstore-webservice/generated/src/main/resources/pom.xml b/dockstore-webservice/generated/src/main/resources/pom.xml index b715bb04bc..acb569a5e2 100644 --- a/dockstore-webservice/generated/src/main/resources/pom.xml +++ b/dockstore-webservice/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.3 Apache Software License, Version 2.0 @@ -90,13 +90,13 @@ io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.3 compile io.dockstore dockstore-language-plugin-parent - 1.16.0-SNAPSHOT + 1.16.3 compile diff --git a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml index af6bc9f9c2..31ca527d75 100644 --- a/dockstore-webservice/src/main/resources/openapi3/openapi.yaml +++ b/dockstore-webservice/src/main/resources/openapi3/openapi.yaml @@ -13,7 +13,7 @@ info: url: https://github.com/dockstore/dockstore/blob/develop/LICENSE termsOfService: https://github.com/dockstore/dockstore-ui2/raw/develop/src/assets/docs/Dockstore_Terms_of_Service.pdf title: Dockstore API - version: 1.16.0-SNAPSHOT + version: 1.16.3 servers: - description: Current server when hosted on AWS url: /api diff --git a/openapi-java-client/generated/src/main/resources/pom.xml b/openapi-java-client/generated/src/main/resources/pom.xml index e143bfdb88..4cca8a6674 100644 --- a/openapi-java-client/generated/src/main/resources/pom.xml +++ b/openapi-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore openapi-java-client - 1.16.0-SNAPSHOT + 1.16.3 Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.3 provided diff --git a/reports/generated/src/main/resources/pom.xml b/reports/generated/src/main/resources/pom.xml index 716a19e51d..156ec2631e 100644 --- a/reports/generated/src/main/resources/pom.xml +++ b/reports/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore reports - 1.16.0-SNAPSHOT + 1.16.3 Apache Software License, Version 2.0 @@ -30,19 +30,19 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.3 compile io.dockstore dockstore-common - 1.16.0-SNAPSHOT + 1.16.3 compile io.dockstore dockstore-integration-testing - 1.16.0-SNAPSHOT + 1.16.3 compile diff --git a/swagger-java-client/generated/src/main/resources/pom.xml b/swagger-java-client/generated/src/main/resources/pom.xml index 9b66266326..31a4d03aac 100644 --- a/swagger-java-client/generated/src/main/resources/pom.xml +++ b/swagger-java-client/generated/src/main/resources/pom.xml @@ -19,7 +19,7 @@ 4.0.0 io.dockstore swagger-java-client - 1.16.0-SNAPSHOT + 1.16.3 Apache Software License, Version 2.0 @@ -102,7 +102,7 @@ io.dockstore dockstore-webservice - 1.16.0-SNAPSHOT + 1.16.3 provided From ec7d676317b25e375c3c84ac4c5cc407f8dae275 Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Wed, 11 Dec 2024 18:31:00 -0500 Subject: [PATCH 13/13] Revert "Use reusable deploy artifacts workflow (#6043)" This reverts commit af2325dadc2058e9ea013f688b2c0a22d0ec97eb. --- .github/collab-mvn-settings.xml | 9 ++ .github/snapshot-mvn-settings.xml | 9 ++ ...ploy_artifacts.yml => deploy_snapshot.yml} | 77 +++++++++++----- .github/workflows/deploy_tagged.yml | 87 +++++++++++++++++++ 4 files changed, 162 insertions(+), 20 deletions(-) create mode 100644 .github/collab-mvn-settings.xml create mode 100644 .github/snapshot-mvn-settings.xml rename .github/workflows/{deploy_artifacts.yml => deploy_snapshot.yml} (51%) create mode 100644 .github/workflows/deploy_tagged.yml diff --git a/.github/collab-mvn-settings.xml b/.github/collab-mvn-settings.xml new file mode 100644 index 0000000000..711bbdc0d6 --- /dev/null +++ b/.github/collab-mvn-settings.xml @@ -0,0 +1,9 @@ + + + + central + dockstore-bot + ${env.COLLAB_DEPLOY_TOKEN} + + + diff --git a/.github/snapshot-mvn-settings.xml b/.github/snapshot-mvn-settings.xml new file mode 100644 index 0000000000..ce26d73bed --- /dev/null +++ b/.github/snapshot-mvn-settings.xml @@ -0,0 +1,9 @@ + + + + snapshots + dockstore-snapshot-bot + ${env.SNAPSHOT_DEPLOY_TOKEN} + + + diff --git a/.github/workflows/deploy_artifacts.yml b/.github/workflows/deploy_snapshot.yml similarity index 51% rename from .github/workflows/deploy_artifacts.yml rename to .github/workflows/deploy_snapshot.yml index 9c3e8b0896..42e785f1ba 100644 --- a/.github/workflows/deploy_artifacts.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -1,25 +1,15 @@ -name: Deploy artifacts +name: Deploy develop snapshot + on: push: - tags: - - '**' - # Run for all branches except the following - branches-ignore: - - 'master' - - 'release/**' - - 'hotfix/**' - - 'dependabot/**' + branches: + - develop + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: - deploy_artifacts: - uses: dockstore/workflow-actions/.github/workflows/deploy_artifacts.yaml@main - with: - createDockerImage: true - quayRepository: dockstore-webservice - secrets: inherit - - deploy_db_docs: - if: ${{ github.ref_type == 'branch' && github.ref_name == 'develop' }} + build: runs-on: ubuntu-22.04 permissions: @@ -64,8 +54,54 @@ jobs: java-version: '21.0.2+13.0.LTS' distribution: 'adopt' - - name: Build - run: ./mvnw -B clean install -DskipTests + - name: Deploy with mvnw + run: ./mvnw --batch-mode deploy -ntp -s .github/snapshot-mvn-settings.xml -DskipTests + env: + SNAPSHOT_DEPLOY_TOKEN: ${{ secrets.SNAPSHOT_DEPLOY_TOKEN }} + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} + role-session-name: docker_checksum_upload_from_github + aws-region: ${{ secrets.AWS_REGION }} + + # neat, quay itself uses manual github actions https://github.com/quay/quay/blob/master/.github/workflows/build-and-publish.yaml + - name: Login to Quay.io + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USER }} + password: ${{ secrets.QUAY_TOKEN }} + + - name: Set folder name + run: | + S3_FOLDER=${GITHUB_REF##refs/tags/} + if [ $GITHUB_REF == $S3_FOLDER ]; then + # If this isn't a tag, it must be a branch + S3_FOLDER=${GITHUB_REF##refs/heads/} + fi + echo "S3_FOLDER=${S3_FOLDER//\//_}" >> $GITHUB_ENV + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: quay.io/dockstore/dockstore-webservice:${{env.S3_FOLDER}} + + - name: Create checksums + run: | + docker inspect quay.io/dockstore/dockstore-webservice:${{env.S3_FOLDER}} | grep -A 1 RepoDigests + docker inspect quay.io/dockstore/dockstore-webservice:${{env.S3_FOLDER}} | grep -A 1 RepoDigests | grep -oPm1 'sha256:\K\w+' > image-digest.txt + + - name: Get short SHA + id: slug + run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)" + + - name: Copy checksum files + run: aws s3 cp image-digest.txt s3://${{ secrets.AWS_BUCKET }}/${{ env.S3_FOLDER }}-${{ steps.slug.outputs.sha7 }}/image-digest.txt # deploy database documentation and also verify that non-confidential migrations seem sane - name: Setup Pages @@ -83,3 +119,4 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + diff --git a/.github/workflows/deploy_tagged.yml b/.github/workflows/deploy_tagged.yml new file mode 100644 index 0000000000..ca063dd234 --- /dev/null +++ b/.github/workflows/deploy_tagged.yml @@ -0,0 +1,87 @@ +name: Tagged release deploy + +on: + workflow_dispatch: + inputs: + changelist: + description: 'patch and pre-release metadata' + required: true + default: '.0-alpha.1' + + +jobs: + build: + runs-on: ubuntu-22.04 + + # Should only release tags + # TODO: should only release tags where the required status checks are passing + if: startsWith(github.ref, 'refs/tags/') + + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + # Step that does that actual cache save and restore + - uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '21.0.2+13.0.LTS' + distribution: 'adopt' + + - name: Store Maven project version + run: echo "maven_project_version=$(mvn help:evaluate -Dexpression=project.version -Dchangelist=${{ github.event.inputs.changelist }} -q -DforceStdout)" >> $GITHUB_ENV + + - name: Read exported variable + run: | + echo "${{ env.maven_project_version }}" + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} + role-session-name: docker_checksum_upload_from_github + aws-region: ${{ secrets.AWS_REGION }} + + - name: Deploy with mvnw + run: | + git config --global user.email "${{ github.actor }}" + git config --global user.name "${{ github.actor }}" + ./mvnw --batch-mode deploy -ntp -s .github/collab-mvn-settings.xml -DskipTests -Dchangelist=${{ github.event.inputs.changelist }} + env: + COLLAB_DEPLOY_TOKEN: ${{ secrets.COLLAB_DEPLOY_TOKEN }} + + # neat, quay itself uses manual github actions https://github.com/quay/quay/blob/master/.github/workflows/build-and-publish.yaml + - name: Login to Quay.io + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USER }} + password: ${{ secrets.QUAY_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: quay.io/dockstore/dockstore-webservice:${{ env.maven_project_version }} + + - name: Create checksums + run: | + docker inspect quay.io/dockstore/dockstore-webservice:${{ env.maven_project_version }} | grep -A 1 RepoDigests + docker inspect quay.io/dockstore/dockstore-webservice:${{ env.maven_project_version }} | grep -A 1 RepoDigests | grep -oPm1 'sha256:\K\w+' > image-digest.txt + + - name: Get short SHA + id: slug + run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)" + + - name: Copy checksum files + run: aws s3 cp image-digest.txt s3://${{ secrets.AWS_BUCKET }}/${{ env.maven_project_version }}-${{ steps.slug.outputs.sha7 }}/image-digest.txt