Skip to content
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

✨ Directorv2: adds current product_name in ScheduledData [part 2 of #3565] #3843

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Feb 6, 2023

What do these changes do?

Follows from PR #3803. This PR simply gets information about the current product (i.e. product_name) into the directorv2 ScheduledData so it can be used to determine the context for OSPARC_ENVIRONMENT_-identifiers substitution.

Due to the large amount of changes, the next PR will introduce the mechanism that resolves OSPARC_ENVIRONMENT_-identifiers depending on the context (i.e. user_id, project_uid, product_name, etc)

Changes highlights:

  • directorv2 API 2.1.0 → 2.2.0
    • NEW product_name required in API (breaks backwards compatibility)
    • when a service gets scheduled, it also captures the current product_name in ScheduledData
  • ♻️ cleanup test_utils_string_substitution.py

Related issue/s

How to test

  • directorv2 and webserver tests in-place

Checklist

  • make version-*
  • make openapi.json
  • Unit tests for the changes exist
  • Runs in the swarm

@pcrespov pcrespov self-assigned this Feb 6, 2023
@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Merging #3843 (1eee98a) into master (35cce4f) will increase coverage by 0.7%.
The diff coverage is 100.0%.

❗ Current head 1eee98a differs from pull request most recent head b415f9a. Consider uploading reports for the commit b415f9a to get more accurate results

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #3843     +/-   ##
========================================
+ Coverage    82.9%   83.7%   +0.7%     
========================================
  Files         929     815    -114     
  Lines       39836   36424   -3412     
  Branches      837     485    -352     
========================================
- Hits        33043   30496   -2547     
+ Misses       6572    5800    -772     
+ Partials      221     128     -93     
Flag Coverage Δ
integrationtests 52.3% <100.0%> (-9.4%) ⬇️
unittests 81.6% <66.6%> (-0.6%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...modules/dynamic_sidecar/scheduler/_core/_events.py 97.2% <ø> (+38.3%) ⬆️
...ice_webserver/director_v2_core_dynamic_services.py 69.3% <ø> (ø)
...simcore_service_webserver/projects/projects_api.py 75.6% <ø> (-5.5%) ⬇️
...vice_webserver/projects/projects_nodes_handlers.py 40.1% <ø> (-40.2%) ⬇️
...ice_director_v2/models/domains/dynamic_services.py 100.0% <100.0%> (ø)
...or_v2/models/schemas/dynamic_services/scheduler.py 99.3% <100.0%> (+2.0%) ⬆️
...v2/modules/dynamic_sidecar/docker_compose_specs.py 99.0% <100.0%> (+29.5%) ⬆️
...r/src/simcore_service_webserver/projects/_ports.py 32.9% <0.0%> (-61.0%) ⬇️
...vice_webserver/projects/projects_ports_handlers.py 59.6% <0.0%> (-34.5%) ⬇️
... and 151 more

@pcrespov pcrespov force-pushed the is3565/service-environs-definition-part2 branch from 57fd233 to 044b961 Compare February 6, 2023 15:26
@pcrespov pcrespov added this to the Resistance Is Futile milestone Feb 6, 2023
@pcrespov pcrespov force-pushed the is3565/service-environs-definition-part2 branch 2 times, most recently from bd61392 to 3883088 Compare February 6, 2023 17:50
@pcrespov pcrespov changed the title WIP:✨ Is3565/service environs definition part2 WIP:✨ Is3565/service environs definition part2 (🗃️ DB change) Feb 6, 2023
@pcrespov pcrespov changed the title WIP:✨ Is3565/service environs definition part2 (🗃️ DB change) WIP:✨ Is3565/service environs definition [part 2] (🗃️ DB change) Feb 6, 2023
@pcrespov pcrespov added the a:director-v2 issue related with the director-v2 service label Feb 7, 2023
@pcrespov pcrespov changed the title WIP:✨ Is3565/service environs definition [part 2] (🗃️ DB change) ✨ Directorv2: adds current product_name in ScheduledData [part 2 of #3565] Feb 7, 2023
@pcrespov pcrespov marked this pull request as ready for review February 7, 2023 10:49
@pcrespov pcrespov requested a review from mguidon February 7, 2023 10:49
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Could you make sure that if from_service_inspect does not receive the product_name field encoded in the label, this still works. Just double check this.

@pcrespov
Copy link
Member Author

pcrespov commented Feb 7, 2023

Could you make sure that if from_service_inspect does not receive the product_name field encoded in the label, this still works. Just double check this.

@GitHK Can you please guide me on how to test this?

@pcrespov pcrespov force-pushed the is3565/service-environs-definition-part2 branch 3 times, most recently from bcf13ec to 45c9e66 Compare February 8, 2023 17:49
Copy link
Member

@mguidon mguidon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@pcrespov pcrespov force-pushed the is3565/service-environs-definition-part2 branch 2 times, most recently from 5e9b964 to e1df908 Compare February 13, 2023 09:58
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good. you have a missing @testit marker.

@pcrespov pcrespov force-pushed the is3565/service-environs-definition-part2 branch from a9359d2 to 9c0442b Compare February 13, 2023 13:20
@pcrespov pcrespov force-pushed the is3565/service-environs-definition-part2 branch from 9c0442b to 1eee98a Compare February 13, 2023 13:47
@pcrespov pcrespov enabled auto-merge (squash) February 13, 2023 13:48
@codeclimate
Copy link

codeclimate bot commented Feb 13, 2023

Code Climate has analyzed commit b415f9a and detected 0 issues on this pull request.

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Feb 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@pcrespov pcrespov merged commit e2af43d into ITISFoundation:master Feb 13, 2023
@pcrespov pcrespov deleted the is3565/service-environs-definition-part2 branch February 13, 2023 14:29
@pcrespov pcrespov restored the is3565/service-environs-definition-part2 branch February 13, 2023 14:30
@pcrespov pcrespov deleted the is3565/service-environs-definition-part2 branch February 28, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:director-v2 issue related with the director-v2 service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants