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

task_events_mgr: handle missing job config #6326

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Aug 23, 2024

The solution is far from ideal, the job config info has been lost for starters, however, I think that is non-functional at this stage?

@hjoliver, any better ideas?

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@oliver-sanders oliver-sanders added the bug Something is wrong :( label Aug 23, 2024
@oliver-sanders oliver-sanders added this to the 8.3.4 milestone Aug 23, 2024
@oliver-sanders oliver-sanders self-assigned this Aug 23, 2024
@oliver-sanders oliver-sanders modified the milestones: 8.3.4, 8.3.5 Sep 11, 2024
@oliver-sanders oliver-sanders mentioned this pull request Sep 18, 2024
8 tasks
@oliver-sanders oliver-sanders modified the milestones: 8.3.5, 8.3.6 Oct 4, 2024
@oliver-sanders oliver-sanders modified the milestones: 8.3.6, 8.3.7 Oct 18, 2024
@oliver-sanders
Copy link
Member Author

oliver-sanders commented Oct 22, 2024

This bug has hit again raising the pressure on this one.

@hjoliver, this itask.jobs list seems a bit dodgy, we just pick the last item off the list ([-1]) and hope it's the right one.

Ideally, we would probably have Job objects to match Task(Proxy) objects and a strict mapping between them which would allow us to move some job-specific config (e.g. platform, run_mode, etc) out of TaskProxy (where is doesn't belong as job submissions of the same task may have different values) into the Job config. Perfectly possible, however, this would require a reasonably large refactor which isn't something we have time for at present.

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

I think your fix is good.

I wonder if, as a follow-up, we should put some checks in place to ensure that all expected critical config exists in n=0 task loaded for a restart? (And remove this change once that's done.)

cylc/flow/task_events_mgr.py Outdated Show resolved Hide resolved
@hjoliver
Copy link
Member

Ideally, we would probably have Job objects to match Task(Proxy) objects and a strict mapping between them which would allow us to move some job-specific config (e.g. platform, run_mode, etc) out of TaskProxy (where is doesn't belong as job submissions of the same task may have different values) into the Job config. Perfectly possible, however, this would require a reasonably large refactor which isn't something we have time for at present.

Sensible, but I agree it might not be a small job - post an issue?

@oliver-sanders
Copy link
Member Author

Definitely a "non-small" job!

I wonder if, as a follow-up, we should put some checks in place to ensure that all expected critical config exists in n=0 task loaded for a restart?

I think what's happened here is that itask.jobs was non-critical, once, but has started to be used because the information is hard to get from elsewhere.

* Closes cylc#6314
* There are niche situations where the job is not stored in
  "TaskProxy.jobs".
* This handles the situation as gracefully as we are able to.
@oliver-sanders
Copy link
Member Author

Sensible, but I agree it might not be a small job - post an issue?

#6442

@oliver-sanders oliver-sanders marked this pull request as ready for review October 24, 2024 15:14
@oliver-sanders oliver-sanders modified the milestones: 8.3.7, 8.3.6 Oct 24, 2024
@wxtim wxtim merged commit 41e3bd8 into cylc:8.3.x Oct 25, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging this pull request may close these issues.

polling/set: submitted task cannot be set to succeeded
3 participants