Skip to content

Conversation

@agrasth
Copy link
Collaborator

@agrasth agrasth commented Nov 11, 2025

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • Appropriate label is added to auto generate release notes.
  • I used gofmt for formatting the code before submitting the pull request.
  • PR description is clear and concise, and it includes the proposed solution/fix.

Fix poetry publish artifact upload regression

Problem

jf poetry publish with build-info-collection flags skips artifact upload in traditional flow.

Root Cause: FlexPack code was incorrectly added to traditional flow in poetry.go, causing early return before poetry publish command execution.

Solution

Remove FlexPack from publish() function in traditional flow. FlexPack should only run in native flow (JFROG_RUN_NATIVE=true).

Changes

  • Removed lines 120-141 (FlexPack integration in traditional flow)
  • Removed saveFlexPackBuildInfo() function (unused)
  • Traditional flow now: publish artifacts → collect build-info
  • Native flow: unaffected (separate code path)

@agrasth
Copy link
Collaborator Author

agrasth commented Nov 11, 2025

FLEXPACK FLOW (cli.go) - ALWAYS WORKED

Entry point: jfrog-cli/buildtools/cli.go

When you run: JFROG_RUN_NATIVE=true jf poetry publish

Code flow:

  1. cli.go checks: if os.Getenv("JFROG_RUN_NATIVE") == "true"
  2. Routes to native implementation
  3. Calls: poetry publish -r ← Native poetry command!
  4. Wait for completion
  5. IF build-info flags provided:
    • Call buildinfo.GetPoetryBuildInfo()
    • Use FlexPack to collect dependencies
    • Search Artifactory for uploaded artifacts
    • Set build properties
    • Save build-info
  6. Done!

Result: Artifacts uploaded, build-info collected

TRADITIONAL FLOW (poetry.go)

Entry point: jfrog-cli-artifactory/artifactory/commands/python/poetry.go

When you run: jf poetry publish (no JFROG_RUN_NATIVE)

Code flow in v2.79.0-v2.82.0 (BUGGY):

  1. poetry.go publish() function starts
  2. Check if buildName != "" && buildNumber != ""
  3. IF YES:
    • Log: "Using FlexPack to collect dependencies..."
    • Create FlexPack instance
    • Collect dependencies
    • Save build-info
    • return ← EARLY EXIT! BUG!
  4. poetry publish command ← NEVER REACHED!

Result: NO artifacts uploaded, only dependency collection

Step 2: return ← EXITS EARLY
Step 3: poetry publish ← NEVER REACHED

@fluxxBot fluxxBot added the bug Something isn't working label Nov 11, 2025
@agrasth agrasth changed the title Fix poetry publish skipping artifact upload in traditional flow Fix poetry publish bug in traditional flow Nov 11, 2025
@agrasth agrasth merged commit c04b9d0 into jfrog:main Nov 11, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants