diff --git a/.github/workflows/JirabotMerge.yml b/.github/workflows/JirabotMerge.yml index 201e0f621..ea5235341 100644 --- a/.github/workflows/JirabotMerge.yml +++ b/.github/workflows/JirabotMerge.yml @@ -13,15 +13,23 @@ jobs: if: github.event.pull_request.merged == true steps: - name: "Debug Vars" + env: + JIRA_URL : ${{ vars.JIRA_URL }} + PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }} + PULL_REQUEST_TITLE : ${{ github.event.pull_request.title }} + PULL_REQUEST_AUTHOR_NAME : ${{ github.event.pull_request.user.login }} + PULL_URL: ${{ github.event.pull_request.html_url }} + COMMENTS_URL: ${{ github.event.pull_request.comments_url }} + BRANCH_NAME: ${{ github.ref_name }} run: | - echo "JIRA_URL: ${{ vars.JIRA_URL }}" - echo "Pull Request Number: ${{ github.event.pull_request.number }}" - echo "Pull Request Title: ${{ github.event.pull_request.title }}" - echo "Pull Request Author Name: ${{ github.event.pull_request.user.login }}" - echo "Pull Request URL: ${{ github.event.pull_request.html_url }}" - echo "Comments URL: ${{ github.event.pull_request.comments_url }}" - echo "Branch Name: ${{ github.ref_name }}" - - uses: "actions/setup-python@v2" + echo "JIRA_URL: $JIRA_URL" + echo "Pull Request Number: $PULL_REQUEST_NUMBER" + echo "Pull Request Title: $PULL_REQUEST_TITLE" + echo "Pull Request Author Name: $PULL_REQUEST_AUTHOR_NAME" + echo "Pull Request URL: $PULL_URL" + echo "Comments URL: $COMMENTS_URL" + echo "Branch Name: $BRANCH_NAME" + - uses: "actions/setup-python@v5" with: python-version: "3.8" - name: "Install dependencies" @@ -33,7 +41,7 @@ jobs: python -m pip install --upgrade atlassian-python-api python -m pip install --upgrade jira - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} fetch-depth: 0 @@ -51,6 +59,7 @@ jobs: COMMENTS_URL: ${{ github.event.pull_request.comments_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: ${{ github.ref_name }} + shell: python run: | import os import re @@ -255,7 +264,7 @@ jobs: sys.exit(1) project_prefixes = projectConfig.get('projectPrefixes') - if not project_prefixes: + if project_prefixes is None: print('Error: PROJECT_CONFIG is missing required field: projectPrefixes. Add a "projectPrefixes" JSON array of project prefix strings to the PROJECT_CONFIG.') sys.exit(1) @@ -291,5 +300,4 @@ jobs: else: print('Unable to find Jira issue name in title') - print(result) - shell: python + print(result) \ No newline at end of file diff --git a/.github/workflows/baremetal-regression-suite.yml b/.github/workflows/baremetal-regression-suite.yml index 7637993ca..4b7f53dc7 100644 --- a/.github/workflows/baremetal-regression-suite.yml +++ b/.github/workflows/baremetal-regression-suite.yml @@ -129,11 +129,16 @@ jobs: latestVersionStr = ".".join(map(str, latestVersion)) latestVersionURL = 'https://cdn.hpccsystems.com/releases/CE-Candidate-' + latestVersionStr \ + '/bin/platform/hpccsystems-platform-community_' + latestVersionStr + '-1jammy_amd64_withsymbols.deb' - - print(f"::set-output name=previousVersion::{previousVersionStr}") - print(f"::set-output name=previousVersionURL::{previousVersionURL}") - print(f"::set-output name=latestVersion::{latestVersionStr}") - print(f"::set-output name=latestVersionURL::{latestVersionURL}") + + github_output_path = os.getenv('GITHUB_OUTPUT') + if github_output_path: + with open(github_output_path, 'a') as output_file: + output_file.write(f"previousVersion={previousVersionStr}\n") + output_file.write(f"previousVersionURL={previousVersionURL}\n") + output_file.write(f"latestVersion={latestVersionStr}\n") + output_file.write(f"latestVersionURL={latestVersionURL}\n") + else: + print('GITHUB_OUTPUT environment variable is not set.') - name: Install latest version run: | diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java index 8389138d6..93afd2616 100644 --- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java +++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java @@ -335,9 +335,11 @@ private static String[] getCredentials(CommandLine cmd) { Console console = System.console(); + boolean nonInteractive = cmd.hasOption("non_interactive"); + String user = cmd.getOptionValue("user"); boolean userIsEmpty = user == null || user.isEmpty(); - if (userIsEmpty) + if (userIsEmpty && !nonInteractive) { user = new String(console.readLine("Enter username: ")); userIsEmpty = user == null || user.isEmpty(); @@ -345,7 +347,7 @@ private static String[] getCredentials(CommandLine cmd) String pass = cmd.getOptionValue("pass"); boolean passIsEmpty = pass == null || pass.isEmpty(); - if (!userIsEmpty && passIsEmpty) + if (!userIsEmpty && passIsEmpty & !nonInteractive) { pass = new String(console.readPassword("Enter password for " + user + ": ")); } @@ -642,6 +644,7 @@ private static Options getReadOptions() options.addOption("socket_timeout_seconds", true, "Sets the socket operation timeout in seconds."); options.addOption("connection_startup_limit", true, "Specifies the maximum number of connections to startup concurrently." + " useful in cases where starting up connections too quickly can overwhelm intermediate processes."); + options.addOption("non_interactive", false, "Disables prompting for credentials if they are not provided."); options.addOption(Option.builder("read") .argName("files") @@ -672,6 +675,7 @@ private static Options getReadTestOptions() options.addOption("socket_timeout_seconds", true, "Sets the socket operation timeout in seconds."); options.addOption("connection_startup_limit", true, "Specifies the maximum number of connections to startup concurrently." + " useful in cases where starting up connections too quickly can overwhelm intermediate processes."); + options.addOption("non_interactive", false, "Disables prompting for credentials if they are not provided."); options.addOption(Option.builder("file_parts") .argName("_file_parts") @@ -697,6 +701,7 @@ private static Options getCopyOptions() options.addOption("socket_timeout_seconds", true, "Sets the socket operation timeout in seconds."); options.addOption("connection_startup_limit", true, "Specifies the maximum number of connections to startup concurrently." + " useful in cases where starting up connections too quickly can overwhelm intermediate processes."); + options.addOption("non_interactive", false, "Disables prompting for credentials if they are not provided."); options.addOption(Option.builder("copy") .argName("files") @@ -721,6 +726,7 @@ private static Options getWriteOptions() options.addOption("socket_timeout_seconds", true, "Sets the socket operation timeout in seconds."); options.addOption("connection_startup_limit", true, "Specifies the maximum number of connections to startup concurrently." + " useful in cases where starting up connections too quickly can overwhelm intermediate processes."); + options.addOption("non_interactive", false, "Disables prompting for credentials if they are not provided."); options.addOption(Option.builder("write") .argName("files") @@ -1962,14 +1968,14 @@ private static void performCopy(String[] args, TaskContext context) { String readArgs[] = {"-read", srcFile, "-url", srcURL, "-format", "thor", "-user", user, "-pass", pass, - "-out", "tmp-read"}; + "-out", "tmp-read", "-non_interactive"}; performRead(readArgs, context); String writeArgs[] = {"-write", "tmp-read" + File.separator + srcFile.replace(':', '_') + "*" + " " + destFile, "-url", srcURL, "-dest_url", destURL, "-dest_cluster", destClusterName, - "-user", user, "-pass", pass }; + "-user", user, "-pass", pass, "-non_interactive"}; performWrite(writeArgs, context); } @@ -2280,4 +2286,4 @@ public static void main(String[] args) return; } -} +} diff --git a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSIndexTest.java b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSIndexTest.java index 598090990..887675ee1 100644 --- a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSIndexTest.java +++ b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSIndexTest.java @@ -18,6 +18,7 @@ import org.junit.Assert; import org.junit.Assume; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -114,7 +115,8 @@ public void setup() throws Exception } } - @Test + // Ignoring this test until underlying TLK support changes have been made + @Ignore @Test public void hpccTLKFilterTest() throws Exception { for (int i = 0; i < datasetNames.length; i++) diff --git a/dfsclient/src/test/java/org/hpccsystems/dfs/client/FileUtilityTest.java b/dfsclient/src/test/java/org/hpccsystems/dfs/client/FileUtilityTest.java index f62c3d39a..eeb068b8e 100644 --- a/dfsclient/src/test/java/org/hpccsystems/dfs/client/FileUtilityTest.java +++ b/dfsclient/src/test/java/org/hpccsystems/dfs/client/FileUtilityTest.java @@ -46,7 +46,7 @@ public void thorFileTests() { { String readArgs[] = {"-read", "benchmark::integer::20kb", "-url", this.connString, - "-format", "thor", "-user", this.hpccUser, "-pass", this.hpccPass }; + "-format", "thor", "-user", this.hpccUser, "-pass", this.hpccPass, "-non_interactive" }; JSONArray results = FileUtility.run(readArgs); JSONObject result = results.optJSONObject(0); @@ -58,7 +58,7 @@ public void thorFileTests() { String readArgs[] = {"-read_test", "benchmark::integer::20kb", "-url", this.connString, - "-user", this.hpccUser, "-pass", this.hpccPass, "-file_parts", "1" }; + "-user", this.hpccUser, "-pass", this.hpccPass, "-file_parts", "1", "-non_interactive" }; JSONArray results = FileUtility.run(readArgs); JSONObject result = results.optJSONObject(0); @@ -72,7 +72,7 @@ public void thorFileTests() String copyArgs[] = {"-copy", "benchmark::integer::20kb benchmark::integer::20kb-copy", "-url", this.connString, "-dest_url", this.connString, "-dest_cluster", this.thorClusterFileGroup, - "-user", this.hpccUser, "-pass", this.hpccPass }; + "-user", this.hpccUser, "-pass", this.hpccPass, "-non_interactive" }; JSONArray results = FileUtility.run(copyArgs); JSONObject result = results.optJSONObject(0); @@ -87,7 +87,7 @@ public void thorFileTests() String writeArgs[] = {"-write", localDir + "benchmark__integer__20kb* benchmark::integer::20kb_write", "-url", this.connString, "-dest_url", this.connString, "-dest_cluster", this.thorClusterFileGroup, - "-user", this.hpccUser, "-pass", this.hpccPass }; + "-user", this.hpccUser, "-pass", this.hpccPass, "-non_interactive" }; JSONArray results = FileUtility.run(writeArgs); JSONObject result = results.optJSONObject(0);