-
Notifications
You must be signed in to change notification settings - Fork 32
♻️⬆️ Migrating director service to fastapi ⚠️ 🚨 #6657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pcrespov
merged 229 commits into
ITISFoundation:master
from
pcrespov:is1988/upgrading-director-to-fastapi
Nov 18, 2024
Merged
Changes from all commits
Commits
Show all changes
229 commits
Select commit
Hold shift + click to select a range
db8880f
drafted requirements
pcrespov fd64036
upgraded
pcrespov 7f08293
rm
pcrespov 5e7d7a5
setup
pcrespov e13f226
director api version: 0.1.0 → 1.0.0
pcrespov add6a76
unreadme
pcrespov 3b10e76
entrpoint/boot
sanderegg 740406a
healthcheck
sanderegg a0191e4
base routes
sanderegg 768aa23
added meta
sanderegg 6767346
added core
sanderegg 4d5d4aa
modified meta
sanderegg 76187a3
added cli
sanderegg 30ef4ca
replaced main
sanderegg 86e13cc
conftest
pcrespov 6a4bf59
ruffed
pcrespov 83dd0d9
aync tests
pcrespov f4831a5
test_docker_utils runs
pcrespov 07fa4e5
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
pcrespov e6fbfba
test_settings
pcrespov b32c6cd
test_utils
pcrespov 1c40e4b
minor
pcrespov ebb8ead
test_oas
pcrespov 5ea1a2b
oas is auto-generated now
pcrespov e79bb34
moved config to settings/constants
sanderegg 394fc8c
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
sanderegg 8a35424
migration
sanderegg e5769c5
migrated to fastapi
sanderegg b54c785
app fixture
pcrespov a1afb33
refactoring test_handlers
pcrespov ff3f2bd
rm test_handlers -> api
pcrespov f4c582f
migrated list services
sanderegg f57d969
migrated services endpoint
sanderegg e1221aa
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
pcrespov 0f8556f
cli and models
pcrespov e07ed6b
test healthcheck
pcrespov 7c80aa2
split service extras
pcrespov 11aa54e
split service extras
pcrespov 7ec3d19
migrated service extras endpoint
sanderegg 0f81b25
adds api model
pcrespov 71404e4
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
pcrespov b1ab0ec
updates service-extras
pcrespov e66bdd8
import fix
sanderegg 2c039e9
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
sanderegg 62c83bd
migrated running services
sanderegg b18830a
migrated producer
sanderegg 142953a
setup registry
sanderegg ff0f132
monitoring progress
sanderegg 95446b9
removed generated code
sanderegg 6b43e88
drafted requirements
pcrespov 8d124c8
upgraded
pcrespov 94162ca
rm
pcrespov ca381d1
setup
pcrespov 44db6cf
director api version: 0.1.0 → 1.0.0
pcrespov 837bac1
unreadme
pcrespov 88fc379
entrpoint/boot
sanderegg edb40bc
healthcheck
sanderegg 3e7241c
base routes
sanderegg f3ffacb
added meta
sanderegg 55591eb
added core
sanderegg 70d183b
modified meta
sanderegg fd49194
added cli
sanderegg a55861b
replaced main
sanderegg 63b84d5
moved config to settings/constants
sanderegg 5380ab4
conftest
pcrespov 9682c3b
ruffed
pcrespov 98c6965
aync tests
pcrespov de680de
test_docker_utils runs
pcrespov c4a2e94
test_settings
pcrespov 6f72c0f
test_utils
pcrespov 53097ff
minor
pcrespov 39dd2bf
test_oas
pcrespov 9b8b5ac
oas is auto-generated now
pcrespov 9c28b0e
migration
sanderegg b82a369
migrated to fastapi
sanderegg d35c594
app fixture
pcrespov 859fef5
refactoring test_handlers
pcrespov e9c6fd4
rm test_handlers -> api
pcrespov 290d51e
migrated list services
sanderegg 6a3d019
migrated services endpoint
sanderegg 8a6dbec
cli and models
pcrespov 8979952
test healthcheck
pcrespov 1454f10
split service extras
pcrespov 6ae3476
split service extras
pcrespov 34d86f5
migrated service extras endpoint
sanderegg d3cb993
import fix
sanderegg d329957
adds api model
pcrespov 2f73644
updates service-extras
pcrespov 843cccb
migrated running services
sanderegg 1ac2876
migrated producer
sanderegg 3bc9134
add get_application_settings
sanderegg b378463
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
pcrespov edb2b73
this is a constant
sanderegg 926f892
migrating
sanderegg bde0e0e
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
sanderegg 315bd23
removed old main
sanderegg cd66474
removed old main
sanderegg e7cc973
removed config
sanderegg f559aac
removed old pylint
sanderegg 65511dc
last one today
sanderegg d33d94e
missing return types
sanderegg 0076e7f
added instrumetnation basics
sanderegg 611f799
connected instrumentation
sanderegg 2267f18
added client session
sanderegg a400efe
diverse
sanderegg cc5662b
producer
sanderegg 7636556
producer
sanderegg 682cb1b
Merge remote-tracking branch 'upstream/master' into is1988/upgrading-…
sanderegg ed2755d
changed wrong stuff
sanderegg 86a0d4e
tests are starting now
sanderegg 07a3986
fix types
sanderegg efd9146
cleanup
sanderegg e239d07
temp
sanderegg c241ad7
temp
sanderegg 1976f16
types
sanderegg 27a80ab
re-added monitoring
sanderegg 7c5a00e
mypy happy
sanderegg 8048490
Merge remote-tracking branch 'upstream/master' into is1988/upgrading-…
sanderegg 9108036
updated Dockerfile
sanderegg 90d4205
typo
sanderegg a5b39ef
missing validation of log level
sanderegg 5b8145e
missing debugging port
sanderegg db90448
pass log_level formatting
sanderegg 51ca92b
storage endpoint is a full endpoint with scheme
sanderegg bd9b0e6
revert
sanderegg 6499829
LOG_LEVEL instead of log_level
sanderegg abb9e35
duplicate
sanderegg b43f5df
ruff
sanderegg b1a9a11
fix order
sanderegg 24c59aa
fix settings
sanderegg f43413f
changed director port
sanderegg f2f3aba
fixed routes and tasks
sanderegg 3748f93
ensure HEAD works
sanderegg 54e6178
also respond with healtcheck on /v0/
sanderegg eb4c4bd
spelling error
pcrespov 5091270
udpate envs
pcrespov 8f2ae44
some improvements
sanderegg a8bc7a5
fixes test_settings
pcrespov 03a171a
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov 17bbe29
regenerated reqs
sanderegg 9369cb5
replaced home made caching by aiocache
sanderegg 2196f3f
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
sanderegg 1c84f71
mypy happy
sanderegg 23ae345
Merge remote-tracking branch 'upstream/master' into is1988/upgrading-…
sanderegg 9d08c65
fixed test
sanderegg 54a2614
moved tests to unit subfolder
sanderegg 86c3062
test getting greener
sanderegg e8d64ec
Merge remote-tracking branch 'upstream/master' into is1988/upgrading-…
sanderegg 724117c
fixed unit testing script
sanderegg 04c494a
fixed CI for director-v0
sanderegg 0a2e089
fixed bash script
sanderegg 941cd94
removed fixture
sanderegg 56a0f03
upgraded requirements
sanderegg 9c04de1
fixed test_cli
sanderegg e087eec
fixing tests
sanderegg 9be31ed
ongoing
sanderegg bb2ac26
remove wrong usage
sanderegg b5a953a
Merge remote-tracking branch 'upstream/master' into is1988/upgrading-…
sanderegg cc1eb85
added aioresponses
sanderegg f97dfa4
ensure docker_networks has a swarm
sanderegg e3b3d42
ruff
sanderegg cd22c36
note
sanderegg bff77dc
fixed api
sanderegg edc260e
use middleware
sanderegg aa22b7d
ensure in sequential workers are properly closed
sanderegg 0e36744
proper exception
sanderegg d3be678
remove polution of logs
sanderegg 95f07a1
test passes
sanderegg 7836274
more fixtures
sanderegg b36a228
cleanup
sanderegg dd642be
cleanup
sanderegg 866eb7c
Merge remote-tracking branch 'upstream/master' into is1988/upgrading-…
sanderegg 1b9a8df
missing registry configuration
sanderegg 5d4dd41
fix api
sanderegg 932af75
fixed syntax
sanderegg 69bee43
ruff
sanderegg bab906f
missing fixture
sanderegg 22f672f
api tests passing
sanderegg 207d332
fixture adjustments
sanderegg 3d46690
test passing
sanderegg a11a517
passing tests
sanderegg 4b58480
use docker utils
sanderegg 5de6955
test with no swarm is not necessary
sanderegg 7b7afd4
no need to test fixtures
sanderegg 8bf9f8d
cleanup
sanderegg 307d95b
cleanup
sanderegg 2606d9e
unused
sanderegg 57b5315
chatgpt tests
sanderegg 0457aaa
removed exceptions, replaced by errors
sanderegg 444c4c9
fixed test using monkeypatch
sanderegg ea84b6b
linter
sanderegg 0500c7e
missing dependency
sanderegg 1128245
missing faker
sanderegg 7b85e9b
correct status code
sanderegg b318dfe
@GitHK review: _logger
sanderegg 6fe63f5
@GitHK review: more stuff
sanderegg 3d31659
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov 1aa3f74
Merge branch 'master' into is1988/upgrading-director-to-fastapi
sanderegg e96cf49
env tsts
pcrespov 621906c
adds tracing
pcrespov 8c69e30
replaced DEFAULT_MAX_NANO_CPUS by DIRECTOR_DEFAULT_MAX_NANO_CPUS
pcrespov 0428172
envs
pcrespov fbc1f75
fixes dockercompose env fixture
pcrespov d0e7a06
doc
pcrespov 9450b1d
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov a501847
@mrnicegyu11 review: updates 3.11
pcrespov d126098
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov 4e39091
missing upgrade
pcrespov 726ba0c
rm envs
pcrespov 10c3157
env vars
pcrespov f5f457e
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov d70950f
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
pcrespov 80ca437
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov c202c3d
envs
pcrespov 9068e35
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov c8d65b2
Merge branch 'is1988/upgrading-director-to-fastapi' of github.com:pcr…
pcrespov 08a837c
minor cleanup
pcrespov 07192df
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov 309e271
disables tracing for integration tests
pcrespov 6d3b23c
fixes fixture
pcrespov ac28f3f
disable tracing
pcrespov efb5065
docker-path
pcrespov 136b9be
fixes tests
pcrespov de5ca38
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov 569d936
missing envvar
pcrespov 3a8224e
improves error
pcrespov fc2d908
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov b8a0ee5
forgot uncomment
pcrespov 1b79b37
Merge branch 'master' into is1988/upgrading-director-to-fastapi
pcrespov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,8 +37,8 @@ on: | |
| - all | ||
|
|
||
| env: | ||
| DEFAULT_MAX_NANO_CPUS: 10000000 | ||
| DEFAULT_MAX_MEMORY: 268435456 | ||
| # NOTE: 'COLUMNS' is a shell env var that represents the width (number of columns) | ||
| # of the terminal or command-line interface in characters. | ||
| COLUMNS: 120 | ||
|
|
||
| concurrency: | ||
|
|
@@ -189,6 +189,8 @@ jobs: | |
| - 'packages/**' | ||
| - 'services/director/**' | ||
| - 'services/docker-compose*' | ||
| - 'scripts/mypy/*' | ||
| - 'mypy.ini' | ||
| director-v2: | ||
| - 'packages/**' | ||
| - 'services/director-v2/**' | ||
|
|
@@ -912,11 +914,8 @@ jobs: | |
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| # KEEP 3.6 Development of this service is frozen | ||
| # KEEP ubuntu 20.04, else no python 3.6 | ||
| python: [3.6] | ||
| os: [ubuntu-20.04] | ||
| docker_buildx: [v0.10.4] | ||
| python: ["3.11"] | ||
| os: [ubuntu-22.04] | ||
| fail-fast: false | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
@@ -929,12 +928,27 @@ jobs: | |
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
| - name: install uv | ||
| uses: astral-sh/setup-uv@v3 | ||
| with: | ||
| version: "0.4.x" | ||
| enable-cache: false | ||
| cache-dependency-glob: "**/director/requirements/ci.txt" | ||
| - name: show system version | ||
| run: ./ci/helpers/show_system_versions.bash | ||
| - name: install | ||
| run: ./ci/github/unit-testing/director.bash install | ||
| - name: typecheck | ||
| run: ./ci/github/unit-testing/director.bash typecheck | ||
| - name: test | ||
| if: ${{ !cancelled() }} | ||
| run: ./ci/github/unit-testing/director.bash test | ||
| - name: upload failed tests logs | ||
| if: ${{ !cancelled() }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ github.job }}_docker_logs | ||
| path: ./services/director/test_failures | ||
| - uses: codecov/[email protected] | ||
| env: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
|
@@ -2132,6 +2146,11 @@ jobs: | |
| python: ["3.11"] | ||
| os: [ubuntu-22.04] | ||
| fail-fast: false | ||
| env: | ||
| # NOTE: DIRECTOR_DEFAULT_MAX_* used for integration-tests that include `director` service | ||
| DIRECTOR_DEFAULT_MAX_MEMORY: 268435456 | ||
| DIRECTOR_DEFAULT_MAX_NANO_CPUS: 10000000 | ||
| DIRECTOR_TRACING: null | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: setup docker buildx | ||
|
|
||
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
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
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
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
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
packages/models-library/src/models_library/api_schemas_director/services.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from ..services_metadata_published import ServiceMetaDataPublished | ||
|
|
||
|
|
||
| class ServiceDataGet(ServiceMetaDataPublished): | ||
| ... |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| # | ||
| --constraint _base.txt | ||
|
|
||
| aiodocker | ||
| coverage | ||
| docker | ||
| faker | ||
|
|
||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.