Repository navigation
RTECO-992 - Added support for uv package manager #3436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
81746ed
RTECO-992 - Added support for uv package manager
agrasth 37818b9
Fix minor issues
agrasth 37ae599
Updated dependecies
agrasth 5e92f7e
Merge branch 'master' into feature/RTECO-992
agrasth d3bf9e5
Address PR review: CI matrix for python/uv versions, hidden uv comman…
agrasth 2cf421e
Slim down UV: delegate to NativeUvCommand in jfrog-cli-artifactory, r…
agrasth 8e1665c
Fix uv_test.go compile errors, rename UvInstall→Uv, fastci@v1, remove…
agrasth c94d20b
Update project.UV and NativeUVCommand references after acronym rename
agrasth eba1156
UV: fix help text redundant keyword, update go.mod local replace dire…
agrasth be01399
Fix lint: Checksum embedded selector, unused params, gosec G703 path …
agrasth 9c3fd87
Fix gosec G703: move #nosec to same line as os.WriteFile
agrasth 610b83d
Merge branch 'master' into feature/RTECO-992
agrasth b21f729
Bypass commands.Exec for help flags to prevent Artifactory usage-repo…
agrasth 9332351
Fix checkIfServerIsUp: accept any HTTP response, not just 200
agrasth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: UV Tests | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - "master" | ||
| # Triggers the workflow on PRs to master branch only. | ||
| pull_request_target: | ||
| types: [labeled] | ||
| branches: | ||
| - "master" | ||
|
|
||
| # Ensures that only the latest commit is running for each PR at a time. | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| UV-Tests: | ||
| name: uv ${{ matrix.os.name }} py${{ matrix.python-version }} uv${{ matrix.uv-version }} | ||
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'safe to test') | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: | ||
| # TODO(JGC-413): re-add macos once Artifactory bootstrap is fixed | ||
| - name: ubuntu | ||
| version: 24.04 | ||
| - name: windows | ||
| version: 2022 | ||
| python-version: ["3.11.5", "3.x"] | ||
| uv-version: ["0.6.17", "latest"] | ||
| runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
|
|
||
| - name: Setup FastCI | ||
| uses: jfrog-fastci/fastci@v1 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| fastci_otel_token: ${{ secrets.FASTCI_TOKEN }} | ||
|
|
||
| - name: Setup Python3 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Setup UV | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| version: ${{ matrix.uv-version }} | ||
|
|
||
| - name: Setup Go with cache | ||
| uses: jfrog/.github/actions/install-go-with-cache@main | ||
|
|
||
| - name: Install local Artifactory | ||
| uses: jfrog/.github/actions/install-local-artifactory@main | ||
| with: | ||
| RTLIC: ${{ secrets.RTLIC }} | ||
| RT_CONNECTION_TIMEOUT_SECONDS: ${{ env.RT_CONNECTION_TIMEOUT_SECONDS || '1200' }} | ||
|
|
||
| - name: Run UV tests | ||
| run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.uv | ||
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
|
agrasth marked this conversation as resolved.
Resolved
|
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package uvcommand | ||
|
|
||
| var Usage = []string{"uv <args> [command options]"} | ||
|
|
||
| func GetDescription() string { | ||
| return "Run uv command" | ||
| } | ||
|
|
||
| func GetArguments() string { | ||
| return ` sub-command | ||
| Arguments and options for the uv command.` | ||
| } |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| [project] | ||
| name = "uv-jfrog-test" | ||
| version = "0.1.0" | ||
| description = "Test package with no Artifactory index configured" | ||
| requires-python = ">=3.11" | ||
| dependencies = [ | ||
| "certifi>=2024.0.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["flit_core>=3.2"] | ||
| build-backend = "flit_core.buildapi" | ||
|
|
||
| # No [[tool.uv.index]] — resolves from lock file URLs (PyPI) | ||
| # Tests the case where dependency enrichment is not possible | ||
|
|
||
| [tool.uv] | ||
| publish-url = "ARTIFACTORY_PUBLISH_URL" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| """JFrog CLI UV integration test package.""" | ||
| __version__ = "0.1.0" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [project] | ||
| name = "uv-jfrog-test" | ||
| version = "0.1.0" | ||
| description = "Test package for JFrog CLI UV integration tests" | ||
| requires-python = ">=3.11" | ||
| dependencies = [ | ||
| "certifi>=2024.0.0", | ||
| ] | ||
|
|
||
| [build-system] | ||
| requires = ["flit_core>=3.2"] | ||
| build-backend = "flit_core.buildapi" | ||
|
|
||
| # ARTIFACTORY_INDEX_URL and ARTIFACTORY_PUBLISH_URL are replaced at test runtime | ||
| # by patchUvPyprojectToml() in uv_test.go | ||
|
|
||
| [[tool.uv.index]] | ||
| name = "jfrog-pypi-virtual" | ||
| url = "ARTIFACTORY_INDEX_URL" | ||
| default = true | ||
|
|
||
| [tool.uv] | ||
| publish-url = "ARTIFACTORY_PUBLISH_URL" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| """JFrog CLI UV integration test package.""" | ||
| __version__ = "0.1.0" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "key": "${UV_LOCAL_REPO}", | ||
| "rclass": "local", | ||
| "packageType": "pypi" | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "key": "${UV_REMOTE_REPO}", | ||
| "rclass": "remote", | ||
| "packageType": "pypi", | ||
| "url": "https://files.pythonhosted.org" | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "key": "${UV_VIRTUAL_REPO}", | ||
| "rclass": "virtual", | ||
| "packageType": "pypi", | ||
| "repositories": [ | ||
| "${UV_LOCAL_REPO}", | ||
| "${UV_REMOTE_REPO}" | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.