Skip to content

Fixing bytea json conversion error (update to hibernate 6, spring 3) #692

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kinow
Copy link
Member

@kinow kinow commented Mar 30, 2025

Description

Closes #664

WIP: will fill in rest later, and move commits to separate pull requests. Just removing warnings while I investigate the issue in #664.

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@kinow kinow changed the title Fixing bytea json Fixing bytea json conversion error (update to hibernate 6, spring 3) Mar 30, 2025
@kinow kinow self-assigned this Mar 31, 2025
@kinow kinow force-pushed the fixing-bytea-json branch from 8e77916 to 1740b90 Compare March 31, 2025 06:59
@kinow kinow mentioned this pull request Mar 31, 2025
7 tasks
@kinow kinow force-pushed the fixing-bytea-json branch from 1740b90 to 69c3b4d Compare March 31, 2025 07:01
@kinow kinow force-pushed the fixing-bytea-json branch from 69c3b4d to 724d28f Compare March 31, 2025 07:07
Update tests and remove code warnings checking for null.
@kinow kinow force-pushed the fixing-bytea-json branch from 724d28f to b4029d0 Compare March 31, 2025 07:26
@kinow
Copy link
Member Author

kinow commented Mar 31, 2025

I think I got all the changes out, and merged. Those were mainly deprecation warnings that I found while trying to run the code, and a missing header. Now wait for GH Actions, then I will perform one final test. Fingers-crossed it will pass, and then it will be ready for someone to review. 🤞

@kinow kinow marked this pull request as ready for review March 31, 2025 07:55
@kinow kinow requested a review from mr-c March 31, 2025 07:55
@kinow
Copy link
Member Author

kinow commented Mar 31, 2025

It worked! To review, one can confirm the code looks alright, GH Actions build is passing, and maybe try docker compose up after altering the docker compose file to use the build: . so that it builds a new image for the SpringBoot service, instead of using the latest image deployed.

@martinchapman I asked @mr-c to review it, but it would be great if you could try it too, if you have time (or maybe after this gets merged too), to confirm the issue is gone and the viewer is now working for you.

image

Cheers

@kinow kinow added the bug label Mar 31, 2025
@mr-c
Copy link
Member

mr-c commented Mar 31, 2025

Thank you very much @kinow ! Do you know why this wasn't caught by the CI? Do we need a new test?

@kinow
Copy link
Member Author

kinow commented Mar 31, 2025

Thank you very much @kinow ! Do you know why this wasn't caught by the CI? Do we need a new test?

Not a problem, @mr-c 🙂

Good point! I think we didn't have a test for retrieving a workflow (or we did, but not necessarily for the part of the code where this happened), only for the queuedworkflow.

I'll write a test once I have time to work on this again. That should give @chapmanb time to take a look too.

Thanks!


query.setParameter("retrievedFrom", retrievedFrom, new JsonType(GitDetails.class));
return (Workflow) query.uniqueResult();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: write a test for this!

@kinow
Copy link
Member Author

kinow commented Mar 31, 2025

Fixed last warning (it was complaining about our old version of postgres -- 9, while the latest is 17), and added a unit test.

Note, there was one test consistently failing for me, due to a timeout to retrieve spdx licenses. I wonder whether it's a IP block, or maybe only GH Action/AWS/etc are allowed. But if that test fails, it can be ignored as it's not caused by any of the recent changes (you can try curl -XGET https://.... to fetch the same URL and you should get a connection timed out error as well).

@kinow kinow force-pushed the fixing-bytea-json branch from bb68f06 to 9af3d26 Compare March 31, 2025 15:04
@kinow kinow force-pushed the fixing-bytea-json branch from 9af3d26 to 791e4e0 Compare March 31, 2025 15:06
Comment on lines +2 to +8
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cwlviewer is not part of Apache, so perhaps we shouldn't say this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Huh, I think I copied the header from another file in the project. I hope I didn't accidentally copy-paste from a file outside the project (or a file that was copied from an AL project).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR: operator does not exist: jsonb = bytea
2 participants