Attila Doroszlai created HADOOP-20094:
-----------------------------------------

             Summary: ci: cache not saved due to mismatch of HOME directory
                 Key: HADOOP-20094
                 URL: https://issues.apache.org/jira/browse/HADOOP-20094
             Project: Hadoop Common
          Issue Type: Sub-task
          Components: ci
            Reporter: Attila Doroszlai
            Assignee: Attila Doroszlai


{{actions/setup-java}} has built-in cache support, and it is enabled for the 
{{build_and_test}} workflow:

{code:title=https://github.com/apache/hadoop/blob/765078ecf561f039112e072c33718d37557f867f/.github/workflows/tmpl_build_and_test.yml#L172-L177}
      - name: Setup JDK ${{ inputs.java }}
        uses: actions/setup-java@v5
        with:
          distribution: zulu
          java-version: ${{ inputs.java }}
          cache: 'maven'
{code}

But the cache is not saved due to the following error in {{Post JDK ...}} step 
after build/test:

{code:title=https://github.com/apache/hadoop/actions/runs/45094764828/job/137437278919#step:12:3}
Warning: Error: Path Validation Error: Path(s) specified in the action for 
caching do(es) not exist, hence no cache is being saved.
{code}

{{Build ...}} output indicates Maven dir is at {{/home/runner/.m2}}:

{code}
[INFO] --- install:3.1.4:install (default-install) @ hadoop-main ---
[INFO] Installing /__w/hadoop/hadoop/pom.xml to 
/home/runner/.m2/repository/org/apache/hadoop/hadoop-main/3.6.0-SNAPSHOT/hadoop-main-3.6.0-SNAPSHOT.pom
{code}

but {{Setup JDK ..}} uses {{/github/home/.m2}}:

{code:title=https://github.com/apache/hadoop/actions/runs/45094764828/job/137437278919#step:4:31}
Writing to /github/home/.m2/settings.xml
{code}

which it derives from {{$HOME}} as set in the container:

{code:title=https://github.com/apache/hadoop/actions/runs/45094764828/job/137437278919#step:2:118}
docker create ... -e "HOME=/github/home" ... 
ghcr.io/apache/gha-build-ubuntu_24:trunk-45094764828
{code}

I guess {{/home/runner}} comes from this setup:

{code:title=https://github.com/apache/hadoop/blob/765078ecf561f039112e072c33718d37557f867f/.github/workflows/tmpl_build_and_test.yml#L145}
          RUN useradd -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER}
{code}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to