Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deltas: updated delta issued after pruned delta #393

Closed
oliver-sanders opened this issue Oct 27, 2022 · 3 comments · Fixed by #394
Closed

deltas: updated delta issued after pruned delta #393

oliver-sanders opened this issue Oct 27, 2022 · 3 comments · Fixed by #394
Assignees
Labels
bug Something isn't working
Milestone

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Oct 27, 2022

When a workflow is removed we would expect a single pruned delta with the ID of the workflow.

  • pruned(id)

However, we currently get two deltas:

  • updated(id), pruned(id)
  • updated(id)

The first delta contains an update for the workflow which is erroneous in this case as nothing should have changed in the workflow data, however this update is probably harmless (as we apply updated before pruned).

The second delta is more of a problem as it contains updates for a workflow which no longer exists.

This is a major problem for cylc/cylc-ui#1108 which avoids issues like cylc/cylc-ui#903 by treating added & updated deltas as the same, inserting any missing nodes in the process.

Steps to reproduce:

Open GraphiQL to the following subscription:

subscription {
  deltas {
    added {
      workflow {
        id
      }
    }
    updated {
      workflow {
        id
      }
    }
    pruned {
      workflow
    }
  }
}

Install a workflow (I'm using cp rather than cylc install to reduce the number of moving parts and ensure the addition is atomic):

cp -r ~/cylc-src/my-workflow ~/cylc-run

You should get an added delta for the workflow.

Remove the workflow (I'm using rm rather than cylc clean to reduce the number of moving parts and ensure the removal is atomic):

rm -r ~/cylc-run/my-workflow

Evidence:

subs

Screenshot 2022-10-27 at 10 53 06

@oliver-sanders oliver-sanders added the bug Something isn't working label Oct 27, 2022
@oliver-sanders oliver-sanders added this to the 1.1.1 milestone Oct 27, 2022
@hjoliver
Copy link
Member

Ping @dwsutherland !

@dwsutherland
Copy link
Member

Unregister was also disconnecting with additional contact update (and hence delta).. #394

@hjoliver
Copy link
Member

hjoliver commented Jan 9, 2023

Closed by #394

@hjoliver hjoliver closed this as completed Jan 9, 2023
@MetRonnie MetRonnie modified the milestones: 1.1.1, 1.2.0 Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants