-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from lorelei-sakai/fix/max-discard-size
[VDO-5791] Fix discard problem due to upstream dm changes
- Loading branch information
Showing
17 changed files
with
303 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request_target: | ||
types: [ opened, reopened, ready_for_review, synchronize ] | ||
workflow_dispatch: | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs | ||
concurrency: | ||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Verifying: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Start verification | ||
run: echo Verification Start | ||
|
||
# Run assignment action | ||
- name: Assign reviewers and assignees | ||
uses: dm-vdo/vdo-auto-assign@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Remove all known labels | ||
uses: buildsville/[email protected] | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
labels: untested, private testing running, private testing done, private testing failed | ||
type: remove | ||
|
||
- name: Add untested label | ||
uses: buildsville/[email protected] | ||
with: | ||
token: ${{secrets.VDODEVEL}} | ||
label: untested | ||
type: add | ||
|
||
Testing: | ||
if: github.event.pull_request.draft == false | ||
runs-on: [self-hosted, trusted] | ||
needs: [Verifying] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
path: dm-linux | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.repository.owner.login }}/vdo-devel | ||
path: vdo-devel | ||
|
||
- name: Add private testing running label | ||
uses: buildsville/[email protected] | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
label: private testing running | ||
type: add | ||
|
||
- name: Start private testing | ||
run: | | ||
cd ${{ github.workspace }}/vdo-devel/src/ | ||
make DMLINUX_SOURCE_DIR=${{ github.workspace }}/dm-linux dmlinux-jenkins | ||
- name: Copy log file to /permatbit/user/bunsen/artifacts | ||
if: failure() | ||
run: | | ||
REPO=${{ github.repository }} | ||
REPO=${REPO//\//-} | ||
cp -a ${{ github.workspace }}/vdo-devel/logs /permabit/user/bunsen/artifacts/logs.`date +'%Y%m%d%H%M'`.$REPO.${{ github.event.number }} | ||
- name: Remove private testing running label | ||
if: always() | ||
uses: buildsville/[email protected] | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
label: private testing running | ||
type: remove | ||
|
||
- name: Add private testing failed | ||
if: failure() | ||
uses: buildsville/[email protected] | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
label: private testing failed | ||
type: add | ||
|
||
- name: Add private testing success | ||
if: success() | ||
uses: buildsville/[email protected] | ||
with: | ||
token: ${{secrets.VDODEVEL}} | ||
label: private testing done | ||
type: add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Notify | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0,2,10,12,14,16,18,20,22 * * 1-5' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
notify_schedule: | ||
env: | ||
ORG: ${{ github.repository_owner }} | ||
REPO: ${{ github.event.repository.name }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify PRs Needing Review | ||
uses: octokit/[email protected] | ||
id: prs_need_review | ||
with: | ||
query: | | ||
query needreview($queryString:String!) { | ||
search(type: ISSUE, query: $queryString, last: 100) { | ||
issueCount | ||
} | ||
} | ||
variables: | | ||
queryString: "repo:${{ env.ORG }}/${{env.REPO}}, state:open, is:pr, -label:\"on hold\", review:required," | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: slackapi/[email protected] | ||
if: ${{ env.COUNT > 0 }} | ||
with: | ||
# This data can be any valid JSON from a previous step in the GitHub Action | ||
payload: | | ||
{ | ||
"PR_MSG": "Number of PRs awaiting reviews in ${{env.REPO}} : ${{ env.COUNT }}", | ||
"PR_LINK": "https://github.com/${{env.ORG}}/${{env.REPO}}/pulls?q=is%3Apr+is%3Aopen+-label%3A%22on%20hold%22+review%3Arequired" | ||
} | ||
env: | ||
COUNT: ${{ fromJSON(steps.prs_need_review.outputs.data).search.issueCount }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACKMSG }} | ||
|
||
- name: Notify PRs With Feedback | ||
uses: octokit/[email protected] | ||
id: prs_with_feedback | ||
with: | ||
query: | | ||
query withfeedback($queryString:String!) { | ||
search(type: ISSUE, query: $queryString, last: 100) { | ||
issueCount | ||
} | ||
} | ||
variables: | | ||
queryString: "repo:${{env.ORG}}/${{env.REPO}}, state:open, is:pr, -label:\"on hold\", review:changes_requested," | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: slackapi/[email protected] | ||
if: ${{ env.COUNT > 0 }} | ||
with: | ||
# This data can be any valid JSON from a previous step in the GitHub Action | ||
payload: | | ||
{ | ||
"PR_MSG": "Number of PRs awaiting replies to reviews ${{env.REPO}} : ${{ env.COUNT }}", | ||
"PR_LINK": "https://github.com/${{env.ORG}}/${{env.REPO}}/pulls?q=is%3Apr+is%3Aopen+-label%3A%22on%20hold%22+review%3Achanges_requested" | ||
} | ||
env: | ||
COUNT: ${{ fromJSON(steps.prs_with_feedback.outputs.data).search.issueCount }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACKMSG }} | ||
|
||
|
||
- name: Notify PRs With Approval | ||
uses: octokit/[email protected] | ||
id: prs_with_approval | ||
with: | ||
query: | | ||
query withapproval($queryString:String!) { | ||
search(type: ISSUE, query: $queryString, last: 100) { | ||
issueCount | ||
} | ||
} | ||
variables: | | ||
queryString: "repo:${{env.ORG}}/${{env.REPO}}, state:open, is:pr, -label:\"on hold\", review:approved," | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: slackapi/[email protected] | ||
if: ${{ env.COUNT > 0 }} | ||
with: | ||
# This data can be any valid JSON from a previous step in the GitHub Action | ||
payload: | | ||
{ | ||
"PR_MSG": "Number of PRs approved in ${{env.REPO}} : ${{ env.COUNT }}", | ||
"PR_LINK": "https://github.com/${{env.ORG}}/${{env.REPO}}/pulls?q=is%3Apr+is%3Aopen+-label%3A%22on%20hold%22+review%3Aapproved" | ||
} | ||
env: | ||
COUNT: ${{ fromJSON(steps.prs_with_approval.outputs.data).search.issueCount }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACKMSG }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.