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

[dashboard] use organization v2 shapes #18970

Merged
merged 1 commit into from
Nov 6, 2023
Merged

[dashboard] use organization v2 shapes #18970

merged 1 commit into from
Nov 6, 2023

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Oct 24, 2023

Description

Changes the dashboard to use the shapes of the new Organization API V2.

Summary generated by Copilot

🤖 Generated by Copilot at 8368f16

Refactor the dashboard components and data modules to use the new public API for organizations and members. Add a new slug field to the Organization type in the public API and the corresponding converter and test methods.

Related Issue(s)

Fixes #

How to test

Verify the change has no effect on any of the organization-related functionality in dashboard.
As an owner you should

  • check altering settings
  • create, delete org
  • invite members

Join another org as a member and check

  • you cannot change settings or delete the org
  • cannot change other members

As a member you should not be able to change settings.

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

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

@svenefftinge
Copy link
Member Author

svenefftinge commented Oct 24, 2023

/gh run recreate-vm

Comment triggered a workflow run

Started workflow run: 6629347394

  • recreate_vm: true

@akosyakov
Copy link
Member

akosyakov commented Oct 28, 2023

/gh run recreate-vm=true

Comment triggered a workflow run

Started workflow run: 6675577882

  • recreate_vm: true

@svenefftinge svenefftinge force-pushed the se/use-org-apiv2 branch 2 times, most recently from be4755b to 1c87ad6 Compare October 28, 2023 11:34
@svenefftinge
Copy link
Member Author

svenefftinge commented Nov 2, 2023

/gh run recreate-vm=true

Comment triggered a workflow run

Started workflow run: 6729736370

  • recreate_vm: true

@svenefftinge svenefftinge force-pushed the se/use-org-apiv2 branch 2 times, most recently from c2332ab to f7bc0c2 Compare November 2, 2023 16:30
Copy link
Contributor

@selfcontained selfcontained left a comment

Choose a reason for hiding this comment

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

Tested and I didn't notice any issues. My biggest question/concern is around the serialization of what we put in the query cache, and starting to store instances of objects vs. plain serialized objects. That's been a problem in a few past projects I've worked on and would be good to avoid if we can.

components/dashboard/src/data/setup.test.ts Show resolved Hide resolved
components/dashboard/src/data/setup.tsx Show resolved Hide resolved
@akosyakov
Copy link
Member

akosyakov commented Nov 3, 2023

When I try to leave the organization this screen did not get updated in anyway, but from logs it does look like it worked. (it was with gRPC on)

Screenshot 2023-11-03 at 09 09 19

@akosyakov
Copy link
Member

akosyakov commented Nov 3, 2023

I seen following error in console logs, not sure how to reproduce (it was with gRPC on)

Screenshot 2023-11-03 at 09 19 29

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

I retested with JSON-RPC shim and everything seems to work, but #18970 (comment)

I'm not sure whether it is related to this PR, maybe the same in production.

/hold

Since we need to align with Brad about caching. It seems there is another more explicit proposal, but I'm not entirely sure.

@svenefftinge
Copy link
Member Author

I seen following error in console logs, not sure how to reproduce (it was with gRPC on)

I added checks and error logs, and this reveals that we actually stored messages as json before already just didn't notice. 🙈

@svenefftinge svenefftinge force-pushed the se/use-org-apiv2 branch 3 times, most recently from 36ca0a1 to 3b5e424 Compare November 3, 2023 18:34
@svenefftinge
Copy link
Member Author

svenefftinge commented Nov 5, 2023

/gh run recreate-vm

Comment triggered a workflow run

Started workflow run: 6759639337

  • recreate_vm: true

@svenefftinge svenefftinge force-pushed the se/use-org-apiv2 branch 2 times, most recently from 8f88790 to 18d47f4 Compare November 6, 2023 07:46
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

everything seems to work, there are some inconsistency with out styles:

  • using plural in List instead of items
  • not returning full objects from Update

But I'm happy to reconsider styles now since these are first services.

@svenefftinge
Copy link
Member Author

/unhold

@roboquat roboquat merged commit f6bf401 into main Nov 6, 2023
15 checks passed
@roboquat roboquat deleted the se/use-org-apiv2 branch November 6, 2023 13:18
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.

5 participants