Allow png previews#10561
Open
zhiltsov-max wants to merge 16 commits intozm/add-media-typefrom
Open
Conversation
d5e18e0 to
6651158
Compare
6 tasks
Without this, tests with the XPASS result don't fail the testsuite, which IMO makes xfail pointless - it's basically the same as skipping the test.
I inadvertently broke this in #10106 by changing the order of file operations in `PcdReader.convert_bin_to_pcd`. The current version of `read_raw_images` saves the `.bin` file with a `.pcd` extension and then tries to convert it to the PCD format. `convert_bin_to_pcd` opens the output file first; but in this case the input and output paths are the same, so this truncates the input file to 0 bytes before `convert_bin_to_pcd` can read it. We could probably reorder the opens again to fix this, but IMO, this scheme with saving the `.bin` file with a `.pcd` extension is rather confusing and it's better to fix this instead. Save the file with its original extension and let `convert_bin_to_pcd` save the output to a new file instead. In addition, fix a bug in `HeaderFirstDownloader` that prevents a task from being created if a `.bin` file is small. This is needed for the test to work. The problem is that `_HeaderFirstPcdDownloader.try_parse_header` always returns False, so if the entire file fits within `headers_to_try[0]` bytes, the loop will then try to download a range that doesn't exist. Fix it by detecting that there is no more data left to download and exiting early.
- [x] I submit my changes into the `develop` branch - [x] I have updated the documentation accordingly - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project. --------- Co-authored-by: Petr Iosipov <[email protected]>
Apparently `@uiw/react-md-editor` has insecure defaults, so an attacker can easily execute custom JavaScript as described here: <https://uiwjs.github.io/react-md-editor/#security>. Fix it using the method recommended in the docs.
Label attribute with value type Checkbox displays `True`/`False` which does not match the case on the canvas. The PR uses lowercase in label editor
## Summary This is **PR 2** in the split series for the large test-infra branch. Base PR: - #10494 `Tests: stabilize local Python and Cypress baselines` This PR is intentionally small and backend-only. It builds on top of PR 1 because PR 1 contains the baseline test fixes needed to validate the later series reliably. ## What changed - harden chunk job failure reconstruction in `cvat/apps/engine/cache.py` - if rebuilding the original exception from stored type/args fails, raise a stable `ChunkCreationError` instead of masking the real failure with a secondary constructor error - make S3 cloud-storage status probes fail fast in `cvat/apps/engine/cloud_provider.py` - use a dedicated low-timeout client for status checks - degrade only transport-level reachability failures (`ConnectTimeoutError`, `EndpointConnectionError`, `ReadTimeoutError`) - keep `ClientError` handling separate so existing `403/404` semantics are preserved ## Why this PR exists separately These changes are independent from the pytest runtime / kube / CI refactor. They are backend robustness fixes and can be reviewed on their own. ## Validation Local checks completed on this branch: - `py_compile` - `black --check --diff` - `isort --check --diff --resolve-all-configs` - `pylint` - `typos` on the changelog fragment - `remark` on the changelog fragment ## Changelog - added a dedicated PR fragment for the backend robustness changes
<!-- Raise an issue to propose your change (https://github.com/cvat-ai/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I submit my changes into the `develop` branch - [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) ### License - [ ] I submit _my code changes_ under the same [MIT License]( https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.38 to 8.5.10. Co-authored-by: Kirill Lakhov <[email protected]>
8db4940 to
84326a5
Compare
84326a5 to
d5cf659
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and context
Depends on #10538
Currently, the server uses the jpg file extension for previews. Although, the format is good in general, files are limited to only 3 channels, so no alpha channel can be used. Previews with alpha channel can be reliably recolored by the presenter to a different color, if required.
/api/jobs/<id>/dataendpointHow has this been tested?
Checklist
developbranchLicense
Feel free to contact the maintainers if that's a concern.