Closed KorSin closed 3 years ago
@neubs-bsi, @oheger-bosch In terms of automated tests I am satisfied with the changes. However, manually testing the changes with an SW360 instance leaves me a bit confused. If I update a not cleared release with the WORK_IN_PROGRESS
state, this state is succesfully set in SW360 and no attachment upload is performed. Afterwards however, if I want to update release information, e.g., download url or clearing state to OSM_APPROVED
, these changes are not visible in SW360. Do you have an idea what is wrong, or is this somehow an expected SW360 behavior?
@KorSin
have you set sw360updateReleases
to true
in the updaters properties file? By default it is false.
Yes, it is set to true
.
Do updates of attributes work if you set the clearing state directly to OSM_APPROVED? And can you update properties multiple times while the state is WORK_IN_PROGRESS?
No, both things do not work. However, I can still add attributes that were not filled out before.
Hm, then this sounds like another problem with updates, but not related to this PR. I would propose adding a new ticket to track this.
Hmm, going through the procedure with a debugger, it seems the problem lies rather on the antenna side:
During an update, the method getOrCreateRelease
is called. If the release is found in SW360, the data is merged and the update is performed afterwards, see here. It seems that this merging overwrites the local release with the data from SW360 and then updates it which would make the update redundant. Am I missing something?
Can it be that the merge is just done in the wrong direction? The properties of the local release should override the ones of the release in SW360, and not the way around.
It seems to be the current case. Maybe the intention was to not override the most important fields like the name or version. Changing the priority should not be difficult, but I am unsure whether to do this in this PR.
No, better having a separate ticket and PR. So, I think this one can be merged - maybe except for this typo?
The ticket already exists. https://github.com/eclipse/antenna/issues/588 @KorSin you can mention your discoveries there.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities (and 0 Security Hotspots to review)
0 Code Smells
84.2% Coverage
0.0% Duplication
The version of Java (1.8.0_272) you have used to run this analysis is deprecated and we will stop accepting it accepting it soon.Please update to at least Java 11. Read more here
Resolves #608
A release can now have a WORK_IN_PROGRESS clearing state. This updates or creates the release on SW360 but does not upload any attachment.
Signed-off-by: Korbinian Singhammer external.Korbinian.Singhammer2@bosch.io
Request Reviewer
Type of Change
Type of change: new feature
How Has This Been Tested?
Checklist
Must:
Optional: (delete if not applicable)