Skip to content

Commit

Permalink
Merge pull request #9062 from cvat-ai/release-2.28.0
Browse files Browse the repository at this point in the history
Release v2.28.0
  • Loading branch information
cvat-bot[bot] authored Feb 6, 2025
2 parents 2839c5c + 1649f7a commit 5e39e40
Show file tree
Hide file tree
Showing 44 changed files with 832 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '22.x'

- name: Install npm packages
working-directory: ./site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'

- name: Download CVAT server image
uses: actions/download-artifact@v4
Expand Down
109 changes: 0 additions & 109 deletions .github/workflows/helm.yml

This file was deleted.

105 changes: 104 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '22.x'

- name: Download CVAT server image
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -383,6 +383,109 @@ jobs:
name: cypress_videos_${{ matrix.specs }}
path: ${{ github.workspace }}/tests/cypress/videos

helm_rest_api_testing:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Start minikube
uses: medyagh/setup-minikube@latest
with:
cpus: max
memory: max

- name: Try the cluster
run: kubectl get pods -A

- name: Download CVAT server image
uses: actions/download-artifact@v4
with:
name: cvat_server
path: /tmp/cvat_server/

- name: Download CVAT UI images
uses: actions/download-artifact@v4
with:
name: cvat_ui
path: /tmp/cvat_ui/

- name: Load images
run: |
eval $(minikube -p minikube docker-env)
docker load --input /tmp/cvat_server/image.tar
docker load --input /tmp/cvat_ui/image.tar
docker image ls -a
- uses: azure/setup-helm@v4

- name: Update Helm chart dependencies
working-directory: helm-chart
run: |
helm dependency update
- name: Deploy to minikube
run: |
printf " service:\n externalIPs:\n - $(minikube ip)\n" >> helm-chart/test.values.yaml
helm upgrade release-${{ github.run_id }}-${{ github.run_attempt }} --install helm-chart \
-f helm-chart/cvat.values.yaml \
-f helm-chart/test.values.yaml \
--set cvat.backend.tag=${{ env.CVAT_VERSION }} \
--set cvat.frontend.tag=${{ env.CVAT_VERSION }}
- name: Update test config
run: |
sed -i -e 's$http://localhost:8080$http://cvat.local:80$g' tests/python/shared/utils/config.py
find tests/python/shared/assets/ -type f -name '*.json' | xargs sed -i -e 's$http://localhost:8080$http://cvat.local$g'
echo "$(minikube ip) cvat.local" | sudo tee -a /etc/hosts
- name: Generate SDK
run: |
pip3 install --user -r cvat-sdk/gen/requirements.txt
./cvat-sdk/gen/generate.sh
- name: Install test requirements
run: |
pip3 install --user cvat-sdk/
pip3 install --user cvat-cli/
pip3 install --user -r tests/python/requirements.txt
- name: Wait for CVAT to be ready
run: |
max_tries=60
while [[ $(kubectl get pods -l component=server -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" && max_tries -gt 0 ]]; do echo "waiting for CVAT pod" && (( max_tries-- )) && sleep 5; done
while [[ $(kubectl get pods -l app.kubernetes.io/name=postgresql -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" && max_tries -gt 0 ]]; do echo "waiting for DB pod" && (( max_tries-- )) && sleep 5; done
while [[ $(curl -s -o /tmp/server_response -w "%{http_code}" cvat.local/api/server/about) != "200" && max_tries -gt 0 ]]; do echo "waiting for CVAT" && (( max_tries-- )) && sleep 5; done
kubectl get pods
kubectl logs $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}')
- name: REST API and SDK tests
# We don't have external services in Helm tests, so we ignore corresponding cases
# They are still tested without Helm
run: |
kubectl cp tests/mounted_file_share/images $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share
kubectl cp tests/mounted_file_share/videos $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share
pytest --timeout 30 --platform=kube -m "not with_external_services" tests/python --log-cli-level DEBUG
- name: Creating a log file from "cvat" container logs
if: failure()
env:
LOGS_DIR: "${{ github.workspace }}/rest_api_testing"
run: |
mkdir ${LOGS_DIR}
kubectl logs $(kubectl get pods -l component=server -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_server.log
kubectl logs $(kubectl get pods -l component=worker-import -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_import.log
kubectl logs $(kubectl get pods -l component=worker-export -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_export.log
kubectl logs $(kubectl get pods -l component=worker-webhooks -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/cvat_worker_webhooks.log
kubectl logs $(kubectl get pods -l app.kubernetes.io/name=traefik -o 'jsonpath={.items[0].metadata.name}') >${LOGS_DIR}/traefik.log
- name: Uploading "cvat" container logs as an artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: helm_rest_api_container_logs
path: "${{ github.workspace }}/rest_api_testing"

publish_dev_images:
if: github.ref == 'refs/heads/develop'
needs: [rest_api_testing, unit_testing, e2e_testing]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'

- name: Run checks
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'

- name: Download CVAT server image
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stylelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-yarn-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'

- name: Update yarn.lock file
run: yarn
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- scriv-insert-here -->

<a id='changelog-2.28.0'></a>
## \[2.28.0\] - 2025-02-06

### Added

- Support for managing Redis migrations
(<https://github.com/cvat-ai/cvat/pull/8898>)

### Changed

- Updated limitation for minimal object size from 9px area to 1px in dimensions
(<https://github.com/cvat-ai/cvat/pull/9055>)

### Fixed

- Invalid chunks and backups after honeypot updates in tasks with cloud storage data
(<https://github.com/cvat-ai/cvat/pull/9010>)

- In some cases effect of drag/resize may be reset implicitly for a user
(<https://github.com/cvat-ai/cvat/pull/9053>)

<a id='changelog-2.27.0'></a>
## \[2.27.0\] - 2025-02-04

Expand Down
13 changes: 12 additions & 1 deletion backend_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ wait_for_db() {
wait-for-it "${CVAT_POSTGRES_HOST}:${CVAT_POSTGRES_PORT:-5432}" -t 0
}

wait_for_redis_inmem() {
wait-for-it "${CVAT_REDIS_INMEM_HOST}:${CVAT_REDIS_INMEM_PORT:-6379}" -t 0
}

cmd_bash() {
exec bash "$@"
}
Expand All @@ -19,7 +23,8 @@ cmd_init() {
wait_for_db
~/manage.py migrate

wait-for-it "${CVAT_REDIS_INMEM_HOST}:${CVAT_REDIS_INMEM_PORT:-6379}" -t 0
wait_for_redis_inmem
~/manage.py migrateredis
~/manage.py syncperiodicjobs
}

Expand All @@ -39,6 +44,12 @@ cmd_run() {
sleep 10
done

wait_for_redis_inmem
echo "waiting for Redis migrations to complete..."
while ! ~/manage.py migrateredis --check; do
sleep 10
done

exec supervisord -c "supervisord/$1.conf"
}

Expand Down
26 changes: 26 additions & 0 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,32 @@ export class CanvasViewImpl implements CanvasView, Listener {
this.canvas.style.cursor = '';
this.mode = Mode.IDLE;
if (state && points) {
// we need to store "updated" and set "points" to an empty array
// as this information is used to define "updated" objects in diff logic during canvas objects setup
// if because of any reason updating was actually rejected somewhere, we must reset view inside this logic

// there is one more deeper issue:
// somewhere canvas updates drawn views and then sends request,
// updating internal CVAT state (e.g. drag, resize)
// somewhere, however, it just sends request to update internal CVAT state
// (e.g. remove point, edit polygon/polyline)
// if object view was not changed by canvas and points accepted as is without any changes
// the view will not be updated during objects setup if we just set points as is here
// that is why we need to set points to an empty array (something that can't normally come from CVAT)
// I do not think it can be easily fixed now, hovewer in the future we should refactor code
if (Number.isInteger(state.parentID)) {
const { elements } = this.drawnStates[state.parentID];
const drawnElement = elements.find((el) => el.clientID === state.clientID);
drawnElement.updated = 0;
drawnElement.points = [];

this.drawnStates[state.parentID].updated = 0;
this.drawnStates[state.parentID].points = [];
} else {
this.drawnStates[state.clientID].updated = 0;
this.drawnStates[state.clientID].points = [];
}

const event: CustomEvent = new CustomEvent('canvas.edited', {
bubbles: false,
cancelable: true,
Expand Down
Loading

0 comments on commit 5e39e40

Please sign in to comment.