Skip to content
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

ProjektId is overridden on new Project with synchronous result #98

Closed
m-hruby opened this issue Apr 12, 2022 · 4 comments
Closed

ProjektId is overridden on new Project with synchronous result #98

m-hruby opened this issue Apr 12, 2022 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@m-hruby
Copy link

m-hruby commented Apr 12, 2022

Describe the bug

When uploading result to Depency track (using projectName and projectVersion each time with different version and with synchronous result) the ProjektId is overridden.

After the upload the Project id is now pinned to that Project so new version are ignored.

Environment

  • Plugin Version: 4.1.1

To Reproduce

Steps to reproduce the behavior:

  1. Configure Plugin with projectName and projectVersion (ignore ProjectId)
  2. Upload first version (now the Project id should be configured)
  3. Upload second version
  4. Result is published to the first Project

Expected behavior

Plugging configured with projectName and projectVersion should keep this setting and not use the projectId in further request.

Additional context

i think this is the broken part:

projectId = apiClient.lookupProject(effectiveProjectName, effectiveProjectVersion).getUuid();

@m-hruby m-hruby added the bug Something isn't working label Apr 12, 2022
@sephiroth-j
Copy link
Member

Multiple calls using sync mode are not supported at this time.

@sephiroth-j
Copy link
Member

If you would like to continue using the sync mode for different projects (names and/or versions) in one build job although it does not make any sense, you can set projectId to an empty string upon each invocation.

@m-hruby
Copy link
Author

m-hruby commented Apr 13, 2022

My use-case is one job for a project with different branches (versions). And it is not an option to update the job manually after each invocation.

If this this it not supported than it should not be possible to save this setting via UI in the plugging. This is what not make sense to me. If a save some setting the setting (with just name, version and projectId as empty string) this setting should persist. But after a build the projectId is overridden. Easy fix for that would be not set the projectId globally in this class.

@sephiroth-j
Copy link
Member

I now understand what you actually mean and where the problem lies. I will take care of it. By the way, the information about Jenkins version and job type, which you have withheld so far, is requested at the beginning with good reason.

@sephiroth-j sephiroth-j added this to the v4.2.0 milestone Apr 15, 2022
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

No branches or pull requests

2 participants