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

unexpectedly cubes with schema:version == 1 have schema:datePublished twice #1502

Closed
Rdataflow opened this issue Apr 16, 2024 · 13 comments · Fixed by #1513
Closed

unexpectedly cubes with schema:version == 1 have schema:datePublished twice #1502

Rdataflow opened this issue Apr 16, 2024 · 13 comments · Fixed by #1513
Assignees
Labels
🐛 bug Something isn't working
Milestone

Comments

@Rdataflow
Copy link
Contributor

bug
upon publishing cube version 1 unexpectedly schema:datePublished occurs twice.
https://s.zazuko.com/uaQE2x
oddly there occurs a dateTime

fix
new cubes with version 1 have only one schema:datePublished using date

note
this issue only occurs with version 1

see also

${revision.value === '1' ? sparql`${schema.datePublished} ${timestamp}` : ''}

@CDiGallo as we just discussed.
cc @ortnever (republishing works as an ugly workaround)

@Rdataflow Rdataflow changed the title unexpectedly cubes with schema:version have schema:datePublished twice unexpectedly cubes with schema:version == 1 have schema:datePublished twice Apr 16, 2024
@tpluscode tpluscode added the 🐛 bug Something isn't working label Apr 17, 2024
@tpluscode
Copy link
Collaborator

To sum up, you pointed to a line in code which adds a timestamp to schema:datePublished. Same value is set to schema:dateModified and dcterms:modified of current published, and schema:expires of previous versions.

The problematic scenario, related to the source code line referenced above, happens in cases when the publisher has provided a date in the cube metadata. Hence, two values.

First step to fix would be to only set schema:datePublished if there is no value in the meta.

@Rdataflow
Copy link
Contributor Author

💯
NB: I wasn't aware there exists the possiblity to NOT provide the datePublished.
nit: the curent shapes as well as generally used practice is to use a Date for datePublished - not a timestamp (aka. dateTime)

@giacomociti
Copy link
Contributor

I understand we should use the date part of the timestamp variable as a default value for schema:datePublished.
Only when revision = 1 or always?

@Rdataflow
Copy link
Contributor Author

@giacomociti on version ==1 there occur two schema:datePublished (at least in case a manual date is given in cube-creator) - while only one of them is needed. - and true it must be of type xsd:date

that's what I understand until now. Tom may give you more info on the situation 👍

@giacomociti giacomociti self-assigned this May 2, 2024
@giacomociti
Copy link
Contributor

self-reminder: the datePublished logic was introduced in commit 99dd04e

@CDiGallo
Copy link
Contributor

CDiGallo commented May 7, 2024

@tpluscode in this query https://s.zazuko.com/25fyGL1 one can see that the bug is not contained to version 1

@CDiGallo
Copy link
Contributor

CDiGallo commented May 7, 2024

or it might be two bugs

@giacomociti
Copy link
Contributor

likely it's a separate issue. A DESCRIBE of any of the cubes with version > 1 shows multiple values not only for datePublished but for most other properties

@Rdataflow
Copy link
Contributor Author

@giacomociti for the separate issue: just guessing based on a recent odd experience...
a cube creator project was unexpectedly reset to version 1 - even though there were already cubes online with exactly the same IRIs.

thus the question:

  • is there any check the version number is always increased (based on those versions already online) ?

goal:

  • avoid same cube version being republished

@giacomociti
Copy link
Contributor

it's worth investigating if a cube can be republished with the same version, but I would first merge the changes so far

@Rdataflow
Copy link
Contributor Author

Another very particular situation to check: what happens if publish is run twice at the same time?

@tpluscode tpluscode added this to the s5.9 milestone May 14, 2024
@giacomociti
Copy link
Contributor

Another very particular situation to check: what happens if publish is run twice at the same time?

that may likely be the cause of the unexpected multiple values for many properties :)

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
Status: Deployed on TEST
Development

Successfully merging a pull request may close this issue.

4 participants