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

2️⃣ Drop Personal organizations #1452

Merged
merged 1 commit into from
Feb 28, 2023
Merged

2️⃣ Drop Personal organizations #1452

merged 1 commit into from
Feb 28, 2023

Conversation

dotansimha
Copy link
Collaborator

@dotansimha dotansimha commented Feb 22, 2023

Step 2 of #1450

Closes #98

TODO

  • Add a migration to delete all empty Personal organizations
  • Delete column organizations.type and delete PG type organization_type
  • Delete OrganizationType from GraphQL API
  • Adjust all GraphQL queries and mutations
  • Update admin panel ("Manage Instance")
  • Update web app
  • Make sure migration creates the correct permissions for organizations that previously marked as Personal
  • Adjust integration tests if needed
  • Add setup for migrations testing + CI

Screenshots

image

image

@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2023

⚠️ No Changeset found

Latest commit: ae82256

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2023

💻 Website Preview

The latest changes are available as preview in: https://4ac03885.hive-landing-page.pages.dev

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2023

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 450.87 KB (🟢 -599 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Eighteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/ 6.21 KB 457.08 KB 130.59% (+/- <0.01%)
/[orgId] 30.18 KB 481.06 KB 137.44% (🟢 -0.02%)
/[orgId]/[projectId] 29.93 KB 480.8 KB 137.37% (🟢 -0.01%)
/[orgId]/[projectId]/[targetId] 31.07 KB 481.94 KB 137.70% (🟢 -0.02%)
/[orgId]/[projectId]/[targetId]/explorer 44.06 KB 494.93 KB 141.41% (🟢 -0.02%)
/[orgId]/[projectId]/[targetId]/explorer/[typename] 44.72 KB 495.59 KB 141.60% (🟢 -0.02%)
/[orgId]/[projectId]/[targetId]/history 32.27 KB 483.15 KB 138.04% (🟢 -0.01%)
/[orgId]/[projectId]/[targetId]/history/[versionId] 32.34 KB 483.21 KB 138.06% (🟢 -0.01%)
/[orgId]/[projectId]/[targetId]/laboratory 412.61 KB 863.48 KB 246.71% (🟢 -0.02%)
/[orgId]/[projectId]/[targetId]/operations 383.41 KB 834.28 KB 238.37% (🟢 -0.02%)
/[orgId]/[projectId]/[targetId]/settings 36.41 KB 487.28 KB 139.22% (🟢 -0.01%)
/[orgId]/[projectId]/view/alerts 30.29 KB 481.16 KB 137.47% (🟢 -0.01%)
/[orgId]/[projectId]/view/settings 32.61 KB 483.48 KB 138.14% (🟢 -0.02%)
/[orgId]/view/members 31.46 KB 482.34 KB 137.81% (🟢 -0.03%)
/[orgId]/view/settings 33.79 KB 484.66 KB 138.47% (🟢 -0.02%)
/[orgId]/view/subscription 33.02 KB 483.9 KB 138.26% (🟢 -0.02%)
/[orgId]/view/subscription/manage 32.48 KB 483.35 KB 138.10% (🟢 -0.01%)
/manage 355.63 KB 806.5 KB 230.43% (🟢 -0.04%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2023

🐋 This PR was built and pushed to the following Docker images (tag: ae822562af85837cfb4d96381a6a0561c987a2c4):

Docker Bake metadata
{
"app": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:IMAGE_DESCRIPTION": "The app of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/app",
      "build-arg:PORT": "3000",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "app.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:IMAGE_DESCRIPTION": "The app of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/app",
      "build-arg:PORT": "3000",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "app.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:a560f34a28e6415a50b340d78110eb47d6f9f2cf43ac441e8b29179652232a85",
    "size": 1609
  },
  "containerimage.digest": "sha256:a560f34a28e6415a50b340d78110eb47d6f9f2cf43ac441e8b29179652232a85",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/app:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/app:refactor_org_step_2"
},
"composition-federation-2": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "Federation 2 Composition Service for GraphQL Hive.",
      "build-arg:IMAGE_TITLE": "graphql-hive/composition-federation-2",
      "build-arg:PORT": "3069",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "Federation 2 Composition Service for GraphQL Hive.",
      "build-arg:IMAGE_TITLE": "graphql-hive/composition-federation-2",
      "build-arg:PORT": "3069",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:ffd6de7eba880704ed635ecf667ec569ec6e316e70575f88eb79b412a8e8555b",
    "size": 1609
  },
  "containerimage.digest": "sha256:ffd6de7eba880704ed635ecf667ec569ec6e316e70575f88eb79b412a8e8555b",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:refactor_org_step_2"
},
"docs": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:IMAGE_DESCRIPTION": "The docs of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/docs",
      "build-arg:PORT": "3000",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "app.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:IMAGE_DESCRIPTION": "The docs of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/docs",
      "build-arg:PORT": "3000",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "app.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:c45d9c5eee372579af111cd5f43fcfe0d85fa89f501fb61ae3fad65f2e4bde26",
    "size": 1609
  },
  "containerimage.digest": "sha256:c45d9c5eee372579af111cd5f43fcfe0d85fa89f501fb61ae3fad65f2e4bde26",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/docs:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/docs:refactor_org_step_2"
},
"emails": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The emails service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/emails",
      "build-arg:PORT": "3006",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The emails service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/emails",
      "build-arg:PORT": "3006",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:127964c2683ba56b8acd5e428045fe35add50ec1fa4b214d17f4dccb807225cb",
    "size": 1609
  },
  "containerimage.digest": "sha256:127964c2683ba56b8acd5e428045fe35add50ec1fa4b214d17f4dccb807225cb",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/emails:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/emails:refactor_org_step_2"
},
"rate-limit": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The rate limit service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/rate-limit",
      "build-arg:PORT": "3009",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The rate limit service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/rate-limit",
      "build-arg:PORT": "3009",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:aa58e54f9e5d7f6cfe008c632265a4e2a19948904bb18c5864691d0bc20a7689",
    "size": 1609
  },
  "containerimage.digest": "sha256:aa58e54f9e5d7f6cfe008c632265a4e2a19948904bb18c5864691d0bc20a7689",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/rate-limit:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/rate-limit:refactor_org_step_2"
},
"schema": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The schema service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/rate-limit",
      "build-arg:PORT": "3002",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The schema service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/rate-limit",
      "build-arg:PORT": "3002",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:c5c974f6892de2e2618d08c4c703dd6c05e53ccf8aff3a68a0cfb09197b7ba27",
    "size": 1609
  },
  "containerimage.digest": "sha256:c5c974f6892de2e2618d08c4c703dd6c05e53ccf8aff3a68a0cfb09197b7ba27",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/schema:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/schema:refactor_org_step_2"
},
"server": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The server service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/server",
      "build-arg:PORT": "3001",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The server service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/server",
      "build-arg:PORT": "3001",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:9dcf604a5fcc2180963efad512c2fa43084ac6f60ad5d70e20f1d30ee0e8f8f5",
    "size": 1609
  },
  "containerimage.digest": "sha256:9dcf604a5fcc2180963efad512c2fa43084ac6f60ad5d70e20f1d30ee0e8f8f5",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/server:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/server:refactor_org_step_2"
},
"storage": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:IMAGE_DESCRIPTION": "The migrations service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/storage",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "migrations.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:IMAGE_DESCRIPTION": "The migrations service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/storage",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "migrations.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:c7bd211696aff7509e1ac58c76dd3203cb8d16c03002438d82d5b854052cff00",
    "size": 1609
  },
  "containerimage.digest": "sha256:c7bd211696aff7509e1ac58c76dd3203cb8d16c03002438d82d5b854052cff00",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/storage:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/storage:refactor_org_step_2"
},
"stripe-billing": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The stripe billing service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/stripe-billing",
      "build-arg:PORT": "3010",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The stripe billing service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/stripe-billing",
      "build-arg:PORT": "3010",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:bc683dec2df2d1ecfd7f0a55da184b86df47e14d2e4474c52975a98b4f4459c2",
    "size": 1609
  },
  "containerimage.digest": "sha256:bc683dec2df2d1ecfd7f0a55da184b86df47e14d2e4474c52975a98b4f4459c2",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/stripe-billing:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/stripe-billing:refactor_org_step_2"
},
"tokens": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The tokens service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/tokens",
      "build-arg:PORT": "3003",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The tokens service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/tokens",
      "build-arg:PORT": "3003",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:a67554609b67ec64ab2b0ef680f7408e234d8ffa935e75321e52e892e3220c19",
    "size": 1609
  },
  "containerimage.digest": "sha256:a67554609b67ec64ab2b0ef680f7408e234d8ffa935e75321e52e892e3220c19",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/tokens:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/tokens:refactor_org_step_2"
},
"usage": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The usage ingestor service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/usage",
      "build-arg:PORT": "3006",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The usage ingestor service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/usage",
      "build-arg:PORT": "3006",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:c61c671631d1cd3f62ed2b020119cb63b3fb5bfa4a0e2585ce9a3bc690bd280c",
    "size": 1609
  },
  "containerimage.digest": "sha256:c61c671631d1cd3f62ed2b020119cb63b3fb5bfa4a0e2585ce9a3bc690bd280c",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/usage:refactor_org_step_2"
},
"usage-estimator": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The usage estimator service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/usage-estimator",
      "build-arg:PORT": "3008",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The usage estimator service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/usage-estimator",
      "build-arg:PORT": "3008",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:e56c5329d3c430b6ce756a47992c526f7ef89d9fdede80af2ff62319ddb76ffd",
    "size": 1609
  },
  "containerimage.digest": "sha256:e56c5329d3c430b6ce756a47992c526f7ef89d9fdede80af2ff62319ddb76ffd",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-estimator:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/usage-estimator:refactor_org_step_2"
},
"usage-ingestor": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The usage ingestor service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/usage-ingestor",
      "build-arg:PORT": "3007",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The usage ingestor service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/usage-ingestor",
      "build-arg:PORT": "3007",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:7f5022ad564bbb57fcd85668231bc28d60206c14737f40de59ab19d7f0ca454d",
    "size": 1609
  },
  "containerimage.digest": "sha256:7f5022ad564bbb57fcd85668231bc28d60206c14737f40de59ab19d7f0ca454d",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:refactor_org_step_2"
},
"webhooks": {
  "containerimage.buildinfo/linux/amd64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The webhooks ingestor service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/webhooks",
      "build-arg:PORT": "3005",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.buildinfo/linux/arm64": {
    "frontend": "dockerfile.v0",
    "attrs": {
      "build-arg:HEALTHCHECK_CMD": "wget --spider -q http://127.0.0.1:${PORT}/_readiness",
      "build-arg:IMAGE_DESCRIPTION": "The webhooks ingestor service of the GraphQL Hive project.",
      "build-arg:IMAGE_TITLE": "graphql-hive/webhooks",
      "build-arg:PORT": "3005",
      "build-arg:RELEASE": "ae822562af85837cfb4d96381a6a0561c987a2c4",
      "filename": "services.dockerfile",
      "vcs:revision": "142a0d778f3b6bce3ed0621186966c3b2953af9e-dirty",
      "vcs:source": "https://github.com/kamilkisiela/graphql-hive"
    },
    "sources": [
      {
        "type": "docker-image",
        "ref": "docker.io/library/node:18.13.0-slim",
        "pin": "sha256:bc946484118735406562f17c57ddf5fded436e175b6a51f827aa6540ba1e13de"
      }
    ]
  },
  "containerimage.descriptor": {
    "mediaType": "application/vnd.oci.image.index.v1+json",
    "digest": "sha256:8437fb1feea6ad2834af9f24fadfe16164925e4f0332b359c44f2131bca6e533",
    "size": 1609
  },
  "containerimage.digest": "sha256:8437fb1feea6ad2834af9f24fadfe16164925e4f0332b359c44f2131bca6e533",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/webhooks:ae822562af85837cfb4d96381a6a0561c987a2c4,ghcr.io/kamilkisiela/graphql-hive/webhooks:refactor_org_step_2"
}
}

