From e4c02bd19adca53a44d1a79cb8a1af48d463fd8b Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Mon, 10 Jul 2023 16:19:04 -0400 Subject: [PATCH 01/25] removing use of semaphore cache as the public semaphore will not have cache --- .semaphore/semaphore.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 2d5efb98f715..40ed0ae5e31c 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -33,11 +33,9 @@ blocks: jobs: - name: "Install" commands: - - cache restore - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - - cache store - name: "Tests" task: @@ -47,7 +45,6 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout - - cache restore jobs: - name: "animal sniffer checks" commands: From 4b8fbef79c818a76221af5f9b479a75bdd585b52 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Tue, 11 Jul 2023 09:09:40 -0400 Subject: [PATCH 02/25] test removing settings.xml to get dep resolution output via public repos --- .semaphore/semaphore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 40ed0ae5e31c..bff2272b36e3 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -30,6 +30,7 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout + - rm ~/.m2/settings.xml jobs: - name: "Install" commands: From 48ff0908c4051087dfdbab2e8cceb1f8bc7c4c52 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Tue, 11 Jul 2023 09:12:45 -0400 Subject: [PATCH 03/25] remove settings.xml to get test output as well --- .semaphore/semaphore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index bff2272b36e3..3021d1c3359f 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -46,6 +46,7 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout + - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" commands: From 70603d9463b2b79981a118145b211609306a9334 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Tue, 11 Jul 2023 10:54:27 -0400 Subject: [PATCH 04/25] re-add caching to see output after changing to public maven.org --- .semaphore/semaphore.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 3021d1c3359f..f8ca7b78d2cb 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -34,9 +34,11 @@ blocks: jobs: - name: "Install" commands: + - cache restore - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C + - cache store - name: "Tests" task: From 5c6bf2ab1821f80b1f5d1158816df32907652f06 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Tue, 11 Jul 2023 11:19:58 -0400 Subject: [PATCH 05/25] tweak to test m2 --- .semaphore/semaphore.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index f8ca7b78d2cb..c01c440e3931 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -30,11 +30,11 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout - - rm ~/.m2/settings.xml jobs: - name: "Install" commands: - cache restore + - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C @@ -48,6 +48,7 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout + - cache restore - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" From fa6e0b9c727a8554ee8fb3fcdf47d04a380a25b2 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Thu, 13 Jul 2023 20:18:07 -0400 Subject: [PATCH 06/25] store .m2 and target as a tgz in artifact --- .semaphore/semaphore.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index c01c440e3931..150c217dc648 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -3,7 +3,8 @@ name: Apache Druid agent: machine: type: s1-prod-ubuntu20-04-amd64-1 - +execution_time_limit: + hours: 3 blocks: - name: "Install" task: @@ -33,12 +34,16 @@ blocks: jobs: - name: "Install" commands: - - cache restore - - rm ~/.m2/settings.xml + - cache restore + - tar zcvf cache.tgz .m2 target + - artifact push project cache.tgz + # - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - cache store + - tar zcvf cache-post.tgz .m2 target + - artifact push project cache-post.tgz - name: "Tests" task: @@ -49,7 +54,6 @@ blocks: - sem-version java 17 - checkout - cache restore - - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" commands: From d71ea07cd3f183d7d98fabf621661836bd45f514 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Thu, 13 Jul 2023 20:28:43 -0400 Subject: [PATCH 07/25] rm confluent codeartifact mvn settings --- .semaphore/semaphore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 150c217dc648..f00caf717607 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -37,7 +37,7 @@ blocks: - cache restore - tar zcvf cache.tgz .m2 target - artifact push project cache.tgz - # - rm ~/.m2/settings.xml + - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C From c6126a058b75269e83260df422a53db345d5fb58 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 08:53:20 -0400 Subject: [PATCH 08/25] remove artifacts before upload --- .semaphore/semaphore.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index f00caf717607..aef55dd7f5a9 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -36,6 +36,7 @@ blocks: commands: - cache restore - tar zcvf cache.tgz .m2 target + - artifact delete project cache.tgz - artifact push project cache.tgz - rm ~/.m2/settings.xml - > @@ -43,6 +44,7 @@ blocks: -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - cache store - tar zcvf cache-post.tgz .m2 target + - artifact delete project cache-post.tgz - artifact push project cache-post.tgz - name: "Tests" From ef0d7205a4bcb760dd20a3c57725acd58cf53359 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 09:07:06 -0400 Subject: [PATCH 09/25] create initial create-post.tgz --- .semaphore/semaphore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index aef55dd7f5a9..af10e979d155 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -36,7 +36,7 @@ blocks: commands: - cache restore - tar zcvf cache.tgz .m2 target - - artifact delete project cache.tgz + # - artifact delete project cache.tgz - artifact push project cache.tgz - rm ~/.m2/settings.xml - > From 35363e5be9278e1d41e0406620481a35546a9e98 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 11:39:56 -0400 Subject: [PATCH 10/25] re-enable delete --- .semaphore/semaphore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index af10e979d155..aef55dd7f5a9 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -36,7 +36,7 @@ blocks: commands: - cache restore - tar zcvf cache.tgz .m2 target - # - artifact delete project cache.tgz + - artifact delete project cache.tgz - artifact push project cache.tgz - rm ~/.m2/settings.xml - > From 02bdb549ba53e1d15ec701f2973411b327bf5430 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 12:06:50 -0400 Subject: [PATCH 11/25] dont delete --- .semaphore/semaphore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index aef55dd7f5a9..a4e20266bc6a 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -44,7 +44,7 @@ blocks: -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - cache store - tar zcvf cache-post.tgz .m2 target - - artifact delete project cache-post.tgz + # - artifact delete project cache-post.tgz - artifact push project cache-post.tgz - name: "Tests" From 6f48f71e8fba9d7d658fe367d53566c84799908d Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 12:43:45 -0400 Subject: [PATCH 12/25] delete and disable CodeArtifact --- .semaphore/semaphore.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index a4e20266bc6a..c37f4b15a1b9 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -44,7 +44,7 @@ blocks: -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - cache store - tar zcvf cache-post.tgz .m2 target - # - artifact delete project cache-post.tgz + - artifact delete project cache-post.tgz - artifact push project cache-post.tgz - name: "Tests" @@ -55,7 +55,8 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout - - cache restore + # - cache restore + - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" commands: From d97d88a22a2c21d9937c19fed2cd450623548e1e Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 14:59:56 -0400 Subject: [PATCH 13/25] test no cache but using cache.tgz instead --- .semaphore/semaphore.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index c37f4b15a1b9..3e7468b5f365 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -34,15 +34,12 @@ blocks: jobs: - name: "Install" commands: - - cache restore - - tar zcvf cache.tgz .m2 target - - artifact delete project cache.tgz - - artifact push project cache.tgz - - rm ~/.m2/settings.xml + - artifact pull project cache.tgz + - tar zxvf cache.tgz + # - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - - cache store - tar zcvf cache-post.tgz .m2 target - artifact delete project cache-post.tgz - artifact push project cache-post.tgz From e00598ddbab122947d71befb9dd61fcf32fc4e9b Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 15:04:43 -0400 Subject: [PATCH 14/25] try public --- .semaphore/semaphore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 3e7468b5f365..0232fc2a0d70 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -36,7 +36,7 @@ blocks: commands: - artifact pull project cache.tgz - tar zxvf cache.tgz - # - rm ~/.m2/settings.xml + - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C From e85d33d8462ee244edb70e98aeb982ad0e742098 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 15:47:04 -0400 Subject: [PATCH 15/25] unzip cache.tgz for tests --- .semaphore/semaphore.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 0232fc2a0d70..49ec3a24717a 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -52,7 +52,8 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout - # - cache restore + - artifact pull project cache.tgz + - tar zxvf cache.tgz - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" From 867108f98ce604ddd71a013483cc270b12c38eab Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 17:42:34 -0400 Subject: [PATCH 16/25] considerations for full lifecycle and design --- .semaphore/semaphore.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 49ec3a24717a..cd29c1e97776 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -41,8 +41,10 @@ blocks: MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - tar zcvf cache-post.tgz .m2 target - - artifact delete project cache-post.tgz - - artifact push project cache-post.tgz + - artifact delete project cache.tgz || true + - artifact push project cache.tgz + - artifact delete workflow cache-post-install.tgz || true + - artifact push workflow cache-post-install.tgz - name: "Tests" task: @@ -52,8 +54,8 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout - - artifact pull project cache.tgz - - tar zxvf cache.tgz + - artifact pull workflow cache-post-install.tgz + - tar zxvf cache-post-install.tgz - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" From 6572e8aea304e3f49c84cd838307b4be1ac8b6b9 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 17:50:35 -0400 Subject: [PATCH 17/25] file rename --- .semaphore/semaphore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index cd29c1e97776..1beecdd70ac0 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -40,9 +40,9 @@ blocks: - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - - tar zcvf cache-post.tgz .m2 target - artifact delete project cache.tgz || true - artifact push project cache.tgz + - tar zcvf cache-post-install.tgz .m2 target - artifact delete workflow cache-post-install.tgz || true - artifact push workflow cache-post-install.tgz From 9aadf1a33e0313df8c3c64e49f9380ff4f7bea6c Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Fri, 14 Jul 2023 17:52:35 -0400 Subject: [PATCH 18/25] reorder --- .semaphore/semaphore.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 1beecdd70ac0..51f873f9f72f 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -40,11 +40,12 @@ blocks: - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - - artifact delete project cache.tgz || true - - artifact push project cache.tgz - tar zcvf cache-post-install.tgz .m2 target - artifact delete workflow cache-post-install.tgz || true - artifact push workflow cache-post-install.tgz + - mv cache-post-install.tgz cache.tgz + - artifact delete project cache.tgz || true + - artifact push project cache.tgz - name: "Tests" task: From 9503c7fb747fea0dd6a3e51dfa6f3dc090fcfcab Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Mon, 17 Jul 2023 15:00:35 -0400 Subject: [PATCH 19/25] retain settings.xml until full public migration process --- .semaphore/semaphore.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 51f873f9f72f..696771d944f9 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -35,12 +35,11 @@ blocks: - name: "Install" commands: - artifact pull project cache.tgz - - tar zxvf cache.tgz - - rm ~/.m2/settings.xml + - tar zxf cache.tgz - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - - tar zcvf cache-post-install.tgz .m2 target + - tar zcf cache-post-install.tgz .m2 target - artifact delete workflow cache-post-install.tgz || true - artifact push workflow cache-post-install.tgz - mv cache-post-install.tgz cache.tgz @@ -56,8 +55,7 @@ blocks: - sem-version java 17 - checkout - artifact pull workflow cache-post-install.tgz - - tar zxvf cache-post-install.tgz - - rm ~/.m2/settings.xml + - tar zxf cache-post-install.tgz jobs: - name: "animal sniffer checks" commands: From 4e9c561e313ced97b78209f637398172827a219f Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Mon, 17 Jul 2023 17:23:03 -0400 Subject: [PATCH 20/25] rm ~/.m2/settings.xml --- .semaphore/semaphore.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 696771d944f9..ed1deef992c3 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -36,6 +36,7 @@ blocks: commands: - artifact pull project cache.tgz - tar zxf cache.tgz + - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C @@ -56,6 +57,7 @@ blocks: - checkout - artifact pull workflow cache-post-install.tgz - tar zxf cache-post-install.tgz + - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" commands: From b2564d514e0e2b51846f61f7af4d4818547a5dbd Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Mon, 17 Jul 2023 17:29:42 -0400 Subject: [PATCH 21/25] removing the initial cache.tgz step which unpacks for mvn install target. This will test if the target can run without the cache contents. --- .semaphore/semaphore.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index ed1deef992c3..673c7d66f41b 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -34,15 +34,15 @@ blocks: jobs: - name: "Install" commands: - - artifact pull project cache.tgz - - tar zxf cache.tgz + # - artifact pull project cache.tgz + # - tar zxf cache.tgz - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - tar zcf cache-post-install.tgz .m2 target - - artifact delete workflow cache-post-install.tgz || true - - artifact push workflow cache-post-install.tgz + # - artifact delete workflow cache-post-install.tgz || true + # - artifact push workflow cache-post-install.tgz - mv cache-post-install.tgz cache.tgz - artifact delete project cache.tgz || true - artifact push project cache.tgz From 66f28af6fa703520efb3722f721c2a8c9c660745 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Thu, 20 Jul 2023 10:54:31 -0400 Subject: [PATCH 22/25] baseline back to no cache --- .semaphore/semaphore.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 673c7d66f41b..196cd4ba0d62 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -36,16 +36,16 @@ blocks: commands: # - artifact pull project cache.tgz # - tar zxf cache.tgz - - rm ~/.m2/settings.xml + # - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - - tar zcf cache-post-install.tgz .m2 target + # - tar zcf cache-post-install.tgz .m2 target # - artifact delete workflow cache-post-install.tgz || true # - artifact push workflow cache-post-install.tgz - - mv cache-post-install.tgz cache.tgz - - artifact delete project cache.tgz || true - - artifact push project cache.tgz + # - mv cache-post-install.tgz cache.tgz + # - artifact delete project cache.tgz || true + # - artifact push project cache.tgz - name: "Tests" task: @@ -55,9 +55,9 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout - - artifact pull workflow cache-post-install.tgz - - tar zxf cache-post-install.tgz - - rm ~/.m2/settings.xml + # - artifact pull workflow cache-post-install.tgz + # - tar zxf cache-post-install.tgz + # - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" commands: From e899065614cea6d0838521c034d34940a695b78f Mon Sep 17 00:00:00 2001 From: Jeremy Kuhnash Date: Thu, 20 Jul 2023 11:29:37 -0400 Subject: [PATCH 23/25] refactor to utilize workflow level caching to publish the built artifacts to the tests. otherwise turn off all caching of .m2 etc --- .semaphore/semaphore.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 196cd4ba0d62..8bb9a6b817b2 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -34,18 +34,14 @@ blocks: jobs: - name: "Install" commands: - # - artifact pull project cache.tgz - # - tar zxf cache.tgz - # - rm ~/.m2/settings.xml + # This is a change meant to validate semaphore public builds + # so thus removing configurations for Confluent's internal CodeArtifact + - rm ~/.m2/settings.xml - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C - # - tar zcf cache-post-install.tgz .m2 target - # - artifact delete workflow cache-post-install.tgz || true - # - artifact push workflow cache-post-install.tgz - # - mv cache-post-install.tgz cache.tgz - # - artifact delete project cache.tgz || true - # - artifact push project cache.tgz + - tar zcf cache-post-install.tgz .m2 target + - artifact push workflow cache-post-install.tgz - name: "Tests" task: @@ -55,9 +51,9 @@ blocks: - echo $SEMAPHORE_WORKFLOW_ID - sem-version java 17 - checkout - # - artifact pull workflow cache-post-install.tgz - # - tar zxf cache-post-install.tgz - # - rm ~/.m2/settings.xml + - artifact pull workflow cache-post-install.tgz + - tar zxf cache-post-install.tgz + - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks" commands: From e1154ff7f7e283fe5dedbae163fed3d44c70d57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Thu, 20 Jul 2023 10:14:59 -0700 Subject: [PATCH 24/25] add comment to explain need to cache .m2 and target --- .semaphore/semaphore.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 8bb9a6b817b2..e0df0770e248 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -40,6 +40,8 @@ blocks: - > MAVEN_OPTS="${MAVEN_OPTS} -Xmx3000m" ${MVN} clean install -q -ff ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C + # downstream tests depend on artifacts installed by mvn install into .m2 + # also cache target to avoid the cost of recompiling tests - tar zcf cache-post-install.tgz .m2 target - artifact push workflow cache-post-install.tgz From c2046609c2b6b570a705bdf41e8d25dea44221ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Thu, 20 Jul 2023 10:17:36 -0700 Subject: [PATCH 25/25] add comment for why we remove .m2/settings.xml --- .semaphore/semaphore.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index e0df0770e248..9888b2175bdd 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -55,6 +55,8 @@ blocks: - checkout - artifact pull workflow cache-post-install.tgz - tar zxf cache-post-install.tgz + # This is a change meant to validate semaphore public builds + # so thus removing configurations for Confluent's internal CodeArtifact - rm ~/.m2/settings.xml jobs: - name: "animal sniffer checks"