[WIP]🔨 Change deployment from serial to parallel to improve efficiency.#738
[WIP]🔨 Change deployment from serial to parallel to improve efficiency.#738
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the GitHub Actions workflow to improve deployment efficiency by changing from serial to parallel build execution. The workflow consolidates three separate build jobs into a single parallelized job using a matrix strategy.
- Consolidates three separate build jobs (
build-main,build-data-process,build-web) into onebuild-imagesjob with matrix strategy - Implements conditional logic for data-process specific model caching operations
- Updates deployment job dependency to reference the single build job
.github/workflows/docker-deploy.yml
Outdated
| else | ||
| docker build --build-arg MIRROR=https://registry.npmmirror.com -t nexent/nexent-web -f make/web/Dockerfile . |
There was a problem hiding this comment.
The else clause assumes any target other than 'main' or 'data-process' is 'web'. This could lead to unexpected behavior if the matrix is extended with additional targets. Consider explicitly checking for 'web' target: elif [ "${{ matrix.target }}" = "web" ]; then
| else | |
| docker build --build-arg MIRROR=https://registry.npmmirror.com -t nexent/nexent-web -f make/web/Dockerfile . | |
| elif [ "${{ matrix.target }}" = "web" ]; then | |
| docker build --build-arg MIRROR=https://registry.npmmirror.com -t nexent/nexent-web -f make/web/Dockerfile . | |
| else | |
| echo "Unknown target: ${{ matrix.target }}" >&2 | |
| exit 1 |
.github/workflows/docker-deploy.yml
Outdated
|
|
||
| - name: Clone model if not cached | ||
| if: steps.check-model.outputs.cache-hit == 'false' | ||
| if: matrix.target == 'data-process' && steps.check-model.outputs.cache-hit == 'false' |
There was a problem hiding this comment.
The condition references steps.check-model.outputs.cache-hit but the check-model step only runs when matrix.target == 'data-process'. For other matrix targets, this step doesn't exist and the condition will fail. Consider restructuring the conditions or using a default value.
| if: matrix.target == 'data-process' && steps.check-model.outputs.cache-hit == 'false' | |
| if: ${{ matrix.target == 'data-process' && steps.check-model.outputs.cache-hit == 'false' }} |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🔨 Change deployment from serial to parallel to improve efficiency.