Skip to content

CLI: Deploy through v1 API with v2 spec#1465

Merged
josephjclark merged 5 commits into
release/nextfrom
deploy-v1-with-v2-spec
Jul 2, 2026
Merged

CLI: Deploy through v1 API with v2 spec#1465
josephjclark merged 5 commits into
release/nextfrom
deploy-v1-with-v2-spec

Conversation

@josephjclark

@josephjclark josephjclark commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Short Description

When using the v1 CLI deploy commands, add support for a v2 project file by converting it into a v1 spec file.

Fixes #1464

This includes a rather janky fix - because I thought a v1 spec file was just state minus UUIDS. But there's a bit more to it than that, so the code which converts a Project to v1 state need smore logic to generate v1 spec instead. Not nice. But I hope this is a temporary fix and it won't be around for long

QA Notes

I have run the following manual tests

  • Can deploy a v1 spec to lightning on main
  • Can deploy a v1 spec to lightning on portability branch
  • Can deploy a v2 spec to lightning on portability branch
  • Handles credentials

All for new projects and with the v1 command

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

@josephjclark josephjclark marked this pull request as ready for review June 25, 2026 10:35
@github-project-automation github-project-automation Bot moved this to New Issues in Core Jun 25, 2026

@brandonjackson brandonjackson left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎉

@josephjclark

josephjclark commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator Author

Ok, hit a problem which will need to be properly reflected in unit and integration tests. Because these should not be passing.

When converting the v2 project down to a v1 spec, we MUST exclude UUIDs. The Project converter will add them somewhere down the line but this invalidates assumptions in the v1 sync.

This should have been caught in a integration test: I'm going to add some validation to the mock API. So the plan is:

  1. Update lightning mock
  2. Integration test should fail
  3. Export a v2 project without UUIDs
  4. Add the no-uuid flag to the CLI

…tucture

* Add validation to mock provisioner

* experiment with using Project to generate a spec file from state

* format

* restore tests

* little style tweak

* remove state.json

* handle credentials properly in spec

* update tests

* mock: handle deleted edges

* fix tests

* correct project credential name

* one more test for luck

* one more test fix and log removal
@josephjclark josephjclark changed the base branch from main to release/next July 2, 2026 13:02
@josephjclark josephjclark merged commit 56da9b3 into release/next Jul 2, 2026
7 checks passed
@josephjclark josephjclark deleted the deploy-v1-with-v2-spec branch July 2, 2026 13:44
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Jul 2, 2026
josephjclark added a commit that referenced this pull request Jul 2, 2026
* CLI: Deploy through v1 API with v2 spec (#1465)

* convert v2 spec down to v1

* refactor to make a version-sniffing util

* integrate the new feature

* test

* Add special case for  to-app-state to convert a project to a v1 spec stucture

* Add validation to mock provisioner

* experiment with using Project to generate a spec file from state

* format

* restore tests

* little style tweak

* remove state.json

* handle credentials properly in spec

* update tests

* mock: handle deleted edges

* fix tests

* correct project credential name

* one more test for luck

* one more test fix and log removal

* tighten exec commands to prevent injection attacks (#1468)

* remove debug code

* cli: bump undici version (#1469)

* cli: bump undici version

* fix and changeset

* fix test

* format

* versions: cli@1.38.2 worker@1.27.1

* update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Enable deploy v1 to deploy a v2 spec file

3 participants