From 0fa015388bba0c60e7a1d456969e57e97311171d Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 26 Aug 2022 15:36:16 -0400 Subject: [PATCH 1/5] Re-adding the windows snapshot with new changes Signed-off-by: Peter Zhu --- Pipfile.lock | 57 ++++++++++--------- .../opensearch/distribution-build.jenkinsfile | 2 +- manifests/2.2.0/opensearch-2.2.0.yml | 3 +- src/system/temporary_directory.py | 10 ++-- ...ArtifactsQualifier_actions_Jenkinsfile.txt | 4 +- ...ions_OpenSearch_Dashboards_Jenkinsfile.txt | 4 +- .../PromoteArtifacts_actions_Jenkinsfile.txt | 17 ++---- ...ions_OpenSearch_Dashboards_Jenkinsfile.txt | 4 +- .../uploadMinSnapshotsToS3_Jenkinsfile.txt | 23 ++------ vars/createSha512Checksums.groovy | 2 +- vars/uploadMinSnapshotsToS3.groovy | 15 +++-- 11 files changed, 65 insertions(+), 76 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 270165ad4c..bc7c1bae54 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -64,11 +64,11 @@ }, "charset-normalizer": { "hashes": [ - "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5", - "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413" + "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845", + "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f" ], "markers": "python_version >= '3.6'", - "version": "==2.1.0" + "version": "==2.1.1" }, "click": { "hashes": [ @@ -134,10 +134,10 @@ }, "distlib": { "hashes": [ - "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe", - "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c" + "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46", + "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e" ], - "version": "==0.3.5" + "version": "==0.3.6" }, "distro": { "hashes": [ @@ -280,18 +280,19 @@ }, "pathspec": { "hashes": [ - "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a", - "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1" + "sha256:01eecd304ba0e6eeed188ae5fa568e99ef10265af7fd9ab737d6412b4ee0ab85", + "sha256:aefa80ac32d5bf1f96139dca67cefb69a431beff4e6bf1168468f37d7ab87015" ], - "version": "==0.9.0" + "markers": "python_version >= '3.7'", + "version": "==0.10.0" }, "pathvalidate": { "hashes": [ - "sha256:8dbbc64e78e874ddff049ac187499d8bf34f890adb8b7f657e134a842832d3b9", - "sha256:bbc27e653335aba7935a2ade2299622e76a9487bc9004cdcf1441ce8d2ff4a54" + "sha256:5ff57d0fabe5ecb7a4f1e4957bfeb5ad8ab5ab4c0fa71f79c6bbc24bd9b7d14d", + "sha256:e39a4dfacdba70e3a96d3e4c6ff617a39e991cf242e6e1f2017f1f67c3408d33" ], "markers": "python_version >= '3.6'", - "version": "==2.5.1" + "version": "==2.5.2" }, "platformdirs": { "hashes": [ @@ -486,11 +487,11 @@ }, "setuptools": { "hashes": [ - "sha256:194b74f2c2d1800268fe2d857d99981e7c04d010de3099f04ee45ebec535e560", - "sha256:3bcaf6e27ad3b0f643ba0a48c5ab9eca930c3eb51df0e068f4826ab880c394ea" + "sha256:2e24e0bec025f035a2e72cdd1961119f557d78ad331bb00ff82efb2ab8da8e82", + "sha256:7732871f4f7fa58fb6bdcaeadb0161b2bd046c85905dbaa066bdcbcc81953b57" ], "markers": "python_version >= '3.7'", - "version": "==64.0.3" + "version": "==65.3.0" }, "six": { "hashes": [ @@ -591,34 +592,34 @@ }, "types-requests": { "hashes": [ - "sha256:7a9f7b152d594a1c18dd4932cdd2596b8efbeedfd73caa4e4abb3755805b4685", - "sha256:b0421f9f2d0dd0f8df2c75f974686517ca67473f05b466232d4c6384d765ad7a" + "sha256:86cb66d3de2f53eac5c09adc42cf6547eefbd0c7e1210beca1ee751c35d96083", + "sha256:feaf581bd580497a47fe845d506fa3b91b484cf706ff27774e87659837de9962" ], "index": "pypi", - "version": "==2.28.8" + "version": "==2.28.9" }, "types-urllib3": { "hashes": [ - "sha256:09a8783e1002472e8d1e1f3792d4c5cca1fffebb9b48ee1512aae6d16fe186bc", - "sha256:b05af90e73889e688094008a97ca95788db8bf3736e2776fd43fb6b171485d94" + "sha256:333e675b188a1c1fd980b4b352f9e40572413a4c1ac689c23cd546e96310070a", + "sha256:b78e819f0e350221d0689a5666162e467ba3910737bafda14b5c2c85e9bb1e56" ], - "version": "==1.26.22" + "version": "==1.26.23" }, "typing-extensions": { "hashes": [ "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02", "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6" ], - "markers": "python_version >= '3.7'", + "markers": "python_version < '3.8'", "version": "==4.3.0" }, "urllib3": { "hashes": [ - "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc", - "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a" + "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e", + "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'", - "version": "==1.26.11" + "version": "==1.26.12" }, "validators": { "hashes": [ @@ -629,11 +630,11 @@ }, "virtualenv": { "hashes": [ - "sha256:4193b7bc8a6cd23e4eb251ac64f29b4398ab2c233531e66e40b19a6b7b0d30c1", - "sha256:d86ea0bb50e06252d79e6c241507cb904fcd66090c3271381372d6221a3970f9" + "sha256:014f766e4134d0008dcaa1f95bafa0fb0f575795d07cae50b1bee514185d6782", + "sha256:035ed57acce4ac35c82c9d8802202b0e71adac011a511ff650cbcf9635006a22" ], "markers": "python_version >= '3.6'", - "version": "==20.16.3" + "version": "==20.16.4" }, "yamlfix": { "hashes": [ diff --git a/jenkins/opensearch/distribution-build.jenkinsfile b/jenkins/opensearch/distribution-build.jenkinsfile index 252822b1d9..ad2014549a 100644 --- a/jenkins/opensearch/distribution-build.jenkinsfile +++ b/jenkins/opensearch/distribution-build.jenkinsfile @@ -199,7 +199,7 @@ pipeline { } } } - stage('build-snapshot-windows-x64-tar') { + stage('build-snapshot-windows-x64-zip') { agent { node { label 'Jenkins-Agent-Windows2019-X64-C54xlarge-Single-Host' diff --git a/manifests/2.2.0/opensearch-2.2.0.yml b/manifests/2.2.0/opensearch-2.2.0.yml index 4cff236d51..fbd4acc0ab 100644 --- a/manifests/2.2.0/opensearch-2.2.0.yml +++ b/manifests/2.2.0/opensearch-2.2.0.yml @@ -15,10 +15,11 @@ components: - gradle:publish - gradle:properties:version - name: common-utils - repository: https://github.com/opensearch-project/common-utils.git + repository: https://github.com/opensearch-build/common-utils.git ref: tags/2.2.0.0 platforms: - linux + - windows checks: - gradle:publish - gradle:properties:version diff --git a/src/system/temporary_directory.py b/src/system/temporary_directory.py index bda92e0fb3..33ec6dce81 100644 --- a/src/system/temporary_directory.py +++ b/src/system/temporary_directory.py @@ -19,17 +19,17 @@ def g__handleRemoveReadonly(func: FunctionType, path: str, exc: Any) -> Any: logging.debug(f"excvalue {excvalue}") logging.debug(f"func {func.__name__}") if func in (os.rmdir, os.remove, os.unlink): - os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO | stat.S_IWRITE | stat.S_IREAD) # 0777 nix* / +wr windows + os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO | stat.S_IREAD | stat.S_IWRITE) # 0777 nix* / +wr windows retry_total = 3 for retry_count in range(retry_total): # Re-run func to force deletion especially on windows try: - logging.debug(f'Try count: {retry_count + 1}/{retry_total}') + logging.warn(f'Removing try count: {retry_count + 1}/{retry_total} for {path}') func_result = func(path) + logging.debug(f'func_result: {func_result}') if func_result is None: break except Exception as ex: - logging.warn(func_result) - logging.warn(ex) + logging.warn(f'Exception: {ex}') else: raise @@ -58,5 +58,5 @@ def __exit__(self, exc_type: Any, exc_value: Any, exc_traceback: Any) -> None: if self.keep: logging.info(f"Keeping {self.name}") else: - logging.debug(f"Removing {self.name}") + logging.info(f"Removing {self.name}") shutil.rmtree(self.name, ignore_errors=False, onerror=g__handleRemoveReadonly) diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt index 3406463300..068dfee323 100644 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt @@ -27,7 +27,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.tar*,**/opensearch-2.0.0-rc1*.tar*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.tar*,**/opensearch-2.0.0-rc1*.tar*}) @@ -65,7 +65,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.rpm*,**/opensearch-2.0.0-rc1*.rpm*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.rpm*,**/opensearch-2.0.0-rc1*.rpm*}) diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt index eb5d38293f..73819d4cc0 100644 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt @@ -27,7 +27,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.tar*,**/opensearch-dashboards-2.0.0-rc1*.tar*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.tar*,**/opensearch-dashboards-2.0.0-rc1*.tar*}) @@ -65,7 +65,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.rpm*,**/opensearch-dashboards-2.0.0-rc1*.rpm*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.rpm*,**/opensearch-dashboards-2.0.0-rc1*.rpm*}) diff --git a/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt index 4c85171470..4e1e956ecc 100644 --- a/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt @@ -25,16 +25,9 @@ promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins) promoteArtifacts.println(Signing Starts) promoteArtifacts.println(Signing Core Plugins) - createSha512Checksums.sh({script=find tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins -type f, returnStdout=true}) - createSha512Checksums.echo(Creating sha for tar_dummy_artifact_1.3.0.tar.gz) - createSha512Checksums.sh({script=sha512sum tar_dummy_artifact_1.3.0.tar.gz, returnStdout=true}) - createSha512Checksums.sh({script=basename tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/tar_dummy_artifact_1.3.0.tar.gz, returnStdout=true}) - createSha512Checksums.writeFile({file=tar_dummy_artifact_1.3.0.tar.gz.sha512, text=shaHashDummy_tar_dummy_artifact_1.3.0.tar.gz tar_dummy_artifact_1.3.0.tar.gz}) - createSha512Checksums.echo(Creating sha for zip_dummy_artifact_1.3.0.zip) - createSha512Checksums.sh({script=sha512sum zip_dummy_artifact_1.3.0.zip, returnStdout=true}) - createSha512Checksums.sh({script=basename tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/zip_dummy_artifact_1.3.0.zip, returnStdout=true}) - createSha512Checksums.writeFile({file=zip_dummy_artifact_1.3.0.zip.sha512, text=shaHashDummy_zip_dummy_artifact_1.3.0.zip zip_dummy_artifact_1.3.0.zip}) - createSha512Checksums.echo(Not generating sha for dummy_artifact_1.3.0.dummy in tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins, doesn't match allowed types [.tar.gz, .zip, .rpm]) + createSha512Checksums.sh({script=find tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/ -type f, returnStdout=true}) + createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins, doesn't match allowed types [.tar.gz, .zip, .rpm]) + createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins}) signArtifacts.echo(PGP or Windows Signature Signing) signArtifacts.fileExists(tests/jenkins/sign.sh) @@ -59,7 +52,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.tar*,**/opensearch-1.3.0*.tar*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.tar*,**/opensearch-1.3.0*.tar*}) @@ -117,7 +110,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.rpm*,**/opensearch-1.3.0*.rpm*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.rpm*,**/opensearch-1.3.0*.rpm*}) diff --git a/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt index 8e05a891a0..984d985dac 100644 --- a/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt @@ -27,7 +27,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.tar*,**/opensearch-dashboards-1.3.0*.tar*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.tar*,**/opensearch-dashboards-1.3.0*.tar*}) @@ -65,7 +65,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.rpm*,**/opensearch-dashboards-1.3.0*.rpm*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.rpm*,**/opensearch-dashboards-1.3.0*.rpm*}) diff --git a/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt b/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt index 17ae992024..f03ada47bd 100644 --- a/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt +++ b/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt @@ -15,24 +15,13 @@ uploadMinSnapshotsToS3.readYaml({file=tests/data/tar/builds/opensearch/manifest.yml}) BuildManifest.asBoolean() uploadMinSnapshotsToS3.echo(Create .sha512 for Min Snapshots Artifacts) - createSha512Checksums.sh({script=find tests/data/tar/builds/opensearch/dist -type f, returnStdout=true}) - createSha512Checksums.echo(Creating sha for opensearch-min-1.3.0-linux-x64.tar.gz) - createSha512Checksums.sh({script=sha512sum opensearch-min-1.3.0-linux-x64.tar.gz, returnStdout=true}) - createSha512Checksums.sh({script=basename ccc, returnStdout=true}) - createSha512Checksums.writeFile({file=opensearch-min-1.3.0-linux-x64.tar.gz.sha512, text=bbb -bbb -ccc -}) - createSha512Checksums.echo(Creating sha for opensearch-dashboards-min-1.3.0-linux-x64.tar.gz) - createSha512Checksums.sh({script=sha512sum opensearch-dashboards-min-1.3.0-linux-x64.tar.gz, returnStdout=true}) - createSha512Checksums.sh({script=basename ccc, returnStdout=true}) - createSha512Checksums.writeFile({file=opensearch-dashboards-min-1.3.0-linux-x64.tar.gz.sha512, text=bbb -bbb -ccc -}) + createSha512Checksums.sh({script=find tests/data/tar/builds/opensearch/dist/ -type f, returnStdout=true}) + createSha512Checksums.echo(Not generating sha for bbb in tests/data/tar/builds/opensearch/dist, doesn't match allowed types [.tar.gz, .zip, .rpm]) + createSha512Checksums.echo(Not generating sha for ccc in tests/data/tar/builds/opensearch/dist, doesn't match allowed types [.tar.gz, .zip, .rpm]) + uploadMinSnapshotsToS3.echo(Start copying files) uploadMinSnapshotsToS3.sh( - cp tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64.tar.gz tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz - cp tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64.tar.gz.sha512 tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz.sha512 + cp -v tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64.tar.gz tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz + cp -v tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64.tar.gz.sha512 tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz.sha512 sed -i "s/.tar.gz/-latest.tar.gz/g" tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz.sha512 ) uploadMinSnapshotsToS3.string({credentialsId=jenkins-artifact-promotion-role, variable=ARTIFACT_PROMOTION_ROLE_NAME}) diff --git a/vars/createSha512Checksums.groovy b/vars/createSha512Checksums.groovy index a3227cccb6..fcbddc6d8e 100644 --- a/vars/createSha512Checksums.groovy +++ b/vars/createSha512Checksums.groovy @@ -3,7 +3,7 @@ Closure call() { return { argsMap -> body: { - final foundFiles = sh(script: "find $argsMap.artifactPath -type f", returnStdout: true).split() + final foundFiles = sh(script: "find ${argsMap.artifactPath}/ -type f", returnStdout: true).split() for (file in foundFiles) { acceptTypeFound = false diff --git a/vars/uploadMinSnapshotsToS3.groovy b/vars/uploadMinSnapshotsToS3.groovy index 4603949f0e..92af23c19c 100644 --- a/vars/uploadMinSnapshotsToS3.groovy +++ b/vars/uploadMinSnapshotsToS3.groovy @@ -15,9 +15,12 @@ void call(Map args = [:]) { extension = buildManifest.build.getExtension() // Setup src & dst variables for artifacts - srcDir = "${WORKSPACE}/${args.distribution}/builds/${productName}/dist" - dstDir = "snapshots/core/${productName}/${version}" - baseName = "${productName}-min-${version}-${platform}-${architecture}" + // Replace backslash with forward slash ('\' to '/') in path + // Compatible with both Windows as well as any nix* env + // Else the map in groovy will treat '\' as escape char on Windows + String srcDir = "${WORKSPACE}/${args.distribution}/builds/${productName}/dist".replace("\\", "/") + String dstDir = "snapshots/core/${productName}/${version}" + String baseName = "${productName}-min-${version}-${platform}-${architecture}" // Create checksums echo('Create .sha512 for Min Snapshots Artifacts') @@ -27,9 +30,11 @@ void call(Map args = [:]) { action(argsMap) } + echo('Start copying files') + sh """ - cp ${srcDir}/${baseName}.${extension} ${srcDir}/${baseName}-latest.${extension} - cp ${srcDir}/${baseName}.${extension}.sha512 ${srcDir}/${baseName}-latest.${extension}.sha512 + cp -v ${srcDir}/${baseName}.${extension} ${srcDir}/${baseName}-latest.${extension} + cp -v ${srcDir}/${baseName}.${extension}.sha512 ${srcDir}/${baseName}-latest.${extension}.sha512 sed -i "s/.${extension}/-latest.${extension}/g" ${srcDir}/${baseName}-latest.${extension}.sha512 """ withCredentials([ From fdf4f7efe4ec0a28ab8b5e999affcdc1a6ca06a7 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 2 Sep 2022 14:00:03 -0400 Subject: [PATCH 2/5] Update manifests Signed-off-by: Peter Zhu --- manifests/2.2.0/opensearch-2.2.0.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifests/2.2.0/opensearch-2.2.0.yml b/manifests/2.2.0/opensearch-2.2.0.yml index fbd4acc0ab..4cff236d51 100644 --- a/manifests/2.2.0/opensearch-2.2.0.yml +++ b/manifests/2.2.0/opensearch-2.2.0.yml @@ -15,11 +15,10 @@ components: - gradle:publish - gradle:properties:version - name: common-utils - repository: https://github.com/opensearch-build/common-utils.git + repository: https://github.com/opensearch-project/common-utils.git ref: tags/2.2.0.0 platforms: - linux - - windows checks: - gradle:publish - gradle:properties:version From 0523d8214f8fca5de883b5bea8b96ce797b3375f Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 2 Sep 2022 14:25:27 -0400 Subject: [PATCH 3/5] Add more tests Signed-off-by: Peter Zhu --- ...eArtifactsQualifier_actions_Jenkinsfile.txt | 4 ++-- ...tions_OpenSearch_Dashboards_Jenkinsfile.txt | 4 ++-- .../PromoteArtifacts_actions_Jenkinsfile.txt | 17 ++++++++++++----- ...tions_OpenSearch_Dashboards_Jenkinsfile.txt | 4 ++-- .../uploadMinSnapshotsToS3_Jenkinsfile.txt | 18 +++++++++++++++--- vars/createSha512Checksums.groovy | 2 +- 6 files changed, 34 insertions(+), 15 deletions(-) diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt index 068dfee323..3406463300 100644 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_Jenkinsfile.txt @@ -27,7 +27,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.tar*,**/opensearch-2.0.0-rc1*.tar*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.tar*,**/opensearch-2.0.0-rc1*.tar*}) @@ -65,7 +65,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.rpm*,**/opensearch-2.0.0-rc1*.rpm*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-min-2.0.0-rc1*.rpm*,**/opensearch-2.0.0-rc1*.rpm*}) diff --git a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt index 73819d4cc0..eb5d38293f 100644 --- a/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PromoteArtifactsQualifier_actions_OpenSearch_Dashboards_Jenkinsfile.txt @@ -27,7 +27,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.tar*,**/opensearch-dashboards-2.0.0-rc1*.tar*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.tar*,**/opensearch-dashboards-2.0.0-rc1*.tar*}) @@ -65,7 +65,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.rpm*,**/opensearch-dashboards-2.0.0-rc1*.rpm*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-2.0.0-rc1*.rpm*,**/opensearch-dashboards-2.0.0-rc1*.rpm*}) diff --git a/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt index 4e1e956ecc..4c85171470 100644 --- a/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PromoteArtifacts_actions_Jenkinsfile.txt @@ -25,9 +25,16 @@ promoteArtifacts.fileExists(tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins) promoteArtifacts.println(Signing Starts) promoteArtifacts.println(Signing Core Plugins) - createSha512Checksums.sh({script=find tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/ -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins, doesn't match allowed types [.tar.gz, .zip, .rpm]) + createSha512Checksums.sh({script=find tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins -type f, returnStdout=true}) + createSha512Checksums.echo(Creating sha for tar_dummy_artifact_1.3.0.tar.gz) + createSha512Checksums.sh({script=sha512sum tar_dummy_artifact_1.3.0.tar.gz, returnStdout=true}) + createSha512Checksums.sh({script=basename tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/tar_dummy_artifact_1.3.0.tar.gz, returnStdout=true}) + createSha512Checksums.writeFile({file=tar_dummy_artifact_1.3.0.tar.gz.sha512, text=shaHashDummy_tar_dummy_artifact_1.3.0.tar.gz tar_dummy_artifact_1.3.0.tar.gz}) + createSha512Checksums.echo(Creating sha for zip_dummy_artifact_1.3.0.zip) + createSha512Checksums.sh({script=sha512sum zip_dummy_artifact_1.3.0.zip, returnStdout=true}) + createSha512Checksums.sh({script=basename tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins/zip_dummy_artifact_1.3.0.zip, returnStdout=true}) + createSha512Checksums.writeFile({file=zip_dummy_artifact_1.3.0.zip.sha512, text=shaHashDummy_zip_dummy_artifact_1.3.0.zip zip_dummy_artifact_1.3.0.zip}) + createSha512Checksums.echo(Not generating sha for dummy_artifact_1.3.0.dummy in tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSignatureFiles.signArtifacts({sigtype=.sig, artifactPath=tests/jenkins/artifacts/tar/vars-build/1.3.0/33/linux/x64/tar/builds/opensearch/core-plugins}) signArtifacts.echo(PGP or Windows Signature Signing) signArtifacts.fileExists(tests/jenkins/sign.sh) @@ -52,7 +59,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.tar*,**/opensearch-1.3.0*.tar*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.tar*,**/opensearch-1.3.0*.tar*}) @@ -110,7 +117,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.rpm*,**/opensearch-1.3.0*.rpm*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-min-1.3.0*.rpm*,**/opensearch-1.3.0*.rpm*}) diff --git a/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt b/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt index 984d985dac..8e05a891a0 100644 --- a/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PromoteArtifacts_actions_OpenSearch_Dashboards_Jenkinsfile.txt @@ -27,7 +27,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.tar*,**/opensearch-dashboards-1.3.0*.tar*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.tar*,**/opensearch-dashboards-1.3.0*.tar*}) @@ -65,7 +65,7 @@ promoteArtifacts.println(Signing Core/Bundle Artifacts) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.rpm*,**/opensearch-dashboards-1.3.0*.rpm*}) promoteArtifacts.getPath() - createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip/ -type f, returnStdout=true}) + createSha512Checksums.sh({script=find tests/jenkins/tests/jenkins/file/found.zip -type f, returnStdout=true}) createSha512Checksums.echo(Not generating sha for bbb in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) createSha512Checksums.echo(Not generating sha for ccc in tests/jenkins/tests/jenkins/file/found.zip, doesn't match allowed types [.tar.gz, .zip, .rpm]) promoteArtifacts.findFiles({glob=**/opensearch-dashboards-min-1.3.0*.rpm*,**/opensearch-dashboards-1.3.0*.rpm*}) diff --git a/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt b/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt index f03ada47bd..92cbd91308 100644 --- a/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt +++ b/tests/jenkins/jobs/uploadMinSnapshotsToS3_Jenkinsfile.txt @@ -15,9 +15,21 @@ uploadMinSnapshotsToS3.readYaml({file=tests/data/tar/builds/opensearch/manifest.yml}) BuildManifest.asBoolean() uploadMinSnapshotsToS3.echo(Create .sha512 for Min Snapshots Artifacts) - createSha512Checksums.sh({script=find tests/data/tar/builds/opensearch/dist/ -type f, returnStdout=true}) - createSha512Checksums.echo(Not generating sha for bbb in tests/data/tar/builds/opensearch/dist, doesn't match allowed types [.tar.gz, .zip, .rpm]) - createSha512Checksums.echo(Not generating sha for ccc in tests/data/tar/builds/opensearch/dist, doesn't match allowed types [.tar.gz, .zip, .rpm]) + createSha512Checksums.sh({script=find tests/data/tar/builds/opensearch/dist -type f, returnStdout=true}) + createSha512Checksums.echo(Creating sha for opensearch-min-1.3.0-linux-x64.tar.gz) + createSha512Checksums.sh({script=sha512sum opensearch-min-1.3.0-linux-x64.tar.gz, returnStdout=true}) + createSha512Checksums.sh({script=basename ccc, returnStdout=true}) + createSha512Checksums.writeFile({file=opensearch-min-1.3.0-linux-x64.tar.gz.sha512, text=bbb +bbb +ccc +}) + createSha512Checksums.echo(Creating sha for opensearch-dashboards-min-1.3.0-linux-x64.tar.gz) + createSha512Checksums.sh({script=sha512sum opensearch-dashboards-min-1.3.0-linux-x64.tar.gz, returnStdout=true}) + createSha512Checksums.sh({script=basename ccc, returnStdout=true}) + createSha512Checksums.writeFile({file=opensearch-dashboards-min-1.3.0-linux-x64.tar.gz.sha512, text=bbb +bbb +ccc +}) uploadMinSnapshotsToS3.echo(Start copying files) uploadMinSnapshotsToS3.sh( cp -v tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64.tar.gz tests/data/tar/builds/opensearch/dist/opensearch-min-1.2.2-SNAPSHOT-linux-x64-latest.tar.gz diff --git a/vars/createSha512Checksums.groovy b/vars/createSha512Checksums.groovy index cd113a5fad..0fc2d2edc4 100644 --- a/vars/createSha512Checksums.groovy +++ b/vars/createSha512Checksums.groovy @@ -10,7 +10,7 @@ Closure call() { return { argsMap -> body: { - final foundFiles = sh(script: "find ${argsMap.artifactPath}/ -type f", returnStdout: true).split() + final foundFiles = sh(script: "find ${argsMap.artifactPath} -type f", returnStdout: true).split() for (file in foundFiles) { acceptTypeFound = false From c7855f6c2ddd2a98ecdc2c83aa5035c77b087682 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 2 Sep 2022 17:53:10 -0400 Subject: [PATCH 4/5] Restore Pipefile.lock Signed-off-by: Peter Zhu --- Pipfile.lock | 57 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index bc7c1bae54..270165ad4c 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -64,11 +64,11 @@ }, "charset-normalizer": { "hashes": [ - "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845", - "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f" + "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5", + "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413" ], "markers": "python_version >= '3.6'", - "version": "==2.1.1" + "version": "==2.1.0" }, "click": { "hashes": [ @@ -134,10 +134,10 @@ }, "distlib": { "hashes": [ - "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46", - "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e" + "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe", + "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c" ], - "version": "==0.3.6" + "version": "==0.3.5" }, "distro": { "hashes": [ @@ -280,19 +280,18 @@ }, "pathspec": { "hashes": [ - "sha256:01eecd304ba0e6eeed188ae5fa568e99ef10265af7fd9ab737d6412b4ee0ab85", - "sha256:aefa80ac32d5bf1f96139dca67cefb69a431beff4e6bf1168468f37d7ab87015" + "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a", + "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1" ], - "markers": "python_version >= '3.7'", - "version": "==0.10.0" + "version": "==0.9.0" }, "pathvalidate": { "hashes": [ - "sha256:5ff57d0fabe5ecb7a4f1e4957bfeb5ad8ab5ab4c0fa71f79c6bbc24bd9b7d14d", - "sha256:e39a4dfacdba70e3a96d3e4c6ff617a39e991cf242e6e1f2017f1f67c3408d33" + "sha256:8dbbc64e78e874ddff049ac187499d8bf34f890adb8b7f657e134a842832d3b9", + "sha256:bbc27e653335aba7935a2ade2299622e76a9487bc9004cdcf1441ce8d2ff4a54" ], "markers": "python_version >= '3.6'", - "version": "==2.5.2" + "version": "==2.5.1" }, "platformdirs": { "hashes": [ @@ -487,11 +486,11 @@ }, "setuptools": { "hashes": [ - "sha256:2e24e0bec025f035a2e72cdd1961119f557d78ad331bb00ff82efb2ab8da8e82", - "sha256:7732871f4f7fa58fb6bdcaeadb0161b2bd046c85905dbaa066bdcbcc81953b57" + "sha256:194b74f2c2d1800268fe2d857d99981e7c04d010de3099f04ee45ebec535e560", + "sha256:3bcaf6e27ad3b0f643ba0a48c5ab9eca930c3eb51df0e068f4826ab880c394ea" ], "markers": "python_version >= '3.7'", - "version": "==65.3.0" + "version": "==64.0.3" }, "six": { "hashes": [ @@ -592,34 +591,34 @@ }, "types-requests": { "hashes": [ - "sha256:86cb66d3de2f53eac5c09adc42cf6547eefbd0c7e1210beca1ee751c35d96083", - "sha256:feaf581bd580497a47fe845d506fa3b91b484cf706ff27774e87659837de9962" + "sha256:7a9f7b152d594a1c18dd4932cdd2596b8efbeedfd73caa4e4abb3755805b4685", + "sha256:b0421f9f2d0dd0f8df2c75f974686517ca67473f05b466232d4c6384d765ad7a" ], "index": "pypi", - "version": "==2.28.9" + "version": "==2.28.8" }, "types-urllib3": { "hashes": [ - "sha256:333e675b188a1c1fd980b4b352f9e40572413a4c1ac689c23cd546e96310070a", - "sha256:b78e819f0e350221d0689a5666162e467ba3910737bafda14b5c2c85e9bb1e56" + "sha256:09a8783e1002472e8d1e1f3792d4c5cca1fffebb9b48ee1512aae6d16fe186bc", + "sha256:b05af90e73889e688094008a97ca95788db8bf3736e2776fd43fb6b171485d94" ], - "version": "==1.26.23" + "version": "==1.26.22" }, "typing-extensions": { "hashes": [ "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02", "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6" ], - "markers": "python_version < '3.8'", + "markers": "python_version >= '3.7'", "version": "==4.3.0" }, "urllib3": { "hashes": [ - "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e", - "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997" + "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc", + "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'", - "version": "==1.26.12" + "version": "==1.26.11" }, "validators": { "hashes": [ @@ -630,11 +629,11 @@ }, "virtualenv": { "hashes": [ - "sha256:014f766e4134d0008dcaa1f95bafa0fb0f575795d07cae50b1bee514185d6782", - "sha256:035ed57acce4ac35c82c9d8802202b0e71adac011a511ff650cbcf9635006a22" + "sha256:4193b7bc8a6cd23e4eb251ac64f29b4398ab2c233531e66e40b19a6b7b0d30c1", + "sha256:d86ea0bb50e06252d79e6c241507cb904fcd66090c3271381372d6221a3970f9" ], "markers": "python_version >= '3.6'", - "version": "==20.16.4" + "version": "==20.16.3" }, "yamlfix": { "hashes": [ From bbfc55d4196a2dd6953ea0249418c3d071f47af1 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 2 Sep 2022 17:55:58 -0400 Subject: [PATCH 5/5] Tweak comments Signed-off-by: Peter Zhu --- src/system/temporary_directory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/temporary_directory.py b/src/system/temporary_directory.py index 33ec6dce81..ec775ec01f 100644 --- a/src/system/temporary_directory.py +++ b/src/system/temporary_directory.py @@ -19,7 +19,7 @@ def g__handleRemoveReadonly(func: FunctionType, path: str, exc: Any) -> Any: logging.debug(f"excvalue {excvalue}") logging.debug(f"func {func.__name__}") if func in (os.rmdir, os.remove, os.unlink): - os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO | stat.S_IREAD | stat.S_IWRITE) # 0777 nix* / +wr windows + os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO | stat.S_IREAD | stat.S_IWRITE) # 0777 nix* / +rw windows retry_total = 3 for retry_count in range(retry_total): # Re-run func to force deletion especially on windows try: