Skip to content

v2 portability: restore legacy provisioner#4743

Merged
josephjclark merged 4 commits into
v2-sync-finalizationfrom
v2-with-legacy
May 12, 2026
Merged

v2 portability: restore legacy provisioner#4743
josephjclark merged 4 commits into
v2-sync-finalizationfrom
v2-with-legacy

Conversation

@josephjclark
Copy link
Copy Markdown
Collaborator

@josephjclark josephjclark commented May 12, 2026

@midigofrank's eagle eyes showed me something I had missed: the portability updates should not have removed support for v1 formats from the provisioner API.

This PR restores the v1 emmiter and provisioner, but leaves the UI stuff on v2.

Description

  • Restored the v1 emitter in lib/lightning/export_utils.ex (verbatim from main).
  • Routed by surface, not by a global default. Projects.export_project/4 now takes a required positional format argument (:v1 | :v2, no default) and dispatches accordingly:
    -DownloadsController ("Export project as YAML" download) → :v2
    • ProvisioningController.show_yaml (GET /api/provision/yaml, used by openfn pull and GitHub sync) → :v1, hard-coded - no version parameter is exposed on the API.
  • The frontend "View workflow as code" panel stays on v2 (separate JS code path, untouched).
  • The provisioner's POST /api/provision is unaffected — it has always accepted JSON, not YAML.
  • Forced v2 yamls to use lower-case id names

QA Notes:

  • ✅ Can pull with legacy cli openfn pull <uuid>
  • ✅ Can edit and push with legacy cli openfn deploy <uuid>
  • ✅ Exported workflows can be executed through CLI
  • ✅ Exported projects can be checked out with CLI (just pass the file name)
  • ✅ v1 app workflows can be imported into this branch
  • ✅ v2 app workflows can be imported into this branch

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

@github-project-automation github-project-automation Bot moved this to New Issues in Core May 12, 2026
@github-actions
Copy link
Copy Markdown

Security Review

⚠️ Review did not complete. See the workflow run.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 96.68874% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.87%. Comparing base (164c0bf) to head (d95df3e).

Files with missing lines Patch % Lines
lib/lightning/export_utils.ex 96.55% 5 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##           v2-sync-finalization    #4743      +/-   ##
========================================================
- Coverage                 89.88%   89.87%   -0.01%     
========================================================
  Files                       444      445       +1     
  Lines                     22112    22259     +147     
========================================================
+ Hits                      19876    20006     +130     
- Misses                     2236     2253      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@josephjclark josephjclark requested a review from midigofrank May 12, 2026 15:19
@josephjclark josephjclark merged commit f5078bd into v2-sync-finalization May 12, 2026
8 of 9 checks passed
@josephjclark josephjclark deleted the v2-with-legacy branch May 12, 2026 16:38
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core May 12, 2026
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.

2 participants