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

[0.17] Make persistRun transactional #2244

Merged
merged 1 commit into from
Jan 16, 2025
Merged

[0.17] Make persistRun transactional #2244

merged 1 commit into from
Jan 16, 2025

Conversation

rh-appservices-perf
Copy link
Collaborator

Backport: #2243

Fixes Issue

Fixes #2242

Changes proposed

After deeper investigations it turned out the bug was introduced with #2172 that basically removed the @Transactional annotation around the persistRun method, which is the one invoked by the upload-run async emitter.

My guess is that, given that there is not explicit transaction wrapping that method the roleManager.setRoles(String.join(",", runUpload.roles)); instructions is not visible from the rest of the logic (where the run is persisted) resulting in missing roles at the db level.

Changes:

  • Reinstate the @Transactional to the persistRun method
  • Force the addRunFromData to produce text/plain

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Signed-off-by: Andrea Lamparelli <[email protected]>
@lampajr lampajr merged commit 657dee5 into 0.17 Jan 16, 2025
3 checks passed
@lampajr lampajr deleted the bp-0.17-4a0fa80 branch January 16, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants