Skip to content

Conversation

@ndr-brt
Copy link
Member

@ndr-brt ndr-brt commented Apr 17, 2025

What this PR changes/adds

Removes NOT NULL constraint on raw_vc column in sql credential store.
Adds identity-hub-credentials-store-sql to the sql-bom so the flow can be covered by the DcpIssuanceFlowEndToEndTest, that was still failing.

To fix it I had to add a patch in the BitstringStatusListManager, because otherwise the published=true information gets lost.
That does the job but in a really ugly and not optimal way, so my proposal would be:

Remove persistance from the StatusListCredentialPublisher implementation, because, as the interface is stating, that component should just publish and report the result of the publication, and the persistence could be made by the caller (the BitstringStatusListManager) directly, so in the .compose block after calling the publisher the published flag could be directly added to the metadata together with the publicUrl one.

@wolf4ood @paullatzelsperger let me know what you think about, I can take care to do this change directly

NOTE: unit tests are broken but I'd prefer to have some discussion about the solution to adopt before going and fixing them

Why it does that

Briefly state why the change was necessary.

Further notes

  • removed canHandle and unpublish methods from the StatusListCredentialPublisher as they are not used yet and it's still not clear how they'll be used, to be reintroduced back when needed with the proper signature

Who will sponsor this feature?

Please @-mention the committer that will sponsor your feature.

Linked Issue(s)

Closes #709

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@ndr-brt ndr-brt added the bug Something isn't working label Apr 17, 2025
@wolf4ood
Copy link
Contributor

Hi @ndr-brt

Just a quick note, the rawVc was intentionally set to null, since the issuer should not store the signed VC in the database.
The fix should take into account that rawVc must be null for the issuer cred store but not for the identityHub one.

@ndr-brt
Copy link
Member Author

ndr-brt commented Apr 17, 2025

Hi @ndr-brt

Just a quick note, the rawVc was intentionally set to null, since the issuer should not store the signed VC in the database. The fix should take into account that rawVc must be null for the issuer cred store but not for the identityHub one.

In fact I discovered that I'm not fixing the bug that I reported but a different one! 🥲

EDIT: done

@ndr-brt ndr-brt changed the title fix: add missing sql dependency to bom and remove unnecessary transaction block fix: add missing sql dependency to bom and remove not null constraint Apr 17, 2025
@ndr-brt ndr-brt merged commit 942247d into main Apr 25, 2025
17 checks passed
@ndr-brt ndr-brt deleted the 709-fix-sql-bug branch April 25, 2025 11:55
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

Successfully merging this pull request may close these issues.

not-null constraint violation on "raw_vc" column of "credential_resource" table

4 participants