[ 
https://issues.apache.org/jira/browse/HADOOP-19858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18074462#comment-18074462
 ] 

ASF GitHub Bot commented on HADOOP-19858:
-----------------------------------------

ajfabbri commented on PR #8412:
URL: https://github.com/apache/hadoop/pull/8412#issuecomment-4272126603

   Let me see if I understand how actions can run on _fork_ repositories 
instead of base:
   
   1. Fork repo needs to "enable actions" manually in their repo's GitHub UI. 
This does not disable actions in the upstream repo (obviously).
   2. Spark blocks _some_ of their workflows from running on main repo with 
conditionals [like this 
one](https://github.com/apache/spark/blob/a2efe5fdcf9767ee8f113f7487de1a8092d2e7c6/.github/workflows/build_non_ansi.yml#L33):
 `if github.repository == 'apache/spark'`.
   3. For workflows that push images, they choose which repo to push to with 
conditionals as well, [e.g. 
here](https://github.com/apache/spark/blob/a2efe5fdcf9767ee8f113f7487de1a8092d2e7c6/.github/workflows/build_and_test.yml#L203-L207):
   ```
           REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' 
'[:lower:]')
           IMG_NAME="apache-spark-ci-image:${{ inputs.branch }}-${{ 
github.run_id }}"
           IMG_URL="ghcr.io/$REPO_OWNER/$IMG_NAME"
           echo "image_url=$IMG_URL" >> $GITHUB_OUTPUT
       - name: Generate infra image URL (Documentation)
   ```
   
   This PR is missing #2 and #3, right?
   
   This is the primary reason I'm -1 on the current changes, unless I'm missing 
something here.
   
   Spark uses these workflows from privileged context on the official repo 
(workflow "cron" triggers that can't be triggered by forks) as well as allowing 
them to run on forks. The thing I dislike about their example is it lacks clear 
separation of privilege. I think we could do better on that. 
   
   I'm not sure I understand what you have in mind for this approach. I'm 
confused because the spark (and knox) model is to build a full image with the 
build installed on it, and then run tests in that container. But the 
dev_support dockerfile is not a hadoop install. Just a build container. Do I 
have that right?
   
   Are you thinking that we 1. build the hadoop-build (dev-support) container. 
2. run maven build in that container. 3. build installed images (like 
hadoop-trunk, hadoop-<local-fork-dev-version>,  hadoop-3.5, etc.) 4. run tests 
on those installed images?
   
   Thanks for your effort on this.




> Set up build workflow in GitHub Actions
> ---------------------------------------
>
>                 Key: HADOOP-19858
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19858
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: build
>            Reporter: Cheng Pan
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to