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

Alessandro/web 1659 workspace limits #2733

Merged
merged 10 commits into from
Aug 26, 2024

Conversation

alemagio
Copy link
Contributor

Description & motivation

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

Copy link

linear bot commented Aug 22, 2024

}

type WorkspaceBilling {
version: WorkspaceBillingVersion
Copy link
Contributor

Choose a reason for hiding this comment

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

lets call this versionCount

@@ -153,6 +153,21 @@ input PendingWorkspaceCollaboratorsFilter {
search: String
}

type WorkspaceBillingVersion {
Copy link
Contributor

Choose a reason for hiding this comment

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

type WorkspaceVersionCount

@@ -1 +1,2 @@
export const WorkspaceInviteResourceType = 'workspace'
export const WORKSPACE_MAX_PROJECTS_VERSIONS = 500
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be moved to the gatekeeper module

.where({ workspaceId })
.count(StreamCommits.col.commitId)

return Number(res.count)
Copy link
Contributor

Choose a reason for hiding this comment

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

prob parseInt is more correct

async ({ workspaceId }) => {
const [res] = await tables
.workspaces(db)
.join(Streams.name, Streams.col.workspaceId, Workspaces.col.id)
Copy link
Contributor

Choose a reason for hiding this comment

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

you can just query the Streams table

@gjedlicska gjedlicska merged commit 0ac36af into main Aug 26, 2024
22 of 24 checks passed
@gjedlicska gjedlicska deleted the alessandro/web-1659-workspace-limits branch August 26, 2024 15:53
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.

2 participants