Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't know what to think about it.
First: It should be documented if used
Second: I don't think that we should add whatever we want to the io.cozy.files. The doctype is already pretty big and complex. Adding one more metadata make it mare complex.
Third: Since this is only for debug purpose, I don't think it should be added to the doctype
4th: I understand the idea, but once you have the regex done based on the name, it's enough now? Why do you consider the filename as a
weak assumptions
?@paultranvan your thoughts on that?
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.
Nothing prevents users to create or import files with the same name in their drive.
If the criteria is a metadata, it is impossible to make a mistake when we remove the trace files.
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.
From my external perspective, that sounds kind of hacky, and this feeling is worsen by the lack of doc 😄
I think we should prevent ourselves to add undocumented custom attributes in doctypes, particularly for io.cozy.files that are already very big and shared by many clients 🙏
At least, if you really need those kind of attributes, I think it would be much more nicer to group them into a
metadata.konnector
object.The
metadata
object is already quite a mess, and I am pushing for grouping all scope-related attributes in a dedicated object. See the qualifications for instance.