Skip to content

feat: new deploy diff#1352

Open
doc-han wants to merge 12 commits intomainfrom
diff-stuff
Open

feat: new deploy diff#1352
doc-han wants to merge 12 commits intomainfrom
diff-stuff

Conversation

@doc-han
Copy link
Copy Markdown
Collaborator

@doc-han doc-han commented Apr 2, 2026

Short Description

A one or two-sentence description of what this PR does.

Fixes #1182

Implementation Details

A more detailed breakdown of the changes, including motivations (if not provided in the issue).

QA Notes

List any considerations/cases/advice for testing/QA here.

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

Release branch checklist

Delete this section if this is not a release PR.

If this IS a release branch:

  • Run pnpm changeset version from root to bump versions
  • Run pnpm install
  • Commit the new version numbers
  • Run pnpm changeset tag to generate tags
  • Push tags git push --tags

Tags may need updating if commits come in after the tags are first generated.

@github-project-automation github-project-automation bot moved this to New Issues in Core Apr 2, 2026
@doc-han
Copy link
Copy Markdown
Collaborator Author

doc-han commented Apr 2, 2026

Issue I'm dealing with while doing manual testing. cc: @josephjclark
trying to get this resolved at the moment

Screenshot 2026-04-02 at 7 48 50 AM

@doc-han
Copy link
Copy Markdown
Collaborator Author

doc-han commented Apr 2, 2026

Issue I'm dealing with while doing manual testing. cc: @josephjclark trying to get this resolved at the moment

The fix for this bug I was facing was sitting all the base in https://github.com/OpenFn/kit/blob/main/packages/project/src/util/base-merge.ts
The call to assign over there was mutating the value of target in-place making it lose the methods on workflows.

@doc-han doc-han marked this pull request as ready for review April 7, 2026 10:45
@doc-han doc-han requested a review from josephjclark April 7, 2026 10:51
@josephjclark
Copy link
Copy Markdown
Collaborator

Issue: changing the id of a step results in this error:

[CLI] ✘ TypeError: Cannot read properties of undefined (reading 'name')
    at file:///home/joe/repo/openfn/kit/packages/project/dist/index.js:279:57
    at Array.map (<anonymous>)
    at generateHash (file:///home/joe/repo/openfn/kit/packages/project/dist/index.js:276:46)
    at Workflow.getVersionHash (file:///home/joe/repo/openfn/kit/packages/project/dist/index.js:462:12)
    at findLocallyChangedWorkflows (file:///home/joe/repo/openfn/kit/packages/cli/dist/process/runner.js:2277:35)
    at syncProjects (file:///home/joe/repo/openfn/kit/packages/cli/dist/process/runner.js:2412:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async handler (file:///home/joe/repo/openfn/kit/packages/cli/dist/process/runner.js:2507:24)
    at async parse (file:///home/joe/repo/openfn/kit/packages/cli/dist/process/runner.js:4126:12)

@josephjclark
Copy link
Copy Markdown
Collaborator

Issue: removing the configuration key doesn't seem to generate a diff (in the rich or the json one). But it should result in a change in the state.json right? I wonder if that's a wider bug

@josephjclark
Copy link
Copy Markdown
Collaborator

Issue: changes to edges don't seem to manifest in the rich diff (I do see them in JSON)

Copy link
Copy Markdown
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

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

Looks really cool!

I've tested around a bit and found some issues. But before we go too much further I'm not sure the architecture is right, and I'd like to dig into that a bit with you later

Comment thread packages/cli/src/projects/deploy.ts Outdated
Comment thread packages/cli/src/projects/deploy.ts Outdated
Comment thread packages/cli/src/projects/deploy.ts Outdated
Comment thread packages/cli/src/projects/deploy.ts Outdated
Comment thread packages/cli/src/projects/deploy.ts
Comment thread packages/cli/src/projects/deploy.ts Outdated
Comment thread packages/cli/src/projects/deploy.ts Outdated
@github-project-automation github-project-automation bot moved this from New Issues to In review in Core Apr 7, 2026
@doc-han
Copy link
Copy Markdown
Collaborator Author

doc-han commented Apr 13, 2026

Suggestion: When a user hits divergence because the project on remote changed but the locally pulled project has zero changes since last pulled. openfn project pull should automatically do a --force pull. The user shouldn't have to explicitly pass --force
cc: @josephjclark

@doc-han
Copy link
Copy Markdown
Collaborator Author

doc-han commented Apr 13, 2026

Issue: changing the id of a step results in this error:

[CLI] ✘ TypeError: Cannot read properties of undefined (reading 'name')
    at file:///home/joe/repo/openfn/kit/packages/project/dist/index.js:279:57
    at Array.map (<anonymous>)
    at generateHash (file:///home/joe/repo/openfn/kit/packages/project/dist/index.js:276:46)
    at Workflow.getVersionHash (file:///home/joe/repo/openfn/kit/packages/project/dist/index.js:462:12)
    at findLocallyChangedWorkflows (file:///home/joe/repo/openfn/kit/packages/cli/dist/process/runner.js:2277:35)
    at syncProjects (file:///home/joe/repo/openfn/kit/packages/cli/dist/process/runner.js:2412:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async handler (file:///home/joe/repo/openfn/kit/packages/cli/dist/process/runner.js:2507:24)
    at async parse (file:///home/joe/repo/openfn/kit/packages/cli/dist/process/runner.js:4126:12)

This has been resolved. It happens when you change the id of a job but then didn't do same for all edges referencing it. The error has been updated to print out a bit more meaningful message.

@doc-han doc-han requested a review from josephjclark April 13, 2026 08:12
@doc-han
Copy link
Copy Markdown
Collaborator Author

doc-han commented Apr 13, 2026

I've done several manual testing on this and it works fine.
This morning I added a change which shows what changes for an edge.

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

new deploy diff

3 participants