Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions Added to Block PRs from fork/main branch #5272

Merged
merged 15 commits into from Mar 14, 2024

Conversation

varshith257
Copy link
Contributor

@varshith257 varshith257 commented Mar 12, 2024

Which problem is this PR solving?

Description of the changes

  • Added the github actions file that check the PR is from main branch of fork and blocks it.

How was this change tested?

  • Will be tested

Checklist

@varshith257 varshith257 requested a review from a team as a code owner March 12, 2024 17:41
@varshith257
Copy link
Contributor Author

varshith257 commented Mar 12, 2024

@yurishkuro I think this functionality can be tested with dummy PR once it got merged

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you plan to test?

.github/actions/block-main-pr/action.yml Outdated Show resolved Hide resolved
.github/actions/block-main-pr/action.yml Outdated Show resolved Hide resolved
.github/actions/block-main-pr/action.yml Outdated Show resolved Hide resolved
.github/actions/block-main-pr/action.yml Outdated Show resolved Hide resolved
@varshith257
Copy link
Contributor Author

@yurishkuro Added the suggestions made.
My plan of approach to test this is first we merge it and check with a dummy PR from my main branch to this repo to check this functionality. If it needs any changes we can revert and make necessary changes.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add a workflow using this action (or just add it to the lint workflow)

.github/actions/block-main-pr/action.yml Outdated Show resolved Hide resolved
.github/actions/block-main-pr/action.yml Outdated Show resolved Hide resolved
.github/actions/block-main-pr/action.yml Outdated Show resolved Hide resolved
@varshith257
Copy link
Contributor Author

@yurishkuro I think we need to add a new workflow using this action, instead adding into lint workflow

@yurishkuro
Copy link
Member

I would start with adding to lint workflow - there's an extra overhead for running more workflows. We can always split it later.

@varshith257
Copy link
Contributor Author

I would start with adding to lint workflow - there's an extra overhead for running more workflows. We can always split it later.

yeah, it could be good to add it to lint workflow. I too observed there are 20+ workflows :)

@varshith257
Copy link
Contributor Author

@yurishkuro Done with all necessary changes. Is there anything to add?

@yurishkuro
Copy link
Member

Please make sure all commits are signed. See CONTRIBUTING.md

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.09%. Comparing base (ccecb7f) to head (8395f22).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5272   +/-   ##
=======================================
  Coverage   95.09%   95.09%           
=======================================
  Files         339      339           
  Lines       16511    16511           
=======================================
  Hits        15701    15701           
  Misses        621      621           
  Partials      189      189           
Flag Coverage Δ
cassandra-3.x 26.53% <ø> (ø)
cassandra-4.x 26.53% <ø> (ø)
elasticsearch-5.x 21.77% <ø> (ø)
elasticsearch-6.x 21.75% <ø> (ø)
elasticsearch-7.x 21.84% <ø> (-0.02%) ⬇️
elasticsearch-8.x 21.92% <ø> (-0.02%) ⬇️
grpc-badger 19.23% <ø> (ø)
kafka 14.66% <ø> (ø)
opensearch-1.x 21.84% <ø> (ø)
opensearch-2.x 21.84% <ø> (-0.02%) ⬇️
unittests 92.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@varshith257 varshith257 force-pushed the block-pr-from-fork branch 2 times, most recently from 9085e5d to 31b72cb Compare March 13, 2024 20:10
dependabot bot and others added 9 commits March 14, 2024 02:01
…ng#5248)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.17.0 to
0.18.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/golang/sys/commit/360f961f8978a4c9a7c2e849bb482780cd6bb553"><code>360f961</code></a>
unix: add API for fsconfig system call</li>
<li><a
href="https://github.com/golang/sys/commit/7ff74af46e246f08a64cea4267e83365355d37d5"><code>7ff74af</code></a>
unix: drop go version tags for unsupported versions</li>
<li><a
href="https://github.com/golang/sys/commit/6b4eab51c2d17341edab3284d593a0bd9f90bb71"><code>6b4eab5</code></a>
unix: suppress ENOMEM errors from sysctl's implementing Uname(uname
*Utsname)...</li>
<li><a
href="https://github.com/golang/sys/commit/2f2cc5dae4e240ccd9b4142205a71a311328419f"><code>2f2cc5d</code></a>
unix: update IFLA and NETKIT constants with Linux kernel 6.7</li>
<li>See full diff in <a
href="https://github.com/golang/sys/compare/v0.17.0...v0.18.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/sys&package-manager=go_modules&previous-version=0.17.0&new-version=0.18.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
…acing#5264)

Bumps [anchore/sbom-action](https://github.com/anchore/sbom-action) from
0.15.2 to 0.15.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/anchore/sbom-action/releases">anchore/sbom-action's
releases</a>.</em></p>
<blockquote>
<h2>v0.15.9</h2>
<h2>Changes in v0.15.9</h2>
<ul>
<li>reduce syft debug level (<a
href="https://redirect.github.com/anchore/sbom-action/issues/446">#446</a>)
[<a href="https://github.com/kzantow">kzantow</a>]</li>
<li>update Syft to v0.105.0 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/442">#442</a>)
[<a
href="https://github.com/anchore-actions-token-generator">anchore-actions-token-generator</a>]</li>
</ul>
<h2>v0.15.8</h2>
<h2>Changes in v0.15.8</h2>
<ul>
<li>Update Syft to v0.103.1 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/441">#441</a>)
[<a
href="https://github.com/anchore-actions-token-generator">anchore-actions-token-generator</a>]</li>
</ul>
<h2>v0.15.7</h2>
<h2>Changes in v0.15.7</h2>
<ul>
<li>chore: migrate action to use node v20.11.0 (Iron) FROM node v16.x.x
(<a
href="https://redirect.github.com/anchore/sbom-action/issues/440">#440</a>)
[<a href="https://github.com/spiffcs">spiffcs</a>]</li>
</ul>
<h2>v0.15.6</h2>
<h2>Changes in v0.15.6</h2>
<ul>
<li>chore(deps): update Syft to v0.102.0 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/438">#438</a>)
[<a
href="https://github.com/anchore-actions-token-generator">anchore-actions-token-generator</a>]</li>
</ul>
<h2>v0.15.5</h2>
<h2>Changes in v0.15.5</h2>
<ul>
<li>chore(deps): update Syft to v0.101.1 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/437">#437</a>)
[<a
href="https://github.com/anchore-actions-token-generator">anchore-actions-token-generator</a>]</li>
</ul>
<h2>v0.15.4</h2>
<h2>Changes in v0.15.4</h2>
<ul>
<li>chore(deps): update Syft to v0.101.0 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/436">#436</a>)
[<a
href="https://github.com/anchore-actions-token-generator">anchore-actions-token-generator</a>]</li>
</ul>
<h2>v0.15.3</h2>
<h2>Changes in v0.15.3</h2>
<ul>
<li>chore(deps): update Syft to v0.100.0 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/435">#435</a>)
[<a
href="https://github.com/anchore-actions-token-generator">anchore-actions-token-generator</a>]</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/anchore/sbom-action/commit/9fece9e20048ca9590af301449208b2b8861333b"><code>9fece9e</code></a>
fix: reduce syft debug level (<a
href="https://redirect.github.com/anchore/sbom-action/issues/446">#446</a>)</li>
<li><a
href="https://github.com/anchore/sbom-action/commit/f3355df2ccd621f5873fe3c7c653ebdc5ef1bcb2"><code>f3355df</code></a>
chore(deps): update Syft to v0.105.0 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/442">#442</a>)</li>
<li><a
href="https://github.com/anchore/sbom-action/commit/b6a39da80722a2cb0ef5d197531764a89b5d48c3"><code>b6a39da</code></a>
chore(deps): update Syft to v0.103.1 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/441">#441</a>)</li>
<li><a
href="https://github.com/anchore/sbom-action/commit/767b08fd8822486ad890abb8f1d31721bebd651c"><code>767b08f</code></a>
chore: migrate action from 16 -&gt; 20 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/440">#440</a>)</li>
<li><a
href="https://github.com/anchore/sbom-action/commit/c6aed38a4323b393d05372c58a74c39ae8386d02"><code>c6aed38</code></a>
chore(deps): update Syft to v0.102.0 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/438">#438</a>)</li>
<li><a
href="https://github.com/anchore/sbom-action/commit/24b0d5238516480139aa8bc6f92eeb7b54a9eb0a"><code>24b0d52</code></a>
chore(deps): update Syft to v0.101.1 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/437">#437</a>)</li>
<li><a
href="https://github.com/anchore/sbom-action/commit/41f7a6c033dbcdf78917f23b652c8b8146298c85"><code>41f7a6c</code></a>
chore(deps): update Syft to v0.101.0 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/436">#436</a>)</li>
<li><a
href="https://github.com/anchore/sbom-action/commit/c7f031d9249a826a082ea14c79d3b686a51d485a"><code>c7f031d</code></a>
chore(deps): update Syft to v0.100.0 (<a
href="https://redirect.github.com/anchore/sbom-action/issues/435">#435</a>)</li>
<li>See full diff in <a
href="https://github.com/anchore/sbom-action/compare/719133684c7d294116626d1344fe64f0d2ff3e9e...9fece9e20048ca9590af301449208b2b8861333b">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=anchore/sbom-action&package-manager=github_actions&previous-version=0.15.2&new-version=0.15.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
<!--
!! Please DELETE this comment before posting.
We appreciate your contribution to the Jaeger project! 👋🎉
-->

## Which problem is this PR solving?
- <!-- Example: Resolves jaegertracing#123 -->
Resolves jaegertracing#5260
## Description of the changes
- 

## How was this change tested?
- 

## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: Yuan Fang <yuanfang@alauda.io>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
<!--
!! Please DELETE this comment before posting.
We appreciate your contribution to the Jaeger project! 👋🎉
-->

## Which problem is this PR solving?
- <!-- Example: Resolves jaegertracing#123 -->

## Description of the changes
-  remove repetitive words

## How was this change tested?
- 

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: tgolang <seekseat@aliyun.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
This reverts commit f296ccd.

Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
This reverts commit 139b5f6.

Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
Signed-off-by: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com>
Signed-off-by: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com>
Signed-off-by: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com>
Signed-off-by: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com>
@varshith257
Copy link
Contributor Author

@yurishkuro Signed off

@yurishkuro yurishkuro enabled auto-merge (squash) March 13, 2024 22:28
@yurishkuro yurishkuro added the changelog:ci Change related to continuous integration / testing label Mar 13, 2024
Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
auto-merge was automatically disabled March 14, 2024 03:43

Head branch was pushed to by a user without write access

@varshith257
Copy link
Contributor Author

@yurishkuro Some changes has been done to check the log of fork

@varshith257
Copy link
Contributor Author

Only checks are failing from PR checks of unit test, kafka, grPC-badager PR workflows

@varshith257
Copy link
Contributor Author

@yurishkuro It's working fine as intended, here's the log of it:

Prepare all required actions
Run ./.github/actions/block-pr-not-on-main
Run echo "Repo: jaegertracing/jaeger"
  echo "Repo: jaegertracing/jaeger"
  echo "Head Repo: varshith257/jaeger"
  echo "Forked: true"
  echo "Branch: block-pr-from-fork"
  
  if [ "true" == "true" ] && [ "block-pr-from-fork" == 'main' ]; then
    echo "PRs from the main branch of forked repositories are not allowed."
    exit [1](https://github.com/jaegertracing/jaeger/actions/runs/8275146057/job/22641817117?pr=5272#step:8:1)
  fi
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Repo: jaegertracing/jaeger
Head Repo: varshith[2](https://github.com/jaegertracing/jaeger/actions/runs/8275146057/job/22641817117?pr=5272#step:8:2)[5](https://github.com/jaegertracing/jaeger/actions/runs/8275146057/job/22641817117?pr=5272#step:8:6)[7](https://github.com/jaegertracing/jaeger/actions/runs/8275146057/job/22641817117?pr=5272#step:8:8)/jaeger
Forked: true
Branch: block-pr-from-fork

@varshith257
Copy link
Contributor Author

varshith257 commented Mar 14, 2024

@yurishkuro Is there any reason for unit tests workflow is failing?

This workflow working fine in my local machine

@yurishkuro yurishkuro merged commit b990fe9 into jaegertracing:main Mar 14, 2024
35 checks passed
@yurishkuro
Copy link
Member

Thanks

@varshith257 varshith257 deleted the block-pr-from-fork branch March 14, 2024 06:13
@yurishkuro
Copy link
Member

Test was failing because it's flaky, we have an open ticket for it.

@varshith257
Copy link
Contributor Author

Test was failing because it's flaky, we have an open ticket for it.

Haven't found any ticket @yurishkuro . It will be grateful if you provide link for it, Would like to contribute to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:ci Change related to continuous integration / testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create GitHub Action to block PRs from ${fork}/main branch
4 participants