From 2dc9d7ae0fd971d74db47e55358a8c09df62dffd Mon Sep 17 00:00:00 2001 From: axlbonnet Date: Tue, 12 Sep 2023 16:24:04 +0200 Subject: [PATCH 1/8] target next release : 3.10.0 (#48) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c3a55b..ebeb25b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ fr.insalyon.creatis gasw-dirac-plugin - 3.9.1 + 3.10.0-SNAPSHOT jar GASW-Dirac-Plugin From 244d1c489d612840e457e5a83765f933e7369775 Mon Sep 17 00:00:00 2001 From: Axel Bonnet Date: Fri, 3 Nov 2023 10:10:52 +0100 Subject: [PATCH 2/8] save provenance with boutiques/dirac --- pom.xml | 2 +- .../dirac/execution/DiracOutputParser.java | 22 +++++++++---------- src/main/resources/vm/jdl/dirac-jdl.vm | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index ebeb25b..ed208d6 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 11 11 - 3.8.0 + 3.10.0-SNAPSHOT diff --git a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java index bf0762a..02359b8 100644 --- a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java +++ b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java @@ -54,6 +54,7 @@ public class DiracOutputParser extends GaswOutputParser { private static final Logger logger = Logger.getLogger("fr.insalyon.creatis.gasw"); private File stdOut; private File stdErr; + private File provenance; public DiracOutputParser(String jobID) { @@ -74,8 +75,10 @@ public GaswOutput getGaswOutput() throws GaswException { process.waitFor(); if (process.exitValue() == 0) { - stdOut = getStdFile(GaswConstants.OUT_EXT, GaswConstants.OUT_ROOT); - stdErr = getStdFile(GaswConstants.ERR_EXT, GaswConstants.ERR_ROOT); + stdOut = moveDiracOutputStdFile(GaswConstants.OUT_EXT, GaswConstants.OUT_ROOT); + stdErr = moveDiracOutputStdFile(GaswConstants.ERR_EXT, GaswConstants.ERR_ROOT); + provenance = moveDiracOutputProvenanceFile(); + new File("./" + job.getId()).delete(); @@ -159,16 +162,13 @@ public GaswOutput getGaswOutput() throws GaswException { * @param directory Output directory * @return */ - private File getStdFile(String extension, String directory) { + private File moveDiracOutputStdFile(String extension, String directory) { + File stdFile = new File("./" + job.getId() + "/" + "std" + extension); + return moveAppFile(stdFile, extension, directory); + } - File stdDir = new File(directory); - if (!stdDir.exists()) { - stdDir.mkdir(); - } - File stdFile = new File("./" + job.getId() + "/std" + extension); - File stdRenamed = new File(directory + "/" + job.getFileName() + ".sh" + extension); - stdFile.renameTo(stdRenamed); - return stdRenamed; + private File moveDiracOutputProvenanceFile() { + return super.moveProvenanceFile("./" + job.getId()); } /** diff --git a/src/main/resources/vm/jdl/dirac-jdl.vm b/src/main/resources/vm/jdl/dirac-jdl.vm index 2003fc2..d5d33e5 100644 --- a/src/main/resources/vm/jdl/dirac-jdl.vm +++ b/src/main/resources/vm/jdl/dirac-jdl.vm @@ -9,7 +9,7 @@ Executable = "$scriptName"; StdOutput = "std.out"; StdError = "std.err"; InputSandbox = {"$scriptPath/$scriptName"}; -OutputSandbox = {"std.out", "std.err"}; +OutputSandbox = {"std.out", "std.err", "${scriptName}.provenance.json}"}; CPUTime = "$cpuTime"; Priority = $priority; Site = "$site"; From 02009bfb41ada3dd6dcb5eac219350dce0015772 Mon Sep 17 00:00:00 2001 From: Axel Bonnet Date: Fri, 2 Feb 2024 14:35:08 +0100 Subject: [PATCH 3/8] adding conf to disable automatic failed sites ban --- .../plugin/executor/dirac/DiracConfiguration.java | 11 +++++++++++ .../gasw/plugin/executor/dirac/DiracConstants.java | 1 + .../executor/dirac/execution/DiracOutputParser.java | 8 +++++++- .../dirac/execution/DiracJdlGeneratorTest.java | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/DiracConfiguration.java b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/DiracConfiguration.java index 4784957..e2bb6cc 100644 --- a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/DiracConfiguration.java +++ b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/DiracConfiguration.java @@ -58,6 +58,7 @@ public class DiracConfiguration { private boolean notificationEnabled; private int notificationPort; private boolean balanceEnabled; + private boolean dynamicBanEnabled; private List bannedSites; private List siteNamesToIgnore; @@ -79,6 +80,7 @@ public static void setConfiguration( boolean notificationEnabled, int notificationPort, boolean balanceEnabled, + boolean dynamicBanEnabled, List bannedSites, List namesToIgnore) { @@ -92,6 +94,7 @@ public static void setConfiguration( notificationEnabled, notificationPort, balanceEnabled, + dynamicBanEnabled, bannedSites, namesToIgnore); } @@ -106,6 +109,7 @@ private DiracConfiguration( boolean notificationEnabled, int notificationPort, boolean balanceEnabled, + boolean dynamicBanEnabled, List bannedSites, List namesToIgnore) { @@ -118,6 +122,7 @@ private DiracConfiguration( this.notificationEnabled = notificationEnabled; this.notificationPort = notificationPort; this.balanceEnabled = balanceEnabled; + this.dynamicBanEnabled = dynamicBanEnabled; this.bannedSites = bannedSites; this.siteNamesToIgnore = namesToIgnore; } @@ -136,6 +141,7 @@ private DiracConfiguration() throws GaswException { notificationEnabled = config.getBoolean(DiracConstants.LAB_NOTIFICATION_ENABLED, false); notificationPort = config.getInt(DiracConstants.LAB_NOTIFICATION_PORT, 50009); balanceEnabled = config.getBoolean(DiracConstants.LAB_BALANCE_ENABLED, false); + dynamicBanEnabled = config.getBoolean(DiracConstants.LAB_CONF_DYNAMIC_BAN_ENABLED, true); bannedSites = config.getList(DiracConstants.LAB_CONF_BANNED_SITES, new ArrayList()); siteNamesToIgnore = config.getList(DiracConstants.LAB_CONF_SITE_NAMES_TO_IGNORE, Arrays.asList("Any", "Multiple")); @@ -148,6 +154,7 @@ private DiracConfiguration() throws GaswException { config.setProperty(DiracConstants.LAB_NOTIFICATION_ENABLED, notificationEnabled); config.setProperty(DiracConstants.LAB_NOTIFICATION_PORT, notificationPort); config.setProperty(DiracConstants.LAB_BALANCE_ENABLED, balanceEnabled); + config.setProperty(DiracConstants.LAB_CONF_DYNAMIC_BAN_ENABLED, dynamicBanEnabled); config.setProperty(DiracConstants.LAB_CONF_BANNED_SITES, bannedSites); config.setProperty(DiracConstants.LAB_CONF_SITE_NAMES_TO_IGNORE, siteNamesToIgnore); @@ -194,6 +201,10 @@ public int getNotificationPort() { return notificationPort; } + public boolean isDynamicBanEnabled() { + return dynamicBanEnabled; + } + public String[] getBannedSites() { return bannedSites.toArray(new String[]{}); } diff --git a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/DiracConstants.java b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/DiracConstants.java index a1f5935..ff14d5e 100644 --- a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/DiracConstants.java +++ b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/DiracConstants.java @@ -50,6 +50,7 @@ public class DiracConstants { public static final String LAB_NOTIFICATION_ENABLED = "plugin.dirac.notification.enabled"; public static final String LAB_NOTIFICATION_PORT = "plugin.dirac.notification.port"; public static final String LAB_CONF_BANNED_SITES = "plugin.dirac.conf.sites.banned"; + public static final String LAB_CONF_DYNAMIC_BAN_ENABLED = "plugin.dirac.conf.sites.dynamic-ban.enabled"; public static final String LAB_CONF_SITE_NAMES_TO_IGNORE = "plugin.dirac.conf.sites.ignored"; // Environment Variables public static final String ENV_BANNED_SITE = "diracBannedSite"; diff --git a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java index 02359b8..8bccdb0 100644 --- a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java +++ b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java @@ -36,6 +36,7 @@ import fr.insalyon.creatis.gasw.dao.DAOException; import fr.insalyon.creatis.gasw.execution.GaswOutputParser; import fr.insalyon.creatis.gasw.execution.GaswStatus; +import fr.insalyon.creatis.gasw.plugin.executor.dirac.DiracConfiguration; import fr.insalyon.creatis.gasw.plugin.executor.dirac.bean.JobPool; import fr.insalyon.creatis.gasw.plugin.executor.dirac.dao.DiracDAOFactory; import java.io.BufferedReader; @@ -227,7 +228,12 @@ private void closeProcess(Process process) { @Override protected void resubmit() throws GaswException { DiracJdlGenerator generator = DiracJdlGenerator.getInstance(); - generator.updateBannedSitesInJdl(job.getFileName() + ".jdl"); + if (DiracConfiguration.getInstance().isDynamicBanEnabled()) { + logger.info("Dynamic ban enabled : updating the banned site list"); + generator.updateBannedSitesInJdl(job.getFileName() + ".jdl"); + } else { + logger.info("Dynamic ban NOT enabled : NOT updating the banned site list"); + } try { DiracDAOFactory.getInstance().getJobPoolDAO().add( new JobPool(job.getFileName(), job.getCommand(), job.getParameters())); diff --git a/src/test/java/fr/insalyon/creatis/gasw/plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java b/src/test/java/fr/insalyon/creatis/gasw/plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java index f82f9ac..ce812c9 100644 --- a/src/test/java/fr/insalyon/creatis/gasw/plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java +++ b/src/test/java/fr/insalyon/creatis/gasw/plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java @@ -38,6 +38,7 @@ public static void createConfiguration() { false, 3306, false, + true, Arrays.asList("first.banned.site", "second.banned.site"), Arrays.asList("Any", "Multiple")); } From 3188a2d2276be597fc56283715fa30e7b4d0640c Mon Sep 17 00:00:00 2001 From: Axel Bonnet Date: Fri, 9 Feb 2024 13:54:06 +0100 Subject: [PATCH 4/8] retry several times dirac-wms-job-get-output if it fails --- .../dirac/execution/DiracOutputParser.java | 182 ++++++++++-------- 1 file changed, 104 insertions(+), 78 deletions(-) diff --git a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java index 02359b8..fd39e45 100644 --- a/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java +++ b/src/main/java/fr/insalyon/creatis/gasw/plugin/executor/dirac/execution/DiracOutputParser.java @@ -41,6 +41,8 @@ import java.io.BufferedReader; import java.io.File; import java.io.IOException; +import java.util.concurrent.TimeUnit; + import org.apache.log4j.Logger; import static fr.insalyon.creatis.gasw.plugin.executor.dirac.execution.DiracJdlGenerator.*; @@ -57,101 +59,125 @@ public class DiracOutputParser extends GaswOutputParser { private File provenance; public DiracOutputParser(String jobID) { - super(jobID); } @Override public GaswOutput getGaswOutput() throws GaswException { - try { - GaswExitCode gaswExitCode = GaswExitCode.UNDEFINED; - - if (job.getStatus() != GaswStatus.CANCELLED - && job.getStatus() != GaswStatus.DELETED - && job.getStatus() != GaswStatus.STALLED) { - - Process process = GaswUtil.getProcess(logger, "dirac-wms-job-get-output", job.getId()); - process.waitFor(); - - if (process.exitValue() == 0) { - stdOut = moveDiracOutputStdFile(GaswConstants.OUT_EXT, GaswConstants.OUT_ROOT); - stdErr = moveDiracOutputStdFile(GaswConstants.ERR_EXT, GaswConstants.ERR_ROOT); - provenance = moveDiracOutputProvenanceFile(); - - - new File("./" + job.getId()).delete(); - - int exitCode = parseStdOut(stdOut); - exitCode = parseStdErr(stdErr, exitCode); - - switch (exitCode) { - case 0: - gaswExitCode = GaswExitCode.SUCCESS; - break; - case 1: - gaswExitCode = GaswExitCode.ERROR_READ_GRID; - break; - case 2: - gaswExitCode = GaswExitCode.ERROR_WRITE_GRID; - break; - case 3: - gaswExitCode = GaswExitCode.ERROR_FILE_NOT_FOUND; - break; - case 6: - gaswExitCode = GaswExitCode.EXECUTION_FAILED; - break; - case 7: - gaswExitCode = GaswExitCode.ERROR_WRITE_LOCAL; - break; - } - } else { - - BufferedReader br = GaswUtil.getBufferedReader(process); - String cout = ""; - String s = null; - while ((s = br.readLine()) != null) { - cout += s; - } - br.close(); - - logger.error(cout); - String message = "Output files do not exist."; - logger.error(message + " Job ID: " + job.getId()); - handleFiles (message); - - parseNonStdOut(GaswExitCode.ERROR_GET_STD.getExitCode()); - gaswExitCode = GaswExitCode.ERROR_GET_STD; - } + GaswExitCode gaswExitCode; + + if (job.getStatus() != GaswStatus.CANCELLED + && job.getStatus() != GaswStatus.DELETED + && job.getStatus() != GaswStatus.STALLED) { + + int remainingTries = 3; - closeProcess(process); + gaswExitCode = getAndParseDiracOutputFiles(); + while ( remainingTries > 0 && GaswExitCode.UNDEFINED.equals(gaswExitCode) ) { + logger.error("[Dirac] Error downloading logs for " + job.getId() + " . Remaining tries : " + remainingTries); + remainingTries--; + waitForNSeconds(10); + gaswExitCode = getAndParseDiracOutputFiles(); + } + + if (GaswExitCode.UNDEFINED.equals(gaswExitCode)) { + logger.error("[Dirac] dirac-wms-job-get-output failed 4 times for " + job.getId()); + String message = "Output files do not exist."; + handleFiles (message); + + parseNonStdOut(GaswExitCode.ERROR_GET_STD.getExitCode()); + gaswExitCode = GaswExitCode.ERROR_GET_STD; + } + + } else { + String message; + if (job.getStatus() == GaswStatus.CANCELLED) { + message = "Job Cancelled"; + gaswExitCode = GaswExitCode.EXECUTION_CANCELED; + parseNonStdOut(GaswExitCode.EXECUTION_CANCELED.getExitCode()); + } else if (job.getStatus() == GaswStatus.DELETED) { + message = "Job Deleted"; + gaswExitCode = GaswExitCode.EXECUTION_CANCELED; + parseNonStdOut(GaswExitCode.EXECUTION_CANCELED.getExitCode()); } else { + message = "Job Stalled"; + gaswExitCode = GaswExitCode.EXECUTION_STALLED; + parseNonStdOut(GaswExitCode.EXECUTION_STALLED.getExitCode()); + } + + handleFiles(message); + } - String message; - if (job.getStatus() == GaswStatus.CANCELLED) { - message = "Job Cancelled"; - gaswExitCode = GaswExitCode.EXECUTION_CANCELED; - parseNonStdOut(GaswExitCode.EXECUTION_CANCELED.getExitCode()); - } else if (job.getStatus() == GaswStatus.DELETED) { - message = "Job Deleted"; - gaswExitCode = GaswExitCode.EXECUTION_CANCELED; - parseNonStdOut(GaswExitCode.EXECUTION_CANCELED.getExitCode()); - } else { - message = "Job Stalled"; - gaswExitCode = GaswExitCode.EXECUTION_STALLED; - parseNonStdOut(GaswExitCode.EXECUTION_STALLED.getExitCode()); + return new GaswOutput(job.getFileName() + ".jdl", gaswExitCode, "", + uploadedResults, appStdOut, appStdErr, stdOut, stdErr); + } + + private void waitForNSeconds(int n) throws GaswException { + try { + TimeUnit.SECONDS.sleep(10); + } catch (InterruptedException e) { + logger.error("[Dirac] Error getting gasw output", e); + throw new GaswException(e); + } + } + /* + In case of success, return the GaswExitCode + In case of error, return GaswExitCode.UNDEFINED + */ + private GaswExitCode getAndParseDiracOutputFiles() throws GaswException { + Process process = null; + try { + process = GaswUtil.getProcess(logger, "dirac-wms-job-get-output", job.getId()); + process.waitFor(); + + if (process.exitValue() != 0) { + BufferedReader br = GaswUtil.getBufferedReader(process); + String cout = ""; + String s = null; + while ((s = br.readLine()) != null) { + cout += s; } + br.close(); - handleFiles(message); + logger.error("[Dirac] Error doing dirac-wms-job-get-output for Job ID: " + job.getId() + " | Status : " + process.exitValue()); + logger.error(cout); + return GaswExitCode.UNDEFINED; } - return new GaswOutput(job.getFileName() + ".jdl", gaswExitCode, "", - uploadedResults, appStdOut, appStdErr, stdOut, stdErr); - + stdOut = moveDiracOutputStdFile(GaswConstants.OUT_EXT, GaswConstants.OUT_ROOT); + stdErr = moveDiracOutputStdFile(GaswConstants.ERR_EXT, GaswConstants.ERR_ROOT); + provenance = moveDiracOutputProvenanceFile(); + + + new File("./" + job.getId()).delete(); + + int exitCode = parseStdOut(stdOut); + exitCode = parseStdErr(stdErr, exitCode); + + switch (exitCode) { + case 0: + return GaswExitCode.SUCCESS; + case 1: + return GaswExitCode.ERROR_READ_GRID; + case 2: + return GaswExitCode.ERROR_WRITE_GRID; + case 3: + return GaswExitCode.ERROR_FILE_NOT_FOUND; + case 6: + return GaswExitCode.EXECUTION_FAILED; + case 7: + return GaswExitCode.ERROR_WRITE_LOCAL; + default: + logger.error("[Dirac] Error after parsing job logs, unknown exit code : " + exitCode); + return GaswExitCode.UNDEFINED; + } } catch (InterruptedException | IOException ex) { logger.error("[Dirac] Error getting gasw output", ex); throw new GaswException(ex); + } finally { + closeProcess(process); } } From 6a111e010b8ae896eafd8203e60c6d5fed3f0dd7 Mon Sep 17 00:00:00 2001 From: Axel Bonnet Date: Thu, 7 Mar 2024 16:54:41 +0100 Subject: [PATCH 5/8] add maven ci to github --- .github/workflows/maven.yml | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..1e6c470 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,53 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven + +on: + push: + branches: [ develop, master ] + pull_request: + branches: develop +env: + isProduction: ${{ github.event_name == 'push' && github.ref_name == 'master' }} + mavenTarget: ${{ github.event_name == 'push' && 'deploy' || 'verify' }} + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + server-id: ${{ (env.isProduction == true && 'creatis-releases') || 'creatis-snapshots' }} + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Build with Maven + # deploy only for pushes on develop and master, et verify for PRs + run: mvn -B clean ${{ env.mavenTarget }} + env: + MAVEN_USERNAME: github + MAVEN_PASSWORD: ${{ secrets.NEXUS_PSW }} + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + with: + commit: ${{github.event.workflow_run.head_sha}} + report_paths: '**/target/*-reports/TEST-*.xml' + detailed_summary: true + include_passed: true + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 + if: github.event_name != 'pull_request' From 97a441bb3008a61f96e6ea5fa44bfb3845543bc7 Mon Sep 17 00:00:00 2001 From: Axel Bonnet Date: Thu, 7 Mar 2024 23:21:06 +0100 Subject: [PATCH 6/8] correct tests --- .github/workflows/maven.yml | 4 ++-- src/main/resources/vm/jdl/dirac-jdl.vm | 2 +- .../plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1e6c470..0111aa5 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -48,6 +48,6 @@ jobs: include_passed: true # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@v4 if: github.event_name != 'pull_request' diff --git a/src/main/resources/vm/jdl/dirac-jdl.vm b/src/main/resources/vm/jdl/dirac-jdl.vm index d5d33e5..89caeac 100644 --- a/src/main/resources/vm/jdl/dirac-jdl.vm +++ b/src/main/resources/vm/jdl/dirac-jdl.vm @@ -9,7 +9,7 @@ Executable = "$scriptName"; StdOutput = "std.out"; StdError = "std.err"; InputSandbox = {"$scriptPath/$scriptName"}; -OutputSandbox = {"std.out", "std.err", "${scriptName}.provenance.json}"}; +OutputSandbox = {"std.out", "std.err", "${scriptName}.provenance.json"}; CPUTime = "$cpuTime"; Priority = $priority; Site = "$site"; diff --git a/src/test/java/fr/insalyon/creatis/gasw/plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java b/src/test/java/fr/insalyon/creatis/gasw/plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java index ce812c9..7e3673d 100644 --- a/src/test/java/fr/insalyon/creatis/gasw/plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java +++ b/src/test/java/fr/insalyon/creatis/gasw/plugin/adaptor/dirac/execution/DiracJdlGeneratorTest.java @@ -88,7 +88,7 @@ public void creationJdl() throws GaswException { assertTrue(result.contains("StdOutput = \"std.out\";")); assertTrue(result.contains("StdError = \"std.err\";")); assertTrue(result.contains("InputSandbox = {\"")); - assertTrue(result.contains("OutputSandbox = {\"std.out\", \"std.err\"};")); + assertTrue(result.contains("OutputSandbox = {\"std.out\", \"std.err\", \"scriptName.provenance.json\"};")); assertTrue(result.contains("CPUTime = \"1800\";")); assertTrue(result.contains("Priority = 0;")); assertTrue(result.contains("Site = \"\";")); From 6e04f1d76fee5b839aa122c6c7713885d38fb547 Mon Sep 17 00:00:00 2001 From: Axel Bonnet Date: Mon, 11 Mar 2024 15:12:16 +0100 Subject: [PATCH 7/8] update ci script --- .github/workflows/maven.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0111aa5..afbb042 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,11 +11,13 @@ name: Java CI with Maven on: push: branches: [ develop, master ] + paths-ignore: + - 'README.md' pull_request: branches: develop -env: +env: # beware env value are of string type, not boolean. Need to use fromJSON to convert them to boolean isProduction: ${{ github.event_name == 'push' && github.ref_name == 'master' }} - mavenTarget: ${{ github.event_name == 'push' && 'deploy' || 'verify' }} + prepareRelease: ${{ github.event_name == 'push' && github.ref_name == 'develop' && contains(github.event.head_commit.message, 'prepare release') }} jobs: build: @@ -29,7 +31,7 @@ jobs: java-version: '11' distribution: 'temurin' cache: maven - server-id: ${{ (env.isProduction == true && 'creatis-releases') || 'creatis-snapshots' }} + server-id: ${{ (fromJSON(env.isProduction) && 'creatis-releases') || 'creatis-snapshots' }} server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Build with Maven @@ -38,7 +40,7 @@ jobs: env: MAVEN_USERNAME: github MAVEN_PASSWORD: ${{ secrets.NEXUS_PSW }} - + mavenTarget: ${{ github.event_name == 'push' && ! fromJSON(env.prepareRelease) && 'deploy' || 'verify' }} - name: Publish Test Report uses: mikepenz/action-junit-report@v3 with: @@ -49,5 +51,5 @@ jobs: # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@v4 + uses: advanced-security/maven-dependency-submission-action@v4.0.2 if: github.event_name != 'pull_request' From 6beaf85c37a92943fd10f94212ab2512447d38bc Mon Sep 17 00:00:00 2001 From: Axel Bonnet Date: Mon, 11 Mar 2024 15:13:13 +0100 Subject: [PATCH 8/8] prepare release 3.10 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ed208d6..db43801 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ fr.insalyon.creatis gasw-dirac-plugin - 3.10.0-SNAPSHOT + 3.10.0 jar GASW-Dirac-Plugin @@ -14,7 +14,7 @@ 11 11 - 3.10.0-SNAPSHOT + 3.10.0