@dotansimha dotansimha marked this pull request as ready for review February 22, 2023 10:53
codegen.cjs Show resolved Hide resolved
turbo.json Outdated Show resolved Hide resolved
Base automatically changed from org-type-refactor to main February 22, 2023 12:03
@dotansimha dotansimha force-pushed the refactor-org-step-2 branch 4 times, most recently from 8432143 to f40f93c Compare February 26, 2023 09:38
@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2023

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/cli 0.20.3-alpha-20230228074029-ae822562 npm ↗︎ unpkg ↗︎

Copy link
Collaborator

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

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

Okay but quoting myself from slack:

There will be a time-frame where the old app container might try to fetch organization.type `, but the column got already removed by the migration. The better approach here would be to first remove the non-null constraint via migration, then deploy server changes to no longer select/insert the type column; then do another deployment with a database migration that drops the column for sure.

Regarding the migrations, they are atm running in a transaction and blocking all other operations on the table. I think the migration that deletes the organizations could instead probably run outside a transaction and use single statements (per organization), instead of one big for all.

Not saying that we need to do it like this now. I just think at some point we need to do it like this, otherwise we cause downtime/degraded performance.

@dotansimha
Copy link
Collaborator Author

There will be a time-frame where the old app container might try to fetch organization.type `, but the column got already removed by the migration. The better approach here would be to first remove the non-null constraint via migration, then deploy server changes to no longer select/insert the type column; then do another deployment with a database migration that drops the column for sure.

Fully agree. And I think we are getting pretty close to this point.

Regarding the migrations, they are atm running in a transaction and blocking all other operations on the table. I think the migration that deletes the organizations could instead probably run outside a transaction and use single statements (per organization), instead of one big for all.
Not saying that we need to do it like this now. I just think at some point we need to do it like this, otherwise we cause downtime/degraded performance.

Yeah, that's why I tried to optimize the SQL statement we had there. It seems better and faster now. We can use the stats from staging and see if it makes sense, or if an additional optimization (or, break to 2 parts) is needed.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2023

📚 Storybook Deployment

The latest changes are available as preview in: https://859667fc.hive-storybook.pages.dev

fixes

lint fix

remove unnecessary tests

fixes

fix case where we don't know at all what to do, but we do have orgs

added migration to delete everything related to personal orgs, and also delete unused orgs

remove everything related to personal org

fix migration

delete oopsi

added migrations testing

fix

better migration
@kamilkisiela kamilkisiela merged commit 627df54 into main Feb 28, 2023
@kamilkisiela kamilkisiela deleted the refactor-org-step-2 branch February 28, 2023 07:52
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.

Consider to drop the default personal organization
3 participants