-
Notifications
You must be signed in to change notification settings - Fork 2
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
async function isRepositoryVersioned() maybe wrong #67
Comments
Hi Adrian, Can you elaborate on the issue you are facing? Regards, |
Hi Ashish, according to the cmis-spec http://docs.oasis-open.org/cmis/CMIS/v1.0/cd04/cmis-spec-v1.0.pdf "capabilityContentStreamUpdatability" indicates the support a repository has for updating a document’s content stream. Valid values are: • none: The content stream may never be updated. That's why I wonder, if the code
may better be
My specific problem is the following. I have a SAP Document Management Service (Integration Option) repository, which gives me very different results depeding on which API endpoint I use to query its state: Query 1:
Result 1: {...
{
"paramName": "isVersionEnabled",
"paramValue": false
},
...} Query 2:
Result 2: {...
"capabilities": {
"capabilityContentStreamUpdatability": "anytime",
...}
...} Query 3:
Result 3: {...
"capabilities": {
"capabilityContentStreamUpdatability": "pwconly",
...}
...} The results all belong to the very same repositoryId. Nonetheless, with my suggested fix for the function isRepositoryVersioned(), the cap-js/sdm module should always work for non-versioned repositories. Thanks and best regards |
Hello Ashish, I have read through the cmis documentation once again and my understanding of
has changed now. I think "none" and "anytime" means: You can either never or always update a file without versioning. Can you verify this? Thanks and best regards |
I have the same problem. Eventhough I have created a non-versioned repository I am getting an error: 'Attachments are not supported for a versioned repository.'
|
Hi @korayyersel, Can you send me the response by executing getRepositoryInfo for above repositoryId |
Hi @yashmeet29 of course! Thx for the quick response
|
Hi @korayyersel, can you also share how you onboarded the repository and with what parameters? |
@yashmeet29 yeah sure { btw FYI I had to call this at least 30-40 times until it worked. I was getting constantly generic errors. |
Hi @korayyersel, I followed below steps and I am not able to reproduce the issue
Conclusion: As per the above responses, i don't see any reason why our logic won't work. Can you please cross check at your end as you also mentioned you had to call this at least 30-40 times until it worked and you were getting some generic errors. This doesn't seems to be an issue at our end. Regards, |
Hi @waldpark, I have cross checked this and summarised my findings in above comment. This doesn't seems to be an issue at our end. Regards, |
@yashmeet29 And can you tell me which datacenter you call for your request? That would be helpful for the SAP incident I guess. And thx for the quick responses. Highly appreciated! |
Hi @korayyersel, yes for Internal versioned repository only the value should be "pwconly". Regards, |
Hi @yashmeet29 and @korayyersel, Thank you for checking! Please do not forget to mention "eu10" if you create an incident. In my case,
gives the wrong result
Best regards |
Hi @waldpark |
short update: high prio incident is on sap. they are still investigating the issue. they could confirm that there is something wrong on AWS EU10 |
update:
I have asked for a timeline |
if anyone needs a quick fix until SAP fixes this: module.exports = cds.service.impl(async function () { // Override the isRepositoryVersioned function directly in the utility module this.before('CREATE', Request, async (req) => { |
The function
checks the attribute capabilityContentStreamUpdatability for the value pwconly instead of the value anytime.
I think this is a bug.
Please have a look at the documentation
http://docs.oasis-open.org/cmis/CMIS/v1.0/cd04/cmis-spec-v1.0.pdf
lines 74-80
Can you please provide a fix asap?
Thanks and best regards
Adrian
The text was updated successfully, but these errors were encountered: