Skip to content

Explicit --checkout/--no-checkout beats OPENFN_NO_CHECKOUT_AFTER_DEPLOY - #1589

Merged
josephjclark merged 2 commits into
release/nextfrom
ofn-4763-checkout-flag-precedence
Oct 16, 2026
Merged

josephjclark merged 2 commits into
release/nextfrom
ofn-4763-checkout-flag-precedence

Conversation

@midigofrank

Copy link
Copy Markdown
Contributor

Short Description

An explicit --checkout or --no-checkout on project deploy now overrides OPENFN_NO_CHECKOUT_AFTER_DEPLOY. The env var only sets the default.

Fixes OFN-4763

Implementation Details

  • Root cause: checkout had a yargs default: true, so ensure() couldn't tell an explicit --checkout from the default and set checkout = false whenever the env var was 'true'.
  • Removed the yargs default; ensure() resolves the value from the env var only when the flag wasn't passed.

QA Notes

  • New deploy-options.test.ts (5 cases, parsing the real command through yargs): env=true + --checkout failed before the fix; the rest lock in existing behaviour.
  • --help no longer shows [default: true] for --checkout; the description still says checkout is the default.

AI Usage

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

@josephjclark
josephjclark force-pushed the ofn-4763-checkout-flag-precedence branch from 0914f9e to 51191c3 Compare October 15, 2026 15:31
@josephjclark
josephjclark merged commit 1f74134 into release/next Oct 16, 2026
10 of 11 checks passed
@josephjclark
josephjclark deleted the ofn-4763-checkout-flag-precedence branch October 16, 2026 11:24
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Oct 16, 2026
josephjclark added a commit that referenced this pull request Oct 23, 2026
* Explicit --checkout/--no-checkout beats OPENFN_NO_CHECKOUT_AFTER_DEPLOY (#1589)

* fix(cli): explicit --checkout/--no-checkout beats OPENFN_NO_CHECKOUT_AFTER_DEPLOY

* update tests

---------

Co-authored-by: Joe Clark <jclark@openfn.org>

* Fix flaky tests maybe (#1591)

* run worker integratio n tests wuth clean new instances each time

* worker: add immediate destroy for unit tests

* Track workflow renames (#1596)

* deprecate the id field being written to workflow.yaml

* track workflow uuid in checkout.yaml

* track workflow UUIDs when loading from fs

* add helper to match workflows on merge

* hookup workflow tracking to deploy

* impove diff for users upon a workflow rename

* clarifying comments on test files

* couple of tests

* add more basic sync tests

* new tests

* restructure sync integration tests

* add step rename tests

* cli: use env var to skip no confirm

* refactor tests for cleaner commands#

* enable workflow tracking on rename

* new test

* Fix cross-project deploy: make the target match the local project (#1588)

* Fix cross-project deploy and add --remove-unmapped to project deploy

Deploying a workspace to a different project now treats every local
workflow as a merge candidate, instead of only those changed since the
workspace's own last sync. --remove-unmapped sends delete entries for
target workflows that don't exist locally.

* Mirror the local project when deploying to a different project

Drop --remove-unmapped: target-only workflows are removed by default when the
target UUID differs, and need --force when there is no confirmation prompt.

* variable rename

* new suite of cross-project deploy tests

---------

Co-authored-by: Joe Clark <jclark@openfn.org>

* fix(project): preserve workflows in bracketed paths (#1592)

* simplify test

* versions

---------

Co-authored-by: Midigo Frank <39288959+midigofrank@users.noreply.github.com>
Co-authored-by: Ky Jahn Smith <kyjahntsmith@gmail.com>
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