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
Use knora-api 13.0.0-rc.5 #205
Conversation
The unit tests fail because of a change in {
"@id" : "http://rdfh.ch/0001/_GlNQXdYRTyQPhpdh76U1w/values/OGbYaSgNSUCKQtmn9suXlw",
"@type" : "knora-api:IntValue",
"knora-api:valueCreationDate" : {
"@type" : "http://www.w3.org/2001/XMLSchema#dateTimeStamp",
"@value" : "2019-01-09T15:45:54.502951Z"
},
"knora-api:valueHasUUID" : "hKOvV-6ZSG-qnOTKHRmlfQ",
"@context" : {
"knora-api" : "http://api.knora.org/ontology/knora-api/v2#"
}
} The response now contains a
@benjamingeer Did the value creation response always contain a |
This was added recently, in dasch-swiss/dsp-api#1646. I thought we had all agreed that knora-api-js-lib shouldn't fail if Knora returned additional information, so this shouldn't cause a test to fail. |
knora-api-js-lib does not fail. The thing that failed was an assertion in the specs that dynamically creates the response data for the different value types. The assertion compares the dynamically created data with the JSON obtained from Knora. |
and none of the E2E tests failed either |
OK but that means that if Knora returns additional information, the test considers it a failure (a breaking change), which it isn't. So maybe that test isn't a good idea. |
Without the assertion there would be no way to know whether the response is correct. Knora returns a value creation response for an integer value. But all the other types have to be tested too. These can be easily produced by the test framework, but there needs to be a check if it actually conforms to what Knora returns. If you provide test response data for each value type, then this can be removed. |
Why not just check for the presence of the data that you're looking for, and ignore the rest? Why is the value type in the response relevant? Does knora-api-js-lib use it for anything? |
It's actually not relevant. My rationale was that the tests should be realistic and numb. I admit that adding the mocks to produce the data dynamically introduces some additional complexity that could also lead to problems. As always when you actually test the test. I will create a DSP task to evaluate taking a simpler approach. However, shouldn't all changes in Knora's public API be documented in the GitHub releases? Also a non breaking change is of interest. Or did I look in the wrong place? |
created a task here: https://dasch.myjetbrains.com/youtrack/issue/DSP-418 |
True, I've added it here: https://github.com/dasch-swiss/knora-api/releases/tag/v13.0.0-rc.5 |
Thank you! |
just a detail: as a convention, in JS-lib and UI-lib we link to the PRs. See https://github.com/dasch-swiss/knora-api-js-lib/releases for example. I also think it is helpful to have different categories. Maybe we could make this consistent throughout DSP? |
Good idea. |
For the release notes we use GREN in github actions (CI) |
I can add our "Generate release notes" process to the DSP-API repo, if it's ok? |
Is that a program? I think we already have GREN, but we forgot to document it, so I've forgotten how to use it. |
@kilchenmann This is what we have so far: https://github.com/dasch-swiss/knora-api/blob/develop/RELEASING.md |
Yes, it's also GREN. We have integrated the command in Github CI. So, it will update the release notes automatically on each release. |
Let's try integrating it in GitHub CI like you did. If we need to add something to the generated release notes, we can always edit them manually after they're generated. |
|
Would this PR be useful for you? |
Doing that now. |
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
We should merge this PR asap. I need the create ontology response in PR #208 |
@kilchenmann Ok, it has been merged. |
@tobiasschweizer Thanks. I will update my branch... |
Use knora-api 13.0.0-rc.5