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

Forbid changing the job.server.run_mode after job.run #1157

Open
pmrv opened this issue Jul 7, 2023 · 2 comments
Open

Forbid changing the job.server.run_mode after job.run #1157

pmrv opened this issue Jul 7, 2023 · 2 comments

Comments

@pmrv
Copy link
Contributor

pmrv commented Jul 7, 2023

Over in #1155 we discussed that it's quite weird that we allow to change the run mode of a job after it has or while it is running. Refreshed and full of energy I went this morning to fix this---only to discover why we don't disallow this yet. Server doesn't have a back reference to the job and can therefor not check its status in the run_mode setter. But actually you don't really want to change anything about the server object after the job is run, so alternatively we could add a freeze method to the server, that the job calls on run, after which no attribute modifications are allowed any more. Special considerations would have to be taken for the future object of #1155, because that one we do want to change after the fact, but that's ok imo. Thoughts?

@jan-janssen
Copy link
Member

I like the idea, in principle every object attached to the job should have this option, as well as an unfreeze option when somebody copies only the input of a given job to run it again.

@pmrv
Copy link
Contributor Author

pmrv commented Jul 10, 2023

I've started working on this in #1162.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants