Skip to content

ci(test): 🔧 repair test workflow (dead credentials); drop py3.7 from matrix - #44

Merged
pacificcode merged 2 commits into
mainfrom
ci/test-workflow-repair
Sep 25, 2026
Merged

pacificcode merged 2 commits into
mainfrom
ci/test-workflow-repair

Conversation

@pacificcode

@pacificcode pacificcode commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Repairs the test workflow. All 13 runs it has ever made have failed, so the SDK's tests have never run successfully in CI.

Root cause: dead credentials, not code

The token request got 401 Unauthorized, so 3 of 5 tests failed at authentication. Only py3.11 actually failed; the other matrix jobs were cancelled by fail-fast, which made it look like a py3.7 problem.

  • DSV_CLIENT_ID / DSV_CLIENT_SECRET were last set 2023-05-09, and DSV_BASE_URL 2022-05-25. That client no longer exists.
  • The previous target tenant is unknown. Checked 2026-09-25 and ruled out: qa190.qabambe.com, acceptance.secretsvaultcloud.com, and every tenant reporting to the dev/QA Datadog org (no CI 401s on any run date). Most likely it was a prod-domain tenant that has since been deleted or reset.

Fix

Credentials (already applied, no secret values in this PR): the tests now read their own secrets, DSV_TEST_BASE_URL, DSV_TEST_CLIENT_ID and DSV_TEST_CLIENT_SECRET. They point at the dev tenant bill.devbambe.com, using a dedicated client with the minimum it needs:

  • role github-python-dsv-sdk-tests, matching the github-<repo>-tests convention used by dsv-k8s-sidecar and dsv-github-action
  • policy secrets:test:sdk: read only on secrets:test:sdk:<.*>
  • fixture secret test:sdk:simple

Why separate names: release.yml uses DSV_SERVER + DSV_CLIENT_ID / DSV_CLIENT_SECRET to fetch the PyPI token from ci:publish:pypi. Those three were set together on 2023-05-09 for the 1.0.4 publish, while the tests' DSV_BASE_URL (2022) pointed at a different tenant. Sharing the client names is what left the tests broken.

⚠️ Action needed before the next PyPI release (@DelineaXPM/dsv-admins): while diagnosing this I overwrote DSV_CLIENT_ID / DSV_CLIENT_SECRET (and DSV_BASE_URL) before I realised release.yml used them. The 2023 release credential values are lost. They now hold a deleted dev client, so a release fails at login and nothing is exposed. To restore: create a new client for the release role on the DSV_SERVER tenant and set DSV_CLIENT_ID / DSV_CLIENT_SECRET. DSV_BASE_URL is now unused and can be deleted.

This also takes SDK test CI off the prod domain, if that's where it was.

Workflow (.github/workflows/test.yml, tox.ini):

  • Dropped Python 3.7 from the matrix: it isn't available on ubuntu-24.04 runners.
  • fail-fast: false, so each version reports its own result and one failure can't hide another's cause again.
  • tox.ini envlist matched.

Testing

Locally with the new CI client, via tox -e py against the dev tenant: 5/5 on Python 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13. This PR's own test run is the end-to-end check of the repo secrets.

Notes

  • pyproject.toml still advertises Python ≥3.7. Dropping EOL versions from the package is a separate decision and is left untouched.
  • The lint / changie-validation failure is pre-existing: the repo setting "Allow GitHub Actions to create and approve pull requests" is off. It isn't a required check.
  • Touches .github/, so it needs a @DelineaXPM/dsv-admins review per CODEOWNERS.

🤖 Generated with Claude Code

test.yml has failed on all 13 runs it has ever made. The cause is a 401
at /v1/token: the DSV_CLIENT_ID/SECRET repo secrets (2023) and
DSV_BASE_URL (2022) point at a client that no longer exists. py3.11
failed; the other versions were only cancelled by fail-fast.

- Credentials: new dedicated read-only CI client on the dev tenant
  (role github-python-dsv-sdk-tests, policy secrets:test:sdk read).
  Repo secrets updated separately; nothing secret is in this change.
- Matrix: drop 3.7 (not available on ubuntu-24.04); fail-fast off so
  each version reports its own result. tox envlist matched.

Verified locally with the new client: 5/5 on py3.8-3.13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snyk-io

snyk-io Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

release.yml uses DSV_SERVER + DSV_CLIENT_ID/SECRET to fetch the PyPI
token (ci:publish:pypi); test.yml shared those two client names. The
tests now read DSV_TEST_BASE_URL/CLIENT_ID/CLIENT_SECRET, a read-only
test:sdk client on the dev tenant, so test and publishing credentials
can no longer be confused or overwritten one for the other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ changie entry was found

@pacificcode
pacificcode merged commit abe9062 into main Sep 25, 2026
13 of 14 checks passed
@pacificcode
pacificcode deleted the ci/test-workflow-repair branch September 25, 2026 17:07

This branch was successfully deployed

1 active deployment
testing — adaf2b68 Deployed Sep 25, 2026 by pacificcode via build (3.8) #65
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.

4 participants