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

Update SDK to support sibling acls #3041

Merged
merged 5 commits into from
Aug 27, 2024
Merged

Conversation

drew-codaio
Copy link
Contributor

Part of the work for sibling ACLs. Updating permissions to have a new delegated type.

@drew-codaio drew-codaio requested a review from a team as a code owner August 26, 2024 20:03
@drew-codaio drew-codaio requested review from sam-codaio, jonathan-codaio and patrick-codaio and removed request for a team August 26, 2024 20:03
package.json Outdated
@@ -1,6 +1,6 @@
{
"name": "@codahq/packs-sdk",
"version": "1.7.11",
"version": "1.7.12",
Copy link
Contributor

Choose a reason for hiding this comment

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

since you'll be releasing this immediately, this is fine, but for future reference, the ideal flow is to make this 1.7.12-prerelease.1 and then as a part of doing the release process, it gets to drop the prerelease.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update this

@patrick-codaio
Copy link
Contributor

cc @ekoleda-codaio

@patrick-codaio
Copy link
Contributor

Another way I thought about doing this is that we could let a sync table schema have a permissionDelegationProperty which would need to be a reference to another table.

But I think that could live side-by-side with this, so no objection from me.

Copy link
Collaborator

@jonathan-codaio jonathan-codaio left a comment

Choose a reason for hiding this comment

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

Yeah we can't release this right away I think? Need to update coda to add support to recognize support for this and support backwards compatibility, then need to have a PR read to fast merge to update every pack that uses permissions? Unless we change the SDK to be backwards compatible.

schema.ts Outdated
*
* TODO(sam): Unhide this
* @hidden
*/
export interface Permission {
export interface DirectPermission {
permissionType: PermissionType.Direct;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this for now permissionType?: PermissionType.Direct?

@sam-codaio
Copy link
Contributor

Yeah we can't release this right away I think? Need to update coda to add support to recognize support for this and support backwards compatibility, then need to have a PR read to fast merge to update every pack that uses permissions? Unless we change the SDK to be backwards compatible.

Why not just make the SDK backwards compatible for now (Direct permissions can have no type there and we assume direct?)

@drew-codaio
Copy link
Contributor Author

Yeah we can't release this right away I think? Need to update coda to add support to recognize support for this and support backwards compatibility, then need to have a PR read to fast merge to update every pack that uses permissions? Unless we change the SDK to be backwards compatible.

Why not just make the SDK backwards compatible for now (Direct permissions can have no type there and we assume direct?)

good point.

* @hidden
*/
export enum PermissionType {
Delegated = 'delegated',
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you include some basic JSDoc describing what the delegated and direct mean, when to use them, etc?

schema.ts Show resolved Hide resolved
@drew-codaio drew-codaio merged commit fb89915 into main Aug 27, 2024
1 check passed
@drew-codaio drew-codaio deleted the drew-csb-sdk-sibling-acls branch August 27, 2024 15:54
@jonathan-codaio
Copy link
Collaborator

Make sure to fast follow with coda or packs changes to incorporate these, the SDK is evolving fast and if changes break TS somebody else's SDK change could be stuck behind getting those fixed. I'll share this with the team as well.

@drew-codaio
Copy link
Contributor Author

Make sure to fast follow with coda or packs changes to incorporate these, the SDK is evolving fast and if changes break TS somebody else's SDK change could be stuck behind getting those fixed. I'll share this with the team as well.

My bad still trying to figure out how this whole ecosystem works with the sdk. Will be mindful going forward. Sam and I are working on the fast follow rn.

@jonathan-codaio
Copy link
Collaborator

No need to apologize, there's lots of unwritten best practices to navigate, just spreading awareness.

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.

5 participants