-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add REST API tests for /requests API && test both versions of the exp…
…ort API (#8216) This PR fixes the following issues: - [export API v1] do not reinitialize dataset export process when downloading a result file if a resource (project|task|job) has been updated since the first initialized export request - [export API v1] return `rq_id` for all requests with 202 status code (not only for initialization requests) - [requests API] Fixed filtering by format && added resource to allowed filters REST API tests updates: - Added tests to check requests filtration using simple filters - Added tests to check specific requests retrieving - Updated all tests that export project|task|job datasets|annotations|backups: - to test both API versions (including API mixing) - to use only appropriate resources by checking the default export location - Added fixtures to filter projects/tasks assets - Updated default target|source buckets to `import/export` bucket to exclude the same bucket usage as a data source in several tests (when bucket content is used as task data) and as a bucket for results ## Summary by CodeRabbit - **New Features** - Enhanced job handling for exports, improving error management and job state tracking. - Introduced a new `resource` field in the request handling system to improve data categorization. - Added new filtering capabilities for API queries, allowing users to filter by the `resource` field. - **Bug Fixes** - Improved status checks and handling for job requests. - Introduced exception handling for forbidden access during project backup attempts. - **Tests** - Refactored test suites to improve coverage and ensure compatibility across versions with new methods and exception handling. - New tests added to validate request handling functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Maxim Zhiltsov <zhiltsov.max35@gmail.com>
- Loading branch information
1 parent
3cd4c39
commit 3fdb032
Showing
27 changed files
with
1,568 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
### Fixed | ||
|
||
- Prevent export process from restarting when downloading a result file, | ||
that resulted in downloading a file with new request ID | ||
(<https://github.com/cvat-ai/cvat/pull/8216>) | ||
- Race condition occurred while handling parallel export requests | ||
(<https://github.com/cvat-ai/cvat/pull/8216>) | ||
- Requests filtering using format and target filters | ||
(<https://github.com/cvat-ai/cvat/pull/8216>) |
392 changes: 226 additions & 166 deletions
392
cvat/apps/engine/background_operations.py → cvat/apps/engine/background.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.