From 0262e7d870cd2de9054b1e1ddebe094e9505b6b9 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:25:12 +0100 Subject: [PATCH 01/36] ci: Rebase dev Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 028f774ff..9879ea0ce 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -4,21 +4,22 @@ on: branches: - main +defaults: + run: + shell: bash -x -e -u -o pipefail {0} + jobs: - sync-branches: + sync-branches-via-rebase: runs-on: ubuntu-latest name: syncing main with dev steps: - name: Checkout uses: actions/checkout@v2 - - name: Set up Node - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: Opening pull request - id: pull - uses: tretuna/sync-branches@1.4.0 with: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - FROM_BRANCH: "main" - TO_BRANCH: "dev" + ref: ko3n1g/dev + + - name: Attempt rebase + run: | + git fetch origin main + git rebase origin/main + \ No newline at end of file From 9059688a424ccc5bb271d2b483cc15542567bb45 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:25:29 +0100 Subject: [PATCH 02/36] test Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 9879ea0ce..659a49ea7 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -3,6 +3,8 @@ on: push: branches: - main + pull_request: + defaults: run: From 6d1b0f40832e700ed172deac176db6d26f358701 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:30:50 +0100 Subject: [PATCH 03/36] notification Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 659a49ea7..84b2c092c 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -24,4 +24,29 @@ jobs: run: | git fetch origin main git rebase origin/main - \ No newline at end of file + git push --force + + notify: + runs-on: ubuntu-latest + if: failure() + needs: [sync-branches-via-rebase] + env: + RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + SLACK_WEBHOOK_ADMIN: "" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: NVIDIA/NeMo-FW-CI-templates + ref: v0.5.0 + path: send-slack-alert + + - name: Send Slack alert + uses: ./send-slack-alert/.github/actions/send-slack-alert + with: + message: > + <${{ env.RUN_URL }}|sync main with dev> has failed for. + + cc: ${{ env.SLACK_WEBHOOK_ADMIN }} + webhook: ${{ env.SLACK_WEBHOOK }} \ No newline at end of file From 8fc7f07215596da1110865b831d2610a9d494687 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:33:05 +0100 Subject: [PATCH 04/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 84b2c092c..ade6f4c41 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -49,4 +49,5 @@ jobs: <${{ env.RUN_URL }}|sync main with dev> has failed for. cc: ${{ env.SLACK_WEBHOOK_ADMIN }} - webhook: ${{ env.SLACK_WEBHOOK }} \ No newline at end of file + webhook: ${{ env.SLACK_WEBHOOK }} + \ No newline at end of file From 86f91ac4de974083365651872bcbb9787f37e1ac Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:35:35 +0100 Subject: [PATCH 05/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index ade6f4c41..57dbe89e1 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -42,11 +42,19 @@ jobs: ref: v0.5.0 path: send-slack-alert + - name: Get todays date + id: date + run: | + DATE=$(date +"%Y-%m-%d") + echo "date=$DATE" | tee -a "$GITHUB_OUTPUT" + - name: Send Slack alert uses: ./send-slack-alert/.github/actions/send-slack-alert + env: + date: ${{ steps.date.outputs.date }} with: message: > - <${{ env.RUN_URL }}|sync main with dev> has failed for. + Daily <${{ env.RUN_URL }}|sync main with dev> has failed for ${{ env.date }}. cc: ${{ env.SLACK_WEBHOOK_ADMIN }} webhook: ${{ env.SLACK_WEBHOOK }} From bf2cdf06e9809c3a563b92e01fda3067f3998a50 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:40:55 +0100 Subject: [PATCH 06/36] notificaiton Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 47 +++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 57dbe89e1..ff05ee017 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -14,19 +14,53 @@ jobs: sync-branches-via-rebase: runs-on: ubuntu-latest name: syncing main with dev + outputs: + date: ${{ steps.date.outputs.date }} steps: - name: Checkout uses: actions/checkout@v2 with: ref: ko3n1g/dev + - name: Get todays date + id: date + run: | + DATE=$(date +"%Y-%m-%d") + echo "date=$DATE" | tee -a "$GITHUB_OUTPUT" + - name: Attempt rebase run: | git fetch origin main git rebase origin/main git push --force - notify: + notify-success: + runs-on: ubuntu-latest + if: success() + needs: [sync-branches-via-rebase] + env: + DATE: ${{ needs.sync-branches-via-rebase.outputs.date }} + steps: + - name: Find Comment + uses: peter-evans/find-comment@v3 + id: fc + with: + issue-number: ${{ github.event.number }} + body-includes: + + - name: Add PR comment for PyLint + if: ${{ matrix.strict-mode == 'false' && env.OUTPUT != '' }} + uses: peter-evans/create-or-update-comment@v4 + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.number }} + edit-mode: replace + body: | + + + beep boop 🤖: This branch was last rebased onto `main` on ${{ env.DATE }}. + + notify-failure: runs-on: ubuntu-latest if: failure() needs: [sync-branches-via-rebase] @@ -34,6 +68,7 @@ jobs: RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} SLACK_WEBHOOK_ADMIN: "" SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + DATE: ${{ needs.sync-branches-via-rebase.outputs.date }} steps: - name: Checkout uses: actions/checkout@v4 @@ -42,19 +77,11 @@ jobs: ref: v0.5.0 path: send-slack-alert - - name: Get todays date - id: date - run: | - DATE=$(date +"%Y-%m-%d") - echo "date=$DATE" | tee -a "$GITHUB_OUTPUT" - - name: Send Slack alert uses: ./send-slack-alert/.github/actions/send-slack-alert - env: - date: ${{ steps.date.outputs.date }} with: message: > - Daily <${{ env.RUN_URL }}|sync main with dev> has failed for ${{ env.date }}. + Daily <${{ env.RUN_URL }}|sync main with dev> has failed for ${{ env.DATE }}. cc: ${{ env.SLACK_WEBHOOK_ADMIN }} webhook: ${{ env.SLACK_WEBHOOK }} From 4b0e23d4079096549b1ea9120374bebf7bef4d9e Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:51:16 +0100 Subject: [PATCH 07/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index ff05ee017..74d8626fe 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -41,11 +41,31 @@ jobs: env: DATE: ${{ needs.sync-branches-via-rebase.outputs.date }} steps: + - name: Find PR + id: fp + env: + REPOSITORY: ${{ github.repository }} + GH_TOKEN: ${{ github.token }} + run: | + PRs=$(curl -L \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GH_TOKEN" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/$REPOSITORY/pulls) + + PR_NUMBER=$(echo -E "$PRs" \ + | jq '.[] \ + | select(.head.ref == "ko3n1g/dev") \ + | .number' + ) + + echo "pr-number=$PR_NUMBER" | tee -a "$GITHUB_OUTPUT" + - name: Find Comment uses: peter-evans/find-comment@v3 id: fc with: - issue-number: ${{ github.event.number }} + issue-number: ${{ steps.fp.outputs.pr-number }} body-includes: - name: Add PR comment for PyLint From 29232b10aa5689b510366763efb5e8bb1afe4e1a Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:51:55 +0100 Subject: [PATCH 08/36] private notifications Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 74d8626fe..3e0e71be7 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -104,5 +104,5 @@ jobs: Daily <${{ env.RUN_URL }}|sync main with dev> has failed for ${{ env.DATE }}. cc: ${{ env.SLACK_WEBHOOK_ADMIN }} - webhook: ${{ env.SLACK_WEBHOOK }} + webhook: ${{ env.SLACK_WEBHOOK_TEST }} \ No newline at end of file From 01ef38e27fb2b64e134679c8d442cbf788b84c2e Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:56:21 +0100 Subject: [PATCH 09/36] try this Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 3e0e71be7..87457f672 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -21,6 +21,7 @@ jobs: uses: actions/checkout@v2 with: ref: ko3n1g/dev + fetch-depth: 0 - name: Get todays date id: date From d3ecf7845d5bcb521b46d8168b4b945fa39bf335 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 11:57:09 +0100 Subject: [PATCH 10/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 87457f672..372aa90f2 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -31,6 +31,9 @@ jobs: - name: Attempt rebase run: | + git config --global user.email "bot@nvidia.com" + git config --global user.name "NVIDIA NeMo Bot" + git fetch origin main git rebase origin/main git push --force From 132f2deae0d72be92e990d7f9d35382dcba59d35 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 12:00:23 +0100 Subject: [PATCH 11/36] add PAT Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 372aa90f2..11aebd8ed 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -16,12 +16,14 @@ jobs: name: syncing main with dev outputs: date: ${{ steps.date.outputs.date }} + environment: main steps: - name: Checkout uses: actions/checkout@v2 with: ref: ko3n1g/dev fetch-depth: 0 + token: ${{ secrets.PAT }} - name: Get todays date id: date @@ -33,7 +35,7 @@ jobs: run: | git config --global user.email "bot@nvidia.com" git config --global user.name "NVIDIA NeMo Bot" - + git fetch origin main git rebase origin/main git push --force From 2b46ff98e37fcce0d774c77bcd2d02a33791daee Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 12:09:25 +0100 Subject: [PATCH 12/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 11aebd8ed..d9b95b974 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -53,6 +53,7 @@ jobs: REPOSITORY: ${{ github.repository }} GH_TOKEN: ${{ github.token }} run: | + set +x PRs=$(curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer $GH_TOKEN" \ @@ -64,6 +65,7 @@ jobs: | select(.head.ref == "ko3n1g/dev") \ | .number' ) + set -x echo "pr-number=$PR_NUMBER" | tee -a "$GITHUB_OUTPUT" From 42693cfcc118497effb03932b2d310dfbac48a0e Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 12:11:03 +0100 Subject: [PATCH 13/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index d9b95b974..b6bdb65a7 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -61,8 +61,8 @@ jobs: https://api.github.com/repos/$REPOSITORY/pulls) PR_NUMBER=$(echo -E "$PRs" \ - | jq '.[] \ - | select(.head.ref == "ko3n1g/dev") \ + | jq '.[] + | select(.head.ref == "ko3n1g/dev") | .number' ) set -x From 75b5f3cca55dc487124babb8d16fba19f68a5b92 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 12:12:16 +0100 Subject: [PATCH 14/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index b6bdb65a7..0731b2a38 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -77,7 +77,6 @@ jobs: body-includes: - name: Add PR comment for PyLint - if: ${{ matrix.strict-mode == 'false' && env.OUTPUT != '' }} uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.fc.outputs.comment-id }} From 0d1730299d01c1fddf8eda952c645bd508fcfa5d Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 12:13:44 +0100 Subject: [PATCH 15/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 0731b2a38..af79d0fa4 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -80,7 +80,7 @@ jobs: uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ github.event.number }} + issue-number: ${{ steps.fp.outputs.pr-number }} edit-mode: replace body: | From 3469ac84a27aaf5a26a40fd82b034d3badde9d44 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 12:16:24 +0100 Subject: [PATCH 16/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index af79d0fa4..9de780e46 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -111,5 +111,5 @@ jobs: Daily <${{ env.RUN_URL }}|sync main with dev> has failed for ${{ env.DATE }}. cc: ${{ env.SLACK_WEBHOOK_ADMIN }} - webhook: ${{ env.SLACK_WEBHOOK_TEST }} + webhook: ${{ env.SLACK_WEBHOOK }} \ No newline at end of file From 52b83e7aa2dfa1b7d6fb369dea554f87dac969b9 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 8 Nov 2024 12:18:01 +0100 Subject: [PATCH 17/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 9de780e46..efb485d6b 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -1,10 +1,7 @@ name: sync main with dev on: - push: - branches: - - main - pull_request: - + schedule: + - 0 8 * * * # Runs at 8am UTC defaults: run: @@ -21,7 +18,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - ref: ko3n1g/dev + ref: dev fetch-depth: 0 token: ${{ secrets.PAT }} From ba0cc05f95aad669d9272fd9a627dd39b181971a Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:07:37 +0100 Subject: [PATCH 18/36] add commits to message Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index efb485d6b..a6a24aec2 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -2,7 +2,8 @@ name: sync main with dev on: schedule: - 0 8 * * * # Runs at 8am UTC - + pull_request: + defaults: run: shell: bash -x -e -u -o pipefail {0} @@ -28,6 +29,15 @@ jobs: DATE=$(date +"%Y-%m-%d") echo "date=$DATE" | tee -a "$GITHUB_OUTPUT" + - name: Get commit delta + id: commit-delta + run: | + DELTA=$(git cherry -v ko3n1g/dev main | tr '+' '*') + + echo "COMMIT_DELTA<> $GITHUB_ENV + echo "$DELTA" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + - name: Attempt rebase run: | git config --global user.email "bot@nvidia.com" @@ -84,6 +94,13 @@ jobs: beep boop 🤖: This branch was last rebased onto `main` on ${{ env.DATE }}. + --- + + Updated commits: + ``` + ${{ steps.commit-delta.outputs.main }} + ``` + notify-failure: runs-on: ubuntu-latest if: failure() From 13506c99178546729f58a64d00450408f7e37d63 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:08:39 +0100 Subject: [PATCH 19/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index a6a24aec2..3c73f2777 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - ref: dev + ref: ko3n1g/dev fetch-depth: 0 token: ${{ secrets.PAT }} From cfe82e5e5dc4f6cd87ebb5fbbc8407ec3ab19554 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:12:00 +0100 Subject: [PATCH 20/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 3c73f2777..66811b174 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -1,8 +1,8 @@ name: sync main with dev on: + pull_request: schedule: - 0 8 * * * # Runs at 8am UTC - pull_request: defaults: run: From 59ac1df302e9fa85c1a1ef514635a1e8f5852ad7 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:12:38 +0100 Subject: [PATCH 21/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 66811b174..1c0ddc8ad 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -1,8 +1,8 @@ name: sync main with dev on: pull_request: - schedule: - - 0 8 * * * # Runs at 8am UTC + # schedule: + # - 0 8 * * * # Runs at 8am UTC defaults: run: From ce92bcd836ad75545f39700aaec779d495a19367 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:13:08 +0100 Subject: [PATCH 22/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 1c0ddc8ad..a3a7d884f 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -1,6 +1,6 @@ name: sync main with dev on: - pull_request: + push: # schedule: # - 0 8 * * * # Runs at 8am UTC From fdf6909686303888ecf15dcd13a41aa98dd02479 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:15:14 +0100 Subject: [PATCH 23/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index a3a7d884f..3213afc9b 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -118,12 +118,12 @@ jobs: ref: v0.5.0 path: send-slack-alert - - name: Send Slack alert - uses: ./send-slack-alert/.github/actions/send-slack-alert - with: - message: > - Daily <${{ env.RUN_URL }}|sync main with dev> has failed for ${{ env.DATE }}. + # - name: Send Slack alert + # uses: ./send-slack-alert/.github/actions/send-slack-alert + # with: + # message: > + # Daily <${{ env.RUN_URL }}|sync main with dev> has failed for ${{ env.DATE }}. - cc: ${{ env.SLACK_WEBHOOK_ADMIN }} - webhook: ${{ env.SLACK_WEBHOOK }} + # cc: ${{ env.SLACK_WEBHOOK_ADMIN }} + # webhook: ${{ env.SLACK_WEBHOOK }} \ No newline at end of file From 8698a8672e10c59285364c557a07c87b2a55e376 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:16:08 +0100 Subject: [PATCH 24/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 3213afc9b..4c46d8c76 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -32,6 +32,7 @@ jobs: - name: Get commit delta id: commit-delta run: | + git fetch origin main:main DELTA=$(git cherry -v ko3n1g/dev main | tr '+' '*') echo "COMMIT_DELTA<> $GITHUB_ENV From f0a6361a948598dbce0e3073a77aed63404e08a6 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:20:05 +0100 Subject: [PATCH 25/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 4c46d8c76..be88f686c 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -14,6 +14,7 @@ jobs: name: syncing main with dev outputs: date: ${{ steps.date.outputs.date }} + commit-delta: ${{ steps.commit-delta.outputs.main }} environment: main steps: - name: Checkout @@ -99,7 +100,7 @@ jobs: Updated commits: ``` - ${{ steps.commit-delta.outputs.main }} + ${{ needs.sync-branches-via-rebase.outputs.commit-delta }} ``` notify-failure: From 89d01cbacc5d03d0134aef0472758fa3d8a81f0d Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:22:29 +0100 Subject: [PATCH 26/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index be88f686c..6fc18104a 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -98,9 +98,9 @@ jobs: --- - Updated commits: + 📢✨🪄 Updated commits: ``` - ${{ needs.sync-branches-via-rebase.outputs.commit-delta }} + ${{ env.COMMIT_DELTA }} ``` notify-failure: From e9da6271539a92b361bb2c1f3d4613b9d626e8d2 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:41:51 +0100 Subject: [PATCH 27/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 6fc18104a..6fb0e6e3e 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -35,10 +35,9 @@ jobs: run: | git fetch origin main:main DELTA=$(git cherry -v ko3n1g/dev main | tr '+' '*') - - echo "COMMIT_DELTA<> $GITHUB_ENV - echo "$DELTA" >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV + DELTA=$(echo "${DELTA//$'\n'/<<>>}") + + echo "main=$DELTA" | tee -a "$GITHUB_OUTPUT" - name: Attempt rebase run: | @@ -85,6 +84,15 @@ jobs: issue-number: ${{ steps.fp.outputs.pr-number }} body-includes: + - name: Parse output + run: | + DELTA=${{ needs.sync-branches-via-rebase.outputs.commit-delta }} + DELTA=$(echo "${DELTA//<<>>/\n}") + + echo "COMMIT_DELTA<> $GITHUB_ENV + echo "$DELTA" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + - name: Add PR comment for PyLint uses: peter-evans/create-or-update-comment@v4 with: From 5be9bd5a8989cfae7df88e2b367162720beda778 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:43:09 +0100 Subject: [PATCH 28/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 6fb0e6e3e..ffa927b52 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -86,7 +86,7 @@ jobs: - name: Parse output run: | - DELTA=${{ needs.sync-branches-via-rebase.outputs.commit-delta }} + DELTA="${{ needs.sync-branches-via-rebase.outputs.commit-delta }}" DELTA=$(echo "${DELTA//<<>>/\n}") echo "COMMIT_DELTA<> $GITHUB_ENV From 0d7c3313cb0760e06789b7243cb25449d6732ce3 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:46:12 +0100 Subject: [PATCH 29/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index ffa927b52..82e764c73 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -87,7 +87,7 @@ jobs: - name: Parse output run: | DELTA="${{ needs.sync-branches-via-rebase.outputs.commit-delta }}" - DELTA=$(echo "${DELTA//<<>>/\n}") + DELTA=$(echo "${DELTA//<<>>/\\n}") echo "COMMIT_DELTA<> $GITHUB_ENV echo "$DELTA" >> $GITHUB_ENV From bfea12c160a9dc97efa11fe189c0db51536b3478 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:47:26 +0100 Subject: [PATCH 30/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 82e764c73..bcfd88dd0 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -87,7 +87,7 @@ jobs: - name: Parse output run: | DELTA="${{ needs.sync-branches-via-rebase.outputs.commit-delta }}" - DELTA=$(echo "${DELTA//<<>>/\\n}") + DELTA=$(echo "${DELTA//<<>>/
}") echo "COMMIT_DELTA<> $GITHUB_ENV echo "$DELTA" >> $GITHUB_ENV From a78a1d2d8197deefd2e54b474425f18e44ce2457 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:49:36 +0100 Subject: [PATCH 31/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index bcfd88dd0..81c3429e6 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -87,10 +87,11 @@ jobs: - name: Parse output run: | DELTA="${{ needs.sync-branches-via-rebase.outputs.commit-delta }}" - DELTA=$(echo "${DELTA//<<>>/
}") + DELTA=$(echo "${DELTA//<<>>/\\n}") + echo "COMMIT_DELTA<> $GITHUB_ENV - echo "$DELTA" >> $GITHUB_ENV + echo -E "$DELTA" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV - name: Add PR comment for PyLint From fd272b6b55da8f7b43f163a4cafa7931fe16ecb7 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:51:45 +0100 Subject: [PATCH 32/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 81c3429e6..00de25cf6 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -91,7 +91,7 @@ jobs: echo "COMMIT_DELTA<> $GITHUB_ENV - echo -E "$DELTA" >> $GITHUB_ENV + echo -e "$DELTA" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV - name: Add PR comment for PyLint From 88c3d9224a29b6add0d1964daebbada258b085e9 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:54:53 +0100 Subject: [PATCH 33/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 00de25cf6..9a8b30f88 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -34,7 +34,7 @@ jobs: id: commit-delta run: | git fetch origin main:main - DELTA=$(git cherry -v ko3n1g/dev main | tr '+' '*') + DELTA=$(git cherry ko3n1g/dev main | tr '+' '*') DELTA=$(echo "${DELTA//$'\n'/<<>>}") echo "main=$DELTA" | tee -a "$GITHUB_OUTPUT" @@ -89,7 +89,6 @@ jobs: DELTA="${{ needs.sync-branches-via-rebase.outputs.commit-delta }}" DELTA=$(echo "${DELTA//<<>>/\\n}") - echo "COMMIT_DELTA<> $GITHUB_ENV echo -e "$DELTA" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV @@ -108,9 +107,7 @@ jobs: --- 📢✨🪄 Updated commits: - ``` ${{ env.COMMIT_DELTA }} - ``` notify-failure: runs-on: ubuntu-latest From 53bf56bff6a6beb18739cba46afb35c1cc72ba1b Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:55:55 +0100 Subject: [PATCH 34/36] fix Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index 9a8b30f88..ca190e5c3 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -34,7 +34,7 @@ jobs: id: commit-delta run: | git fetch origin main:main - DELTA=$(git cherry ko3n1g/dev main | tr '+' '*') + DELTA=$(git cherry -v ko3n1g/dev main | tr '+' '*') DELTA=$(echo "${DELTA//$'\n'/<<>>}") echo "main=$DELTA" | tee -a "$GITHUB_OUTPUT" From d8596e9a5b2f390dead4911306e9ec3d569f271b Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Tue, 12 Nov 2024 12:58:28 +0100 Subject: [PATCH 35/36] finalize Signed-off-by: Oliver Koenig --- .github/workflows/sync_branch.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sync_branch.yaml b/.github/workflows/sync_branch.yaml index ca190e5c3..10fb6e1d5 100644 --- a/.github/workflows/sync_branch.yaml +++ b/.github/workflows/sync_branch.yaml @@ -1,8 +1,7 @@ name: sync main with dev on: - push: - # schedule: - # - 0 8 * * * # Runs at 8am UTC + schedule: + - 0 8 * * * # Runs at 8am UTC defaults: run: @@ -20,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - ref: ko3n1g/dev + ref: dev fetch-depth: 0 token: ${{ secrets.PAT }} @@ -34,7 +33,7 @@ jobs: id: commit-delta run: | git fetch origin main:main - DELTA=$(git cherry -v ko3n1g/dev main | tr '+' '*') + DELTA=$(git cherry -v dev main | tr '+' '*') DELTA=$(echo "${DELTA//$'\n'/<<>>}") echo "main=$DELTA" | tee -a "$GITHUB_OUTPUT" @@ -70,7 +69,7 @@ jobs: PR_NUMBER=$(echo -E "$PRs" \ | jq '.[] - | select(.head.ref == "ko3n1g/dev") + | select(.head.ref == "dev") | .number' ) set -x From d2a8f7ed9a9793a9b6a229073ea84e554ce53a10 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Wed, 13 Nov 2024 09:13:42 +0100 Subject: [PATCH 36/36] fix Signed-off-by: Oliver Koenig --- nemo_aligner/package_info.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nemo_aligner/package_info.py b/nemo_aligner/package_info.py index f1e214de6..b2dc038d5 100644 --- a/nemo_aligner/package_info.py +++ b/nemo_aligner/package_info.py @@ -17,12 +17,13 @@ MINOR = 6 PATCH = 0 PRE_RELEASE = "rc0" +DEV = "devN" -# Use the following formatting: (major, minor, patch, pre-release) -VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE) +# Use the following formatting: (major, minor, patch, pre-release, dev) +VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE, DEV) __shortversion__ = ".".join(map(str, VERSION[:3])) -__version__ = __shortversion__ + "".join(VERSION[3:]) +__version__ = __shortversion__ + VERSION[3] + "." + ".".join(VERSION[4:]) __package_name__ = "nemo_aligner" __contact_names__ = "NVIDIA"