-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add button to set failed job to pending #8377
base: master
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThis pull request updates the changelog with various feature additions, textual corrections, bug fixes, and behavior improvements across the system. It adds a new job resume functionality that enables super-users to resume failed jobs. The backend (controller, routes) and frontend (API and job list view) have been updated to support this feature, ensuring that only authorized users can perform the operation. Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
CHANGELOG.unreleased.md (1)
19-19
: New Feature: Resume Failed Jobs for Super-UsersThe changelog correctly reflects the new feature allowing super-users to resume failed jobs. Please verify that the backend and frontend behavior (i.e., whether the job state transitions to "PENDING" or "RUNNING") is clearly defined in the documentation and aligns with the intended functionality as discussed in PR [#8377].
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
CHANGELOG.unreleased.md
(1 hunks)app/controllers/JobController.scala
(3 hunks)conf/webknossos.latest.routes
(1 hunks)frontend/javascripts/admin/api/jobs.ts
(1 hunks)frontend/javascripts/admin/job/job_list_view.tsx
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: circleci_build
🔇 Additional comments (8)
frontend/javascripts/admin/api/jobs.ts (1)
77-81
: LGTM! The implementation follows the established pattern.The
resumeJob
function is well-implemented, following the same pattern as other job-related functions in the file, making it consistent and maintainable.frontend/javascripts/admin/job/job_list_view.tsx (3)
10-10
: LGTM! Icon import follows the established pattern.The PlayCircleOutlined icon import is correctly added, maintaining consistency with other icon imports.
139-139
: LGTM! Super user check is properly implemented.The Redux selector is correctly used to determine if the current user is a super user, ensuring proper access control.
305-316
: LGTM! Resume action follows the same pattern as cancel action.The resume functionality is well-implemented:
- Correctly checks for failed job state and super user status
- Uses AsyncLink for handling the action
- Follows the same pattern as the cancel action
- Updates the job list after resuming
app/controllers/JobController.scala (2)
53-67
: LGTM! UserService is properly injected.The UserService is correctly added to the constructor using dependency injection, following the established pattern.
115-123
: LGTM! Resume method is secure and follows established patterns.The implementation:
- Properly checks if jobs feature is enabled
- Verifies super user permissions with proper error handling
- Updates job state using existing DAO methods
- Returns consistent response format
conf/webknossos.latest.routes (1)
271-271
: LGTM! Route follows RESTful conventions.The new route is well-defined:
- Uses appropriate HTTP method (PATCH) for state transition
- Follows the same pattern as other job routes
- Is correctly placed in the jobs section
CHANGELOG.unreleased.md (1)
18-18
: Accessibility Update: Measurement Tools EnhancementThis changelog entry now notes that measurement tools are accessible when viewing datasets outside an annotation. Ensure that this entry remains consistent with the UI changes and accessibility guidelines applied in [#8334].
URL of deployed dev instance (used for testing):
Steps to test:
TODOs:
Issues:
(Please delete unneeded items, merge only when none are left open)
Needs datastore update after deployment