-
Notifications
You must be signed in to change notification settings - Fork 185
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
Add group member with type #5336
Conversation
absolute_group_member_uri = | ||
group_uri_.join_path(group_member_uri.to_string()); | ||
} | ||
obj_type = object_type(resources, absolute_group_member_uri); |
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.
Does this not re-introduce the problem?
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.
Only if the object type is not specified by the user. We can move the item type check later, at the time of persisting the group details (and parallelize it and do it on the REST server for remote groups); I think I've brought this up but don't remember what we decided about it.
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.
As Teo said that call is in the else
branch which is only hit when a type is not provided.
As for moving the check later this is out of the scope of this PR, @teo-tsirpanis feel free to open a ticket about your suggestions.
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.
Opened SC-57148.
const char* uri, | ||
const uint8_t relative, | ||
const char* name, | ||
tiledb_object_t type) TILEDB_NOEXCEPT; |
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.
It would be nice if there was a special TILEDB_AUTODETECT
value that could be passed in this parameter. This would allow us to call this function add_member_v2
, and entirely supersede the old one.
7a6d039
to
02e3d3f
Compare
c706cce
to
1e7e70e
Compare
4d9add2
to
5b3f08f
Compare
5b3f08f
to
53e5d39
Compare
a89b6dc
to
3186b6e
Compare
I felt a good citizen in this PR and decided to port relevant UTs to REST CI. After spending too much time debugging issues unrelated to this PR, I decided to go with disabling a few of those test to be able to let this change go in finally since it's an important one. |
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.
Two small comments but LGTM 👍
There are some windows failures but I think it's just from missing file prefix here?
test/src/unit-cppapi-group.cc
Outdated
|
||
// Set expected | ||
auto uri_format = [&](std::string uri) { | ||
return vfs_test_setup_.is_rest() ? vfs_test_setup_.with_prefix(uri) : uri; |
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.
Just an idea from looking at CI.. maybe this is flipped around and we want to use with_prefix
for the false
case?
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 removed all that with_prefix
logic that was confusing and went back to using URIs.
d1df508
to
22b550f
Compare
Add a new
tiledb_group_add_member_with_type
API to avoid checking for the type of the asset before adding a member to a group for optimization purposes.[sc-47918]
TYPE: C_API
DESC: Add API to get group member with type
TYPE: CPP_API
DESC: Update add_member API to accept an optional type