Files
TheRock/rocm-systems/.github/workflows/aqlprofile-deprecation-warning.yml
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

93 lines
3.9 KiB
YAML

name: aqlprofile Deprecation Warning
# projects/aqlprofile has been migrated into
# projects/rocprofiler-sdk/source/lib/aqlprofile and is deprecated. Any PR that
# still modifies projects/aqlprofile is flagged (labeled + commented) and the
# check fails so the change can be redirected to the embedded copy instead.
#
# SECURITY: pull_request_target runs in the BASE-repo context, so the token can
# label/comment even for PRs opened from forks. This workflow NEVER checks out
# or executes PR head code; it only reads/writes PR metadata via the GitHub API.
# Do NOT add build/test/install steps that run PR-provided code, and do NOT add
# a checkout of the PR head.
# Refs:
# https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target
on:
pull_request_target:
types: [opened, synchronize, reopened]
paths:
- 'projects/aqlprofile/**'
# Least privilege: pull-requests:write covers commenting on and labeling the PR
# (PR comments/labels use the issues REST endpoints but are authorized by the
# pull-requests scope; issues:write is only needed for standalone issues).
permissions:
contents: read
pull-requests: write
concurrency:
group: aqlprofile-deprecation-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
warn-and-block:
name: aqlprofile-deprecation
# Only run on the canonical repo, not on forks/mirrors.
if: github.repository == 'ROCm/rocm-systems'
runs-on: ubuntu-24.04
steps:
- name: Label and comment deprecation warning
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const label = 'wontfix';
const marker = '<!-- aqlprofile-deprecation-warning -->';
const { owner, repo } = context.repo;
const issue_number = context.payload.pull_request.number;
// Apply the deprecation label (an existing repo label, so no auto-create).
try {
await github.rest.issues.addLabels({
owner, repo, issue_number, labels: [label],
});
} catch (error) {
core.warning(`Could not add label "${label}": ${error.message}`);
}
const body = [
marker,
'## :warning: `projects/aqlprofile` is deprecated :warning:',
'',
'This PR modifies files under `projects/aqlprofile/`, which has been migrated into the `projects/rocprofiler-sdk` source tree and is no longer the source of truth.',
'',
'**Please redirect your changes to the embedded copy:**',
'',
'```',
'projects/rocprofiler-sdk/source/lib/aqlprofile/',
'```',
'',
'The standalone `projects/aqlprofile` copy is being retired, and all ongoing development now happens in the embedded copy. Unless you have an explicit exception, please close this PR and reopen your changes against the embedded copy above.',
'',
'cc @ROCm/rocm-devtools-team',
].join('\n');
// Idempotent: update our existing warning comment if one is present.
const comments = await github.paginate(github.rest.issues.listComments, {
owner, repo, issue_number, per_page: 100,
});
const existing = comments.find((c) => c.body && c.body.includes(marker));
if (existing) {
await github.rest.issues.updateComment({
owner, repo, comment_id: existing.id, body,
});
} else {
await github.rest.issues.createComment({
owner, repo, issue_number, body,
});
}
- name: Fail check to block merge
run: |
echo "::error::projects/aqlprofile is deprecated; move changes to projects/rocprofiler-sdk/source/lib/aqlprofile/"
exit 1