adoptium / aqa-tests

Home of test infrastructure for Adoptium builds
https://adoptium.net/aqavit
Apache License 2.0
125 stars 304 forks source link

Non-container external tests broken #5403

Closed sophia-guo closed 6 days ago

sophia-guo commented 1 week ago

external tests got ERROR: failed to solve: ENV must have two arguments when make compile.

     [exec] INFO: docker build  --no-cache -t adoptopenjdk-lucene-solr-test:17-jdk-ubuntu-hotspot-full -f /home/pmikova/redhat_repos/aqavit/jvmtest/external/lucene-solr/dockerfile/17/jdk/ubuntu/Dockerfile.hotspot.full /home/pmikova/redhat_repos/aqavit/jvmtest/external/
     [exec] #####################################################
     [exec] #0 building with "default" instance using docker driver
     [exec] 
     [exec] #1 [internal] load build definition from Dockerfile.hotspot.full
     [exec] #1 transferring dockerfile: 2.82kB done
     [exec] #1 DONE 0.1s
     [exec] Dockerfile.hotspot.full:61
     [exec] --------------------
     [exec]   59 |     
     [exec]   60 |     
     [exec]   61 | >>> ENV USE_TESTENV_PROPERTIES
     [exec]   62 |     
     [exec]   63 |     # Clone lucene-solr source
     [exec] --------------------
     [exec] ERROR: failed to solve: ENV must have two arguments

Related with https://github.com/adoptium/aqa-tests/pull/5356

https://github.com/adoptium/aqa-tests/blob/master/external/dockerfile_functions.sh#L509 https://github.com/adoptium/aqa-tests/blob/master/external/dockerfile_functions.sh#L661

USE_TESTENV_PROPERTIES is not visible to print_testInfo_env() hence in generated Dockerfile USE_TESTENV_PROPERTIES no value. @LongyuZhang

Also Note: With #5356 running locally will also hit the following message, which means both ADOPTOPENJDK_REPO and ADOPTOPENJDK_BRANCH need to be export. If that is the case, all README need to be updated. Wondered why we need to set ADOPTOPENJDK_REPO and ADOPTOPENJDK_BRANCH as environment variable instead of passing them in as all other parameters?

     [exec] #7 [3/9] RUN git clone
     [exec] #7 0.629 fatal: You must specify a repository to clone.
     [exec] #7 0.629 
     [exec] #7 0.629 usage: git clone [<options>] [--] <repo> [<dir>] ] 
      [exec] #7 ERROR: process "/bin/sh -c git clone" did not complete successfully: exit code: 129
LongyuZhang commented 1 week ago

Will work on fixing this issue. @sophia-guo Do you have a jenkins link so I can refer? Thanks.

sophia-guo commented 1 week ago

@LongyuZhang I don't have a public link. It could be reproduced by running any external tests other than CIRU. For example :lucene.

sophia-guo commented 1 week ago

Also Note: With https://github.com/adoptium/aqa-tests/pull/5356 running locally will also hit the following message, which means both ADOPTOPENJDK_REPO and ADOPTOPENJDK_BRANCH need to be export. If that is the case, all README need to be updated. Wondered why we need to set ADOPTOPENJDK_REPO and ADOPTOPENJDK_BRANCH as environment variable instead of passing them in as all other parameters?

@LongyuZhang

LongyuZhang commented 1 week ago

Thanks for the info, created draft PR link to inherit USE_TESTENV_PROPERTIE only on container tests with github_url aqa-tests. Testing it now.

sophia-guo commented 1 week ago

Note that print_clone_project() update is not correct https://github.com/adoptium/aqa-tests/blob/master/external/dockerfile_functions.sh#L512. print_clone_project() is for git clone third party repo by github_url, not for aqa-tests specifically, which is defined in test.properties.

Currently non-containers tests will get aqa-tests repo and third party branch.

    [exec]   62 |     RUN git clone https://github.com/adoptium/aqa-tests.git
     [exec]   63 |     WORKDIR /aqa-tests/
     [exec]   64 | >>> RUN git checkout LUCENE_SOLR_TAG
     [exec]   65 |     WORKDIR /
     [exec]   66 |
sophia-guo commented 6 days ago

Interesting auto closes doesn't work? Close it manually.