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

[fga] check workspace relationships #18793

Merged
merged 1 commit into from
Sep 25, 2023
Merged

[fga] check workspace relationships #18793

merged 1 commit into from
Sep 25, 2023

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Sep 25, 2023

Description

We have identified that sometimes workspace relationships are missing without any error from spicedb.

We used to write them in large chunks. This changes them taht and writes the workspace rleationship per workspace. In addition it checks if the rleationships have actually been written successfully.

Summary generated by Copilot

🤖 Generated by Copilot at 002c934

This pull request updates the authorization database migration logic and adds a temporary verification check. The changes aim to improve the robustness and consistency of the new authorization model for workspaces, organizations, and users.

Related Issue(s)

Fixes #

How to test

Documentation

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Code LGTM ✔️

@geropl
Copy link
Member

geropl commented Sep 25, 2023

Tests are failing, though... 🤔 Can check in ~40mins

@svenefftinge
Copy link
Member Author

svenefftinge commented Sep 25, 2023

Tests are failing, though... 🤔 Can check in ~40mins

Funny enough, I cannot reproduce that failure in my dev environment, but it looks like a case for the sporadic write failure we are trying to tackle. 🤔

Edit: The causing error is here. Haven't seen that before and couldn't find anything using google.

@svenefftinge
Copy link
Member Author

This happens reliably when running leeway build server:app but not when running the unit tests individually or using yarn test

@svenefftinge
Copy link
Member Author

Turned out to be a problem with the in memory mode of spicedb we use in testing. (issue) So I changed the code to write the relationships sequentially.

@svenefftinge
Copy link
Member Author

/unhold

@roboquat roboquat merged commit e6ba18a into main Sep 25, 2023
13 checks passed
@roboquat roboquat deleted the se/fga-workspace-check branch September 25, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants