-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat: PolicyMonitorStore SQL implementation #3507
feat: PolicyMonitorStore SQL implementation #3507
Conversation
return "edc_policy_monitor"; | ||
} | ||
|
||
default String getIdColumn() { |
Check notice
Code scanning / CodeQL
Missing Override annotation Note
StatefulEntityStatements.getIdColumn
|
||
default String getErrorDetailColumn() { | ||
return "error_detail"; | ||
default String getIdColumn() { |
Check notice
Code scanning / CodeQL
Missing Override annotation Note
StatefulEntityStatements.getIdColumn
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3507 +/- ##
==========================================
- Coverage 72.08% 72.07% -0.01%
==========================================
Files 841 841
Lines 16996 17030 +34
Branches 951 956 +5
==========================================
+ Hits 12251 12275 +24
- Misses 4341 4351 +10
Partials 404 404
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but quite a substantial amount of the changeset comes from seemingly unrelated changes, i.e. refactoring of the in-mem stuff.
I think it would have been easier to review, if that had been in a separate PR. No need to revert now, just something to keep in mind for the future.
.../eclipse/edc/connector/policy/monitor/spi/testfixtures/store/PolicyMonitorStoreTestBase.java
Outdated
Show resolved
Hide resolved
@paullatzelsperger yes, you're right, I noted a lot of related things on my todo list and this PR seemed to be the right place to implement them, with hindsight, a different PR would had made sense. |
understandable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just a minor comment
try (var connection = getConnection()) { | ||
var existing = findByIdInternal(connection, entity.getId()); | ||
if (existing != null) { | ||
leaseContext.by(leaseHolderName).withConnection(connection).breakLease(entity.getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor
leaseContext.by(leaseHolderName)
could be a noop since the leaseHolder
should not change right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we do this in all the Stores
, I guess this is something coming from the past, because as we decided, all the entity fetched to be modified should be leased. I would keep it for consistency but it could a good refactor to do on all the stores.
The more I think about it, the more I think it does not make any sense 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣
What this PR changes/adds
Provide sql implementation for
PolicyManagerStore
Why it does that
policy-manager
Further notes
Linked Issue(s)
Closes #3447
Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.