Skip to content

refactor: migrate stress tests to xPyD-integration#137

Closed
hlin99 wants to merge 2 commits into
mainfrom
refactor/migrate-stress-to-integration
Closed

refactor: migrate stress tests to xPyD-integration#137
hlin99 wants to merge 2 commits into
mainfrom
refactor/migrate-stress-to-integration

Conversation

@hlin99

@hlin99 hlin99 commented Apr 5, 2026

Copy link
Copy Markdown
Member

Stress tests moved to xPyD-hub/xPyD-integration. Added dispatch trigger.

- Remove tests/stress/test_benchmark_*.py (now in xPyD-integration)
- Remove benchmark CI job, add integration-trigger dispatch

@hlin99-Review-Bot hlin99-Review-Bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The stress test removal and migration concept looks good, and CI is green. However, the cross-repo dispatch step uses GITHUB_TOKEN which lacks permissions to trigger workflows on xPyD-hub/xPyD-integration. This will silently fail or return 403 on push to main. Please use a dedicated PAT/token secret with cross-repo dispatch access.

Comment thread .github/workflows/ci.yml
- uses: actions/setup-python@v5
with: {python-version: "3.12"}
- run: pip install -e ".[dev]"
- run: python -m pytest tests/stress/ -v --tb=short -m benchmark -s

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

secrets.GITHUB_TOKEN is scoped to the current repository only. It cannot trigger repository_dispatch on a different repo (xPyD-hub/xPyD-integration). This step will fail with a 403/404 at runtime.

You need a PAT or a fine-grained token (stored as a separate repo secret, e.g. secrets.INTEGRATION_DISPATCH_TOKEN) that has contents: write or dispatch permission on the target repo.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 5caff22.

@hlin99-Review-BotX hlin99-Review-BotX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

CI is green, but the cross-repo dispatch token issue identified by Review-Bot is a real blocker.

Additionally:

  1. secrets.GITHUB_TOKEN cannot dispatch to another repo. The GITHUB_TOKEN is scoped to the current repository only. The gh api repos/xPyD-hub/xPyD-integration/dispatches call will fail with 403/404. You need a dedicated PAT or fine-grained token stored as a separate secret (e.g. secrets.INTEGRATION_DISPATCH_TOKEN) with contents: write permission on xPyD-hub/xPyD-integration.

  2. No linked issue. The PR description does not reference a GitHub Issue. Per BOT_POLICY, design conformance is mandatory — please link the relevant issue so reviewers can verify the implementation matches the agreed design.

  3. Removed stress tests have no replacement in this repo. The two deleted files (733 lines) are presumably migrated to xPyD-integration, but there is no way to verify from this PR alone. Consider adding a brief note in the PR description confirming the destination and any tracking issue.

Comment thread .github/workflows/ci.yml Outdated
- run: python -m pytest tests/stress/ -v --tb=short -m benchmark -s
- name: Trigger integration tests
env:
GH_TOKEN: \${{ secrets.GITHUB_TOKEN }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

secrets.GITHUB_TOKEN is scoped to the current repo only and cannot trigger repository_dispatch on xPyD-hub/xPyD-integration. This will fail at runtime with 403/404. Use a dedicated secret (e.g. secrets.INTEGRATION_DISPATCH_TOKEN) with dispatch permissions on the target repo.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 5caff22.

Signed-off-by: hlin99 <tony.lin@intel.com>

@hlin99-Review-Bot hlin99-Review-Bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. The cross-repo dispatch token issue from the previous review is fixed — INTEGRATION_DISPATCH_TOKEN is now used instead of GITHUB_TOKEN, with a clear comment documenting the required scope. Stress test removal is clean; no leftover references. CI is fully green.

@hlin99-Review-BotX hlin99-Review-BotX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Token issue is resolved — INTEGRATION_DISPATCH_TOKEN with the scope comment is correct. Stress test removal is clean, no leftover references. CI is fully green.

Minor notes (non-blocking):

  1. PR description still lacks a linked GitHub Issue. Consider adding one for traceability.
  2. First commit (42108a7) uses the noreply email; future commits should use tony.lin@intel.com per BOT_POLICY (second commit is correct).

LGTM.

@hlin99-Review-BotX hlin99-Review-BotX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code reviewed. The benchmark job is correctly replaced with a cross-repo dispatch trigger to xPyD-integration, gated on push to main. Deleted stress test files are consistent with the migration. CI is fully green. LGTM.

@hlin99 hlin99 closed this Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants