Skip to content

Set job status to dismissed in case the dismiss endpoint is called (close #174) - #175

Open
Florian-Katerndahl wants to merge 3 commits into
mainfrom
Florian-Katerndahl/174-fix-status-field-on-dismissal
Open

Set job status to dismissed in case the dismiss endpoint is called (close #174)#175
Florian-Katerndahl wants to merge 3 commits into
mainfrom
Florian-Katerndahl/174-fix-status-field-on-dismissal

Conversation

@Florian-Katerndahl

@Florian-Katerndahl Florian-Katerndahl commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

[Description of PR]

Explicitly set the status field for both the local backend and the airflow backend

Checklist (strike out non-applicable):

  • Changes documented in CHANGES.md
  • Related issue exists and is referred to in the PR description and CHANGES.md
    * [ ] Added docstrings and API docs for any new/modified user-facing classes and functions
    * [ ] Changes/features documented in docs/*
  • Unit-tests adapted/added for changes/features
  • Test coverage remains or increases (target 100%)

…lose #174)

- Explicitly set the `status` field for both the local backend
  and the airflow backend
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@forman forman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this!

Although it seems obviously correct, I don't agree with this implementation.

The job status should reflect the true status of the job and not the expected one. If a user calls "dismisses my job", this is a request. Whether it has really been dismissed is a status that must be determined. And that is what the old implementation did.

To fix this, we may wait for given timeout then get the current true state of a job and return it.

Also, I don't understand why unit tests are not applicable here! Please provide tests.

@Florian-Katerndahl

Copy link
Copy Markdown
Collaborator Author

Thanks for the feedback, I'll add tests for revised changes.

Regarding the actual status of the job: If I understand the Python documentation, there's no general way to cancel a future object without shutting down the *PoolExecutor. Thus, the solution might actually be to wait for the job to finish naturally but immediately delete the result as you suggest.

@forman

forman commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

@Florian-Katerndahl Once you've changed any code in this PR, please Convert to draft, then re-request a new review, work on it undtil CI is happy, and turn it back to Ready for review..

@Florian-Katerndahl
Florian-Katerndahl marked this pull request as draft July 24, 2026 14:11
@Florian-Katerndahl

Copy link
Copy Markdown
Collaborator Author

As discussed, the hard-coding of the job status remains; adapted the tests though

@Florian-Katerndahl
Florian-Katerndahl marked this pull request as ready for review July 28, 2026 14:50
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

Successfully merging this pull request may close these issues.

Dismissal of jobs should be reflected in the returned JobInfo object

2 participants