Skip to content

Refactor pip/JFrog integration during CI/CD#4804

Merged
asnare merged 3 commits intomainfrom
hide-secrets-better
Apr 29, 2026
Merged

Refactor pip/JFrog integration during CI/CD#4804
asnare merged 3 commits intomainfrom
hide-secrets-better

Conversation

@asnare
Copy link
Copy Markdown
Contributor

@asnare asnare commented Apr 29, 2026

Changes

The purpose of this PR is to adjust the way pip is configured to use JFrog during CI/CD: in particular the username/password are no longer embedded in the URL of the mirror but are instead stored separately in a .netrc file. This is necessary because the mirror URL isn't always handled carefully and can easily be exposed.

Further to the above:

  • The setup for uv has been adjusted to use the same .netrc mechanism, which is slightly cleaner.
  • The rest of the jfrog-auth action has been synced with the latest version we have.

Because the rest of the action has been synced, the commit to review is really a07085e.

Linked issues

Relates #4803.

Tests

  • CI/CD tests

asnare added 2 commits April 29, 2026 14:13
This means the secret isn't embedded (and potentially exposed) by being present in the URL for the mirror, a value that isn't always handled carefully. Given that uv also supports netrc-based authentication, consolidating in this way is cleaner.
@asnare asnare self-assigned this Apr 29, 2026
@asnare asnare requested a review from a team as a code owner April 29, 2026 12:38
@asnare asnare added the enhancement New feature or request label Apr 29, 2026
@asnare asnare added this to UCX Apr 29, 2026
@asnare asnare added github_actions Pull requests that update GitHub Actions code internal this pull request won't appear in release notes labels Apr 29, 2026
@asnare asnare temporarily deployed to account-admin April 29, 2026 12:38 — with GitHub Actions Inactive
@asnare asnare mentioned this pull request Apr 29, 2026
4 tasks
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

✅ 2/2 passed, 20s total

Running from acceptance #8986

@asnare asnare moved this to Ready for Review in UCX Apr 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.77%. Comparing base (d7a1c55) to head (f1f3dab).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4804      +/-   ##
==========================================
- Coverage   87.95%   87.77%   -0.18%     
==========================================
  Files         123      123              
  Lines       17570    17569       -1     
  Branches     3714     3713       -1     
==========================================
- Hits        15453    15422      -31     
- Misses       1425     1458      +33     
+ Partials      692      689       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@FastLee FastLee left a comment

Choose a reason for hiding this comment

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

LGTM

@FastLee FastLee added this pull request to the merge queue Apr 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 29, 2026
@asnare asnare added this pull request to the merge queue Apr 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 29, 2026
@FastLee FastLee added this pull request to the merge queue Apr 29, 2026
@asnare asnare removed this pull request from the merge queue due to a manual request Apr 29, 2026
@asnare asnare temporarily deployed to account-admin April 29, 2026 15:50 — with GitHub Actions Inactive
@asnare asnare added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 45a9a37 Apr 29, 2026
10 checks passed
@asnare asnare deleted the hide-secrets-better branch April 29, 2026 16:03
@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in UCX Apr 29, 2026
FastLee added a commit that referenced this pull request Apr 29, 2026
Per asnare's review on #4803, the prior helper emulated pip's config-file
loading and assumed env vars (PIP_INDEX_URL, UV_INDEX_URL) that aren't set in
either dev or CI. Shell out to `pip config get global.index-url` instead and
fall back to public PyPI when no mirror is configured. After #4804 the JFrog
URL no longer carries credentials, so embedding it in the notebook fixture is
safe.

Co-authored-by: Isaac
FastLee added a commit that referenced this pull request Apr 29, 2026
Per asnare's review on #4803, the prior helper emulated pip's config-file
loading and assumed env vars (PIP_INDEX_URL, UV_INDEX_URL) that aren't set in
either dev or CI. Shell out to `pip config get global.index-url` instead and
fall back to public PyPI when no mirror is configured. After #4804 the JFrog
URL no longer carries credentials, so embedding it in the notebook fixture is
safe.

Co-authored-by: Isaac
a0x8o pushed a commit to alexxx-db/ucx that referenced this pull request May 3, 2026
## Summary

Three previously-failing integration tests, plus a CI fix for a
coverage-config issue that was masking the runner's exit status.

### Test fixes

-
**`test_build_notebook_dependency_graphs_installs_pytest_from_index_url`**
(and its installed-twice sibling) — generate the notebook fixture at
test time using whichever pip mirror is configured locally. The helper
shells out to `python -m pip config list` (not `pip config get`, because
`get` only inspects `user`/`global`/`site` scopes and ignores the `env`
scope that `PIP_CONFIG_FILE` loads as) and parses the
`global.index-url='...'` line. Falls back to public PyPI when no mirror
is configured. The same test now exercises the JFrog mirror in CI and
the dev proxy locally without any environment knowledge baked into the
test code. Depends on databrickslabs#4804 keeping the JFrog URL credential-free.
- **`test_installation_when_dashboard_id_is_invalid`** — skipped; it
exercises a deprecated dashboard API, matching the existing skip on line
185 of the same file.
- **`test_create_account_level_groups_nested_groups`** — scoped the
final assertion to the 4 groups the test actually creates, instead of
asserting a global "no mismatches anywhere" log line that gets polluted
by stale UCX groups left in the shared workspace by earlier runs.

### CI: pin `COVERAGE_RCFILE`

The integration job was failing with `failed: trigger: run: unknown:
exit status 3` even when zero tests failed. Root cause: the
`databrickslabs/sandbox/acceptance` wrapper invokes pytest in multiple
per-directory sessions, and coverage.py walks up from CWD looking for
config. At least one CWD wasn't surfacing the project's
`pyproject.toml`, so coverage fell back to defaults (`branch=false`) and
wrote line data while sibling sessions wrote arc data. The final
session's `cov.combine()` then raised `Can't combine arc data with line
data`. Setting `COVERAGE_RCFILE: ${{ github.workspace }}/pyproject.toml`
forces every session to read the same `[tool.coverage.run]` config
regardless of CWD.

## Test plan

- [x] `make fmt` (black, ruff, mypy, pylint 10.00/10)
- [x] `make test` (2011 passed, coverage 89.83%)
- [x] `labs test-one` for each of the three originally-failing
integration tests
- [x] CI integration job green (76 ✅ / 0 ❌ / 11 ⏭️, all 11 pytest
sessions exit 0)

---------

Co-authored-by: Andrew Snare <andrew.snare@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code internal this pull request won't appear in release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants