You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "BewareMyPower (via GitHub)" <gi...@apache.org> on 2024/04/23 11:06:10 UTC

[PR] [improve][ci] Skip detecting changed files in fork repositories [pulsar]

BewareMyPower opened a new pull request, #22567:
URL: https://github.com/apache/pulsar/pull/22567

   ### Motivation
   
   In a private fork repository, the precondition workflow of a PR will always fail due to the lack of the permission to fetch the content of that PR.
   
   ```
   Fetching list of changed files for PR#208 from Github API
     Invoking listFiles(pull_number: 208, per_page: 100)
   Error: Resource not accessible by integration
   ```
   
   ### Modifications
   
   Only run the "Detect changed files" step and steps that depend on that step in the Apache repo.
   
   ### Verifying this change
   
   After applying this patch, the precondition workflows succeeded and the tests were executed.
   
   <img width="829" alt="image" src="https://github.com/apache/pulsar/assets/18204803/c5388604-c0fe-4f33-8566-412c02c7e2f9">
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve][ci] Skip detecting changed files in fork repositories [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #22567:
URL: https://github.com/apache/pulsar/pull/22567#issuecomment-2072183428

   > Technically it's right. But the [`paths-filter` plugin](https://github.com/apache/pulsar-test-infra/commits/master/paths-filter) is hard to maintain for contributors not familiar with JavaScript and GitHub actions.
   
   there's no need to modify the paths-filter action when defining [GitHub Actions workflow or job permissions](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs). It's possible that private repositories have a setting that makes the default permissions just work without any changes.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve][ci] Skip detecting changed files in fork repositories [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #22567:
URL: https://github.com/apache/pulsar/pull/22567#issuecomment-2072051995

   Is there a way where explicit job permissions specified with https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs would address the issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve][ci] Skip detecting changed files in fork repositories [pulsar]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower closed pull request #22567: [improve][ci] Skip detecting changed files in fork repositories
URL: https://github.com/apache/pulsar/pull/22567


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve][ci] Skip detecting changed files in fork repositories [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #22567:
URL: https://github.com/apache/pulsar/pull/22567#issuecomment-2072261695

   experiment in #22568 in draft mode


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve][ci] Skip detecting changed files in fork repositories [pulsar]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #22567:
URL: https://github.com/apache/pulsar/pull/22567#issuecomment-2072080615

   > The problem with the changes in this PR is that it would make it harder to develop the workflow in a public forked repository.
   
   The main affect is the PRs that only modify the documents will still trigger the unit tests. However, as the `pulsar-site` repository was already moved out of the main repo, such PRs are becoming much less than before. So I don't think it actually makes development harder in a public forked repository. I'm also suspicious about if there is a real developer that gets benefits from such savings of GitHub actions resources.
   
   On the other hand, without this PR or another solution, the development in a private fork could be very hard. A PR needs to modify the workflow or the master branch needs to include a commit that removes these workflows to have tests executed.
   
   > We should first investigate if there's a way to add permissions to the workflow.
   
   Technically it's right. But the [`paths-filter` plugin](https://github.com/apache/pulsar-test-infra/commits/master/paths-filter) is hard to maintain for contributors not familiar with JavaScript and GitHub actions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve][ci] Skip detecting changed files in fork repositories [pulsar]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #22567:
URL: https://github.com/apache/pulsar/pull/22567#issuecomment-2072194156

   I also found another permission issue in the **Semantic Pull Request / Check pull request title** workflow though it does not block the development.
   
   ```
   Run amannn/action-semantic-pull-request@v5.0.2
   Error: Resource not accessible by integration
   ```
   
   <img width="872" alt="image" src="https://github.com/apache/pulsar/assets/18204803/d0cf0774-6a66-48cc-9415-48b650a52ad1">
   
   Mark this PR as drafted first because I don't have much time on it.
   
   As a workaround to unblock the development, I will commit this patch in an independent development branch in the private forked repository.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org