Skip to content

Add cloud storage ids for projects#10808

Merged
lee-at-zoo-corp merged 1 commit intomainfrom
push-nrzrlxzxrtzm
Apr 9, 2026
Merged

Add cloud storage ids for projects#10808
lee-at-zoo-corp merged 1 commit intomainfrom
push-nrzrlxzxrtzm

Conversation

@iterion
Copy link
Copy Markdown
Contributor

@iterion iterion commented Apr 3, 2026

If we upload the KCL, we want to keep track of that so we can easily update the project again in the future.

What is getting added?

To account for our internal usage of multiple environments, we track cloud project id per environment:

[cloud."zoo.dev"]
project_id = "<uuid>"

[cloud."dev.zoo.dev"]
project_id = "<uuid>"

Most folks will only ever interact with one environment, but for us, that's a pretty common use case. Because of this, we want to make sure that our way of working is not impacted, insofar as we can upload/download from any environment.

Why not reuse meta.id?

meta.id is a locally generated id and it serves as a good artifact of that local or shared lineage. None of our APIs currently accept customer generated ids, and we do that so the API remains the source of truth. Because these are IDs in our database it should be in charge of issuing valid values.

For now, we accept that this could lead to some drift between environments.

Not in scope for this PR

  • automatic reconciliation between environments
  • automatic merge behavior when the same local meta.id appears in multiple places
  • sample upload to projects

Expected workflow from ZDS/CLI

flowchart TD
      subgraph ZDS[ZDS]
          A[User clicks Share / Upload]
          B[Read local project.toml]
          C[Determine active API environment]
          D{cloud.env.project_id present?}
          E[Choose Create request]
          F[Choose Update request]
          G[Write cloud.env.project_id to project.toml]
          H[Leave other cloud.other-env bindings unchanged]
      end

      subgraph API[API]
          I[Receive create request]
          J[Upload current project files]
          K[Create DB record in active environment]
          L[Return success + remote project_id]

          M[Receive update request]
          N[Upload current project files]
          O[Update DB record for existing remote project_id]
          P[Return success]
      end

      A --> B
      B --> C
      C --> D

      D -- No --> E
      E --> I
      I --> J
      J --> K
      K --> L
      L --> G
      G --> H

      D -- Yes --> F
      F --> M
      M --> N
      N --> O
      O --> P
      P --> H
Loading

Relates to https://github.com/KittyCAD/roadmap/issues/296
Prereq for #10903

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modeling-app Ready Ready Preview, Comment Apr 9, 2026 1:31pm

Request Review

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 3, 2026

Merging this PR will not alter performance

✅ 167 untouched benchmarks
⏩ 93 skipped benchmarks1


Comparing push-nrzrlxzxrtzm (e24228a) with main (78ae4c6)

Open in CodSpeed

Footnotes

  1. 93 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@iterion iterion force-pushed the push-nrzrlxzxrtzm branch 3 times, most recently from 683de08 to ea91745 Compare April 8, 2026 12:08
@iterion iterion force-pushed the push-nrzrlxzxrtzm branch from ea91745 to 39c1e2e Compare April 8, 2026 12:27
@iterion iterion marked this pull request as ready for review April 8, 2026 12:36
@iterion iterion requested a review from a team as a code owner April 8, 2026 12:36
@iterion iterion force-pushed the push-nrzrlxzxrtzm branch from 39c1e2e to 1e6930b Compare April 8, 2026 13:56
@iterion iterion force-pushed the push-nrzrlxzxrtzm branch from 1e6930b to 30ad336 Compare April 8, 2026 15:54
@jacebrowning jacebrowning marked this pull request as draft April 8, 2026 16:44
@iterion iterion force-pushed the push-nrzrlxzxrtzm branch from 30ad336 to baea5a4 Compare April 8, 2026 17:05
@iterion iterion force-pushed the push-nrzrlxzxrtzm branch from baea5a4 to 10c1acb Compare April 8, 2026 18:11
@iterion iterion force-pushed the push-nrzrlxzxrtzm branch from 10c1acb to 92544c1 Compare April 9, 2026 12:05
@iterion iterion marked this pull request as ready for review April 9, 2026 13:00
```toml
[settings.app]
# Set the appearance of the application
name = "My Awesome Project"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This never existed in the schema, so I'm not sure where it's coming from. This came from regenerating docs locally.

If we upload the KCL, we want to keep track of that so we can easily
update the project again in the future.

Not 100% dedicated to the names here, nothing concrete has landed so we
can change it.
Copy link
Copy Markdown
Contributor

@lee-at-zoo-corp lee-at-zoo-corp left a comment

Choose a reason for hiding this comment

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

automatic merge behavior when the same local meta.id appears in multiple places

Maybe even preferable to never do it, since meta.id is user controlled!

@lee-at-zoo-corp lee-at-zoo-corp merged commit 9b12796 into main Apr 9, 2026
99 of 103 checks passed
@lee-at-zoo-corp lee-at-zoo-corp deleted the push-nrzrlxzxrtzm branch April 9, 2026 15:11
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