gush icon indicating copy to clipboard operation
gush copied to clipboard

Fix CLI to display removed/renamed jobs

Open suonlight opened this issue 6 years ago • 3 comments

Summary

When we remove the job Jobs::SayHello, but the job is still persisted on Redis. The CLI list/show will raise an error. This PR is to fix this error which allows the CLI to display removed/renamed jobs.

Before

❯ ./bin/gush show <workflow-id>
~/.asdf/installs/ruby/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/inflector/methods.rb:285:in `const_get': uninitialized constant Jobs::SayHello (NameError)

After

[✓] Removed - Jobs::SayHello|059349f6-5629-4f93-83bb-db52659b9b75
[✓] Removed - Jobs::SayHello|6343f0ab-a295-4a5b-b48c-96660e5691c2
[✓] Removed - Jobs::SayHello|6874b417-ee47-4701-8b5e-d076624b05ad
[✓] Removed - Jobs::SayHello|fddd49bd-984a-4c7c-b31c-74676fd65877
[✓] Removed - Jobs::SayHello|fa59fc43-da22-483b-84f5-f7f1c34bf7e8
[✓] Removed - Jobs::SayHello|df8dc75d-4513-4687-a520-e2a572ba2a01
[✓] Removed - Jobs::SayHello|82cc8060-d31b-471d-9a12-6e6e092f23e3
[✓] Removed - Jobs::SayHello|12f495c3-0f8d-458e-af32-c392b6a9b3ef
[✓] Removed - Jobs::SayHello|fba46058-d133-424d-8514-d4bfe02486f0
[✓] Removed - Jobs::SayHello|c9ebae45-077f-4548-944f-49d17c88637c

suonlight avatar Oct 13 '19 07:10 suonlight

Should we bump the patch version for this?

thukim avatar Oct 13 '19 07:10 thukim

@thukim: I think @pokonski will review the PR and bump version later.

suonlight avatar Oct 13 '19 07:10 suonlight

Is the use case here when you change the structure of the workflow and stop triggering one of the jobs? I think the error is a good indication something is wrong - why is the job gone when you still have workflows relying on it?

pokonski avatar Sep 19 '22 07:09 pokonski