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

BUGFIX: Invalidate triple was not being written to the correct graph #5

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

lagartoverde
Copy link
Collaborator

No description provided.

@abeforgit
Copy link
Member

shouldn't this be written to both graphs? @nvdk can you check this? I don't know enough about sudo services and mu-auth to review this

@abeforgit abeforgit requested a review from nvdk October 4, 2022 09:49
@lagartoverde
Copy link
Collaborator Author

shouldn't this be written to both graphs? @nvdk can you check this? I don't know enough about sudo services and mu-auth to review this

Mmmmm, technically not because we don't use the valid through inside the app, only from outside, but I don't know if it's semantically more correct

@nvdk
Copy link
Member

nvdk commented Oct 4, 2022

afaik published templates (or rather their metadata) is only written to the published graph. Let me just describe what I think should happen in this service:

  1. when publishing a template, we create some metadata in the public graph that describes the published template
    This means the public graph has at least a publisher, a title a date created and a pointer to where to download the template. Ideally (though I understand that's not the case yet) that means the file description is also part of the public graph
  2. when unpublishing a template we set a valid until date on the template

So from that standpoint this seems correct.

I do have some questions on how that relates to the data from the app users standpoint. note that there's a disconnect between the public data above and the actual documents that a user maintains. The idea is that the publication creates a separate public file (on disk or in the db) that contains a published variant. In the app itself it may or may not be possible to delete documents. I don't think the publishing service should take care of that.

@abeforgit
Copy link
Member

afaict the user (that is, the person logged in to the registry) only sees the templates. Every template can be in 2 states, not published or published. When you make a change to a published template, the currently published version gets overwritten (from the user's standpoint, no idea what the data does)
Now the user has the option to delete a template. That deletes it from the registry (via mu-cl-resources, not sure from which graph it gets deleted?), and also sets the invalidation date, via this service.

@lagartoverde
Copy link
Collaborator Author

Basically we have 2 data structures:

  • Reglement: It has a document container via ext:hasDocumentContainer this document container behaves the same as GN, with the different versions etc...
  • ext:PublishedRegulatoryAttachmentContainer: This is the publication container, is linked to the reglement via ext:publishedVersion, it has a current version of ext:PublishedRegulatoryAttachment, also a version history with pav:previousVersion which is currently not used for anything.

@nvdk
Copy link
Member

nvdk commented Oct 4, 2022 via email

@abeforgit abeforgit added the bug Something isn't working label Oct 4, 2022
Copy link
Member

@abeforgit abeforgit left a comment

Choose a reason for hiding this comment

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

Well the discussion has no conclusion but I guess its fine to merge

@abeforgit abeforgit merged commit da9f1ea into master Oct 4, 2022
@abeforgit abeforgit deleted the bugfix/invalidato-not-written-to-public-graph branch October 4, 2022 15:28
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.

3 participants