Merged
Conversation
effde82 to
bc8ad30
Compare
This was referenced Nov 30, 2025
bhanurp
reviewed
Dec 1, 2025
| return pc | ||
| } | ||
|
|
||
| func (pc *PoetryCommand) SetPypiRepoUrlWithCredentials() error { |
Collaborator
There was a problem hiding this comment.
please add unit tests for this
| // For publish commands, only configure Poetry TOML, don't modify pyproject.toml | ||
| if pc.commandName == "publish" { | ||
| return RunPoetryConfig( | ||
| rtUrl.Scheme+"://"+rtUrl.Host+rtUrl.Path, |
Collaborator
There was a problem hiding this comment.
does rtUrl give trailing /
Collaborator
Author
There was a problem hiding this comment.
No, rtUrl does NOT give a trailing / after our fix:
publishUrl := strings.TrimSuffix(baseUrl, "/simple") // Removes /simplepublishUrl = strings.TrimSuffix(publishUrl, "/") // Removes any trailing /
Result:
- Before:
https://server/artifactory/api/pypi/repo/simple - After:
https://server/artifactory/api/pypi/repo(no trailing slash)
| // Strip "simple" from URL for publishing support (same as Twine) | ||
| // Resolution URL (with /simple) should be configured in pyproject.toml | ||
| // Publishing URL (without /simple) is configured in Poetry config | ||
| publishUrl := strings.TrimSuffix(repoUrl.String(), "simple") |
Collaborator
There was a problem hiding this comment.
why is this change required? I am dont think this is part of poetry command/config flow. Could you please verify?
- Fix URL construction to properly strip /simple suffix and trailing slashes for publishing - Ensure publish URL doesn't contain /simple (used for resolution only) - Add comprehensive unit tests for URL transformation logic - Update setup command to strip trailing slashes consistently - Update go.mod with latest build-info-go dependency Testing: - Poetry install with build info collection works correctly - Poetry publish with build info uploads artifacts and tracks in build info - Multiple repositories configuration correctly selects primary repo - URLs configured correctly: pyproject.toml has /simple, poetry config doesn't
66627e6 to
104b4d0
Compare
nitinp19
pushed a commit
to nitinp19/jfrog-cli-artifactory
that referenced
this pull request
Dec 11, 2025
vpipkt
reviewed
Mar 4, 2026
| // Strip "simple" and trailing slash from URL for publishing support (same as Twine) | ||
| // Resolution URL (with /simple) should be configured in pyproject.toml | ||
| // Publishing URL (without /simple) is configured in Poetry config | ||
| publishUrl := strings.TrimSuffix(repoUrl.String(), "simple") |
There was a problem hiding this comment.
this seems to have caused a regression for using jf poetry install with configured sources now unable to reach /simple index
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Title
Fix Poetry publish URL and improve publish command handling
Description
What
jf setup poetryto configure the correct URL for publishing (without/simplesuffix)publishcommand to avoid modifyingpyproject.tomlWhy
Issue 1: Incorrect Publish URL
The
GetPypiRepoUrlWithCredentialsfunction always appends/simpleto URLs:https://server/artifactory/api/pypi/repo/simple(correct)https://server/artifactory/api/pypi/repo/(needs NO/simple)Using the resolution URL for publishing causes
415 Unsupported Media Typeerrors.Issue 2: Publish Command Side Effects
The
publishcommand was callingConfigPoetryRepo()which:pyproject.tomlpoetry updateThis is unnecessary and unwanted for publishing.
Changes
artifactory/commands/setup/setup.go:artifactory/commands/python/poetry.go:Related PRs