[PR #4418] [management] Implement Job API with Validation, Persistence, and Bundle Job Support #4239

Closed
opened 2025-11-20 08:08:00 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/4418

State: closed
Merged: Yes


Describe your changes

Implemented the API for job operations, including creating new jobs, fetching jobs by peer, and fetching individual job details. Added support for bundle/debug jobs with fully validated parameters (e.g., bundle_for_time, log_file_count, anonymize) and ensured that pending jobs are handled correctly.

Temporary permissions are based on the existing “delete peers” permission to allow job operations, with a TODO to implement a dedicated permission for creating and fetching jobs. Also added TODOs to integrate with the job channel once it is ready #4367

All job data is persisted in the database, including account ID, peer ID, job type, status, parameters, and results. Jobs are validated before creation to prevent invalid payloads.

Stack

  • feature/remote-debug - ⚠️ No PR associated with branch

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

**Original Pull Request:** https://github.com/netbirdio/netbird/pull/4418 **State:** closed **Merged:** Yes --- ## Describe your changes Implemented the API for job operations, including creating new jobs, fetching jobs by peer, and fetching individual job details. Added support for `bundle/debug` jobs with fully validated parameters (e.g., `bundle_for_time`, `log_file_count`, `anonymize`) and ensured that pending jobs are handled correctly. Temporary permissions are based on the existing “delete peers” permission to allow job operations, with a TODO to implement a dedicated permission for creating and fetching jobs. Also added TODOs to integrate with the job channel once it is ready #4367 All job data is persisted in the database, including account ID, peer ID, job type, status, parameters, and results. Jobs are validated before creation to prevent invalid payloads. ## Issue ticket number and link #4354 ## Stack - `feature/remote-debug` - :warning: No PR associated with branch <!-- branch-stack --> - \#4418 :point\_left: ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from <https://github.com/netbirdio/docs> here: <https://github.com/netbirdio/docs/pull/>\_\_
saavagebueno added the pull-request label 2025-11-20 08:08:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#4239