Skip to content
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

qn - channel agent permissions I #4150

Merged

Conversation

ondratra
Copy link
Contributor

Fixes #3866.

Brings QN part of changes to channel agent permissions done in #3561. Related PRs that brought some pieces needed for this feature are #4030 and #3726 (updated events in QN, etc.).

In the current state, there is a missing Hydra/Warthog feature - array of enums - that is blocking this PR and is not yet overcome. Also, the code is not covered by integration tests yet.

@vercel
Copy link

vercel bot commented Aug 10, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
pioneer-testnet ⬜️ Ignored (Inspect) Aug 25, 2022 at 8:30AM (UTC)

@ondratra
Copy link
Contributor Author

Due to limitations described in Joystream/hydra#507, the schema has been rewritten, and there is a ChannelAgentPermissions and CuratorAgentPermissions for each permission granted (previously, all permissions granted to the member for a given channel/curatorGroup were represented in a single record).

It is also worth noting that some seemingly redundant data were introduced in the schema. For example, channel's collaborators
and collaboratorsPermissions will have similar records (collaboratorsPermissions will have some extra info). This is desired state and it will extend existing querying options without removing any.

In a perfect world, where all Hydra issues are solved, only collaboratorsPermissions would be needed, but with current nested filtering limitations and other issues, it's better to have it this way.

@zeeshanakram3 zeeshanakram3 self-requested a review August 11, 2022 06:54
Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, please address the following points.

query-node/mappings/src/content/channel.ts Outdated Show resolved Hide resolved
query-node/schemas/content.graphql Outdated Show resolved Hide resolved
query-node/schemas/contentNft.graphql Outdated Show resolved Hide resolved
query-node/schemas/content.graphql Outdated Show resolved Hide resolved
@ondratra
Copy link
Contributor Author

Points from the previous review have all been addressed. One of the tests is failing due to some unrelated connection issue but succeeds when run locally.

Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would it be possible for you to add some integration tests, so we are confident about merging it? Thanks

query-node/schemas/contentNft.graphql Show resolved Hide resolved
@ondratra
Copy link
Contributor Author

Integration tests have been added. 1 test failed due to unrelated connection issues.

@zeeshanakram3 zeeshanakram3 self-requested a review August 21, 2022 12:48
@ondratra
Copy link
Contributor Author

All remaining issues have been addressed.

@ondratra ondratra requested a review from zeeshanakram3 August 22, 2022 08:21
Copy link
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ondratra
Copy link
Contributor Author

The recent conflict with the carthage branch has been resolved. @mnaamani please merge this PR asap before another conflict arises.

@mnaamani mnaamani merged commit 0582100 into Joystream:carthage Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants