fix(profiling): lock profiler identifies greenlet ids and names #23643
Workflow file for this run
This file contains hidden or 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
| name: Backport | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| - labeled | |
| jobs: | |
| backport: | |
| name: Backport | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| # Only react to merged PRs for security reasons. | |
| # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. | |
| if: > | |
| github.event.pull_request.merged | |
| && ( | |
| github.event.action == 'closed' | |
| || ( | |
| github.event.action == 'labeled' | |
| && contains(github.event.label.name, 'backport') | |
| ) | |
| ) | |
| steps: | |
| - uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3 | |
| id: octo-sts | |
| with: | |
| scope: DataDog/dd-trace-py | |
| policy: self.backport.create-pr | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Execute Backport | |
| id: create-commit | |
| env: | |
| BACKPORT_LABEL: ${{ github.event.label.name }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| PR_BRANCH: ${{ github.head_ref }} | |
| GH_TOKEN: ${{ steps.octo-sts.outputs.token }} | |
| run: | | |
| git config --global user.name "${GITHUB_ACTOR}" | |
| git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
| TARGET_BRANCH=$(echo "${BACKPORT_LABEL}" | awk '{ print $NF }') | |
| MERGE_COMMIT=$(git rev-parse HEAD) | |
| WORKTREE=".worktrees/backport-${TARGET_BRANCH}" | |
| BACKPORT_BRANCH="backport-${PR_NUMBER}-to-${TARGET_BRANCH}" | |
| git worktree add ${WORKTREE} ${TARGET_BRANCH} | |
| cd ${WORKTREE} | |
| git branch -D ${BACKPORT_BRANCH} || true | |
| echo "switching" | |
| git switch --create ${BACKPORT_BRANCH} | |
| echo "cherrypicking" | |
| git cherry-pick -x --mainline 1 ${MERGE_COMMIT} | |
| echo "branch=${BACKPORT_BRANCH}" | tee -a "$GITHUB_OUTPUT" | |
| echo "branch-from=$(git rev-parse ${TARGET_BRANCH})" | tee -a "$GITHUB_OUTPUT" | |
| echo "commit=$(git rev-parse HEAD)" | tee -a "$GITHUB_OUTPUT" | |
| echo "target-branch=${TARGET_BRANCH}" | tee -a "$GITHUB_OUTPUT" | |
| - name: Push Commit | |
| uses: DataDog/commit-headless@action/v2.0.3 | |
| with: | |
| branch: ${{ steps.create-commit.outputs.branch }} | |
| branch-from: ${{ steps.create-commit.outputs.branch-from }} | |
| command: push | |
| commits: ${{ steps.create-commit.outputs.commit }} | |
| force: true | |
| - name: Create PR | |
| env: | |
| GH_TOKEN: ${{ steps.octo-sts.outputs.token }} | |
| run: | | |
| gh pr create \ | |
| --title "${{ github.event.pull_request.title }} [backport ${{ steps.create-commit.outputs.target-branch }}]" \ | |
| --body "Backport #${{ github.event.pull_request.number }} to ${{ steps.create-commit.outputs.target-branch }}" \ | |
| --base ${{ steps.create-commit.outputs.target-branch }} \ | |
| --head ${{ steps.create-commit.outputs.branch }} \ |