-
Notifications
You must be signed in to change notification settings - Fork 158
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
fix(BA-420): Regression of outdated vfolder
GQL resolver
#3047
Conversation
@@ -1875,16 +1875,23 @@ async def resolve_vfolder( | |||
user_id: Optional[uuid.UUID] = None, | |||
) -> Optional[VirtualFolder]: | |||
graph_ctx: GraphQueryContext = info.context | |||
user_role = graph_ctx.user["role"] | |||
loader = graph_ctx.dataloader_manager.get_loader( | |||
graph_ctx, | |||
"VirtualFolder.by_id", |
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 want to use get_loader_by_func
and VirtualFolder.batch_load_by_id
here, but then I'm getting a type error since the return type of VirtualFolder.batch_load_by_id
differs from what get_loader_by_func
expects.
@@ -1627,7 +1627,7 @@ async def batch_load_by_id( | |||
query, | |||
cls, | |||
ids, | |||
lambda row: row["user"], |
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.
Since user_id
is provided as a separate argument, the id
here should be the vfolder's id.
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 think the news fragment has been sabotaged by gitub action.. please resolve it
Resolved in #3059. |
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.
Please update the PR title and the news fragment to "which GQL query resolver" is fixed. Broken Vfolder GQL
is too vague
Vfolder
GQLVFolder
GQL outdated resolver
VFolder
GQL outdated resolverVFolder
GQL due to outdated resolver
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.
Please refer which GQL query resolver is fixed. e.g. Fix GraphQL vfolder
query.
VFolder
GQL could mean many other queries such as vfolder
, vfolder_list
, vfolder_node
etc
VFolder
GQL due to outdated resolvervfolder
GQL resolver
I used uppercase letters to maintain consistency with other PRs, but since it could cause misunderstandings, I changed it to lowercase. |
82e5273
to
730212e
Compare
please check CI. @jopemachine |
case VFolderRow(): | ||
return cls( | ||
id=row.id, | ||
host=row.host, | ||
quota_scope_id=row.quota_scope_id, | ||
name=row.name, | ||
user=row.user, | ||
user_email=row.user_row.email if row.user_row is not None else None, | ||
group=row.group, | ||
group_name=row.group_row.name if row.group_row is not None else None, | ||
creator=row.creator, | ||
domain_name=row.domain_name, | ||
unmanaged_path=row.unmanaged_path, | ||
usage_mode=row.usage_mode, | ||
permission=row.permission, | ||
ownership_type=row.ownership_type, | ||
max_files=row.max_files, | ||
max_size=row.max_size, # in MiB | ||
created_at=row.created_at, | ||
last_used=row.last_used, | ||
cloneable=row.cloneable, | ||
status=row.status, | ||
cur_size=row.cur_size, |
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.
Is there a reason why it was separated? The behavior seems identical to that of Row
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.
The two codes are not the same although the meaning is almost identical.
For example, on the Row
side, it is row["id"]
, while on the VFolderRow
side, it is id=row.id
.
But I agree it would be great if there were a way to simplify the code further.
8ce145f
to
5fd6dd0
Compare
019e513
to
45cab2f
Compare
@HyeockJinKim Could you review the PR again and confirm if it's ready to be merged? |
vfolder
GQL resolvervfolder
GQL resolver
Could you review this once more? @fregataa |
@fregataa This PR is set to BA Sprint 1. |
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.
👍
Co-authored-by: Sanghun Lee <[email protected]> Backported-from: main (24.12) Backported-to: 24.03 Backport-of: 3047
Co-authored-by: Sanghun Lee <[email protected]> Backported-from: main (24.12) Backported-to: 24.09 Backport-of: 3047
Co-authored-by: Sanghun Lee <[email protected]> Backported-from: main (24.12) Backported-to: 23.09 Backport-of: 3047
…3452) Co-authored-by: Gyubong Lee <[email protected]> Co-authored-by: Sanghun Lee <[email protected]>
…3453) Co-authored-by: Gyubong Lee <[email protected]> Co-authored-by: Sanghun Lee <[email protected]>
…3454) Co-authored-by: Gyubong Lee <[email protected]> Co-authored-by: Sanghun Lee <[email protected]>
Fixes #3325 (BA-420).
When using
vfolder
GQL in the main branch, the following error occurs:This PR resolves several issues causing the
VFolder
GQL to malfunction in the current main branch.Request example
Checklist: (if applicable)
📚 Documentation preview 📚: https://sorna--3047.org.readthedocs.build/en/3047/
📚 Documentation preview 📚: https://sorna-ko--3047.org.readthedocs.build/ko/3047/