aai-institute / jobq

https://aai-institute.github.io/jobq/latest
Apache License 2.0
2 stars 1 forks source link

Draft: Backend implementation for server-side image builds #131

Open AdrianoKF opened 1 month ago

AdrianoKF commented 1 month ago

This PR adds a prototype for the backend API for server-side image builds.

Usage:

# Put together build context (in client/)
client/$ tar --exclude-from=../.gitignore -czf context.tgz .

# Submit the build request
client/$ curl -X 'POST' \
  'http://localhost:8000/builds/build' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'image_spec=@examples/example-hello.yaml;type=application/x-yaml' \
  -F 'build_context=@context.tgz;type=application/x-gzip' \
  -F 'name=test-image' \
  -F 'tag=latest' \
  -F 'platform=linux/amd64'

See issue #43

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 45.41063% with 226 lines in your changes missing coverage. Please review.

Project coverage is 55.28%. Comparing base (abdc993) to head (4ab26c2).

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ckend/src/jobq_server/utils/assembler/renderers.py 40.42% 112 Missing :warning:
backend/src/jobq_server/utils/assembler/config.py 54.36% 47 Missing :warning:
backend/src/jobq_server/routers/builds.py 51.28% 38 Missing :warning:
backend/src/jobq_server/utils/processes.py 29.26% 29 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #131 +/- ## ========================================== - Coverage 56.60% 55.28% -1.33% ========================================== Files 62 67 +5 Lines 3132 3545 +413 ========================================== + Hits 1773 1960 +187 - Misses 1359 1585 +226 ``` | [Flag](https://app.codecov.io/gh/aai-institute/jobq/pull/131/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aai-institute) | Coverage Δ | | |---|---|---| | [backend](https://app.codecov.io/gh/aai-institute/jobq/pull/131/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aai-institute) | `71.26% <45.41%> (-17.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aai-institute#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.