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

✨ Add common simcore-service executable alias #5051

Merged

Conversation

mrnicegyu11
Copy link
Member

@mrnicegyu11 mrnicegyu11 commented Nov 20, 2023

What do these changes do?

What

We add an(other) alias for the gunicorn simcore-service executable placed in .venv/bin/ for simcore services.

Previously, the naming convention was simcore-service-$SERVICE_NAME, like simcore-service-storage

Now, we add the generic simcore-service to all services.

Bonus: Harmonized naming, some executables would be named osparc-, which is removed in favor of simcore-service-

Why

In the ops CI/CD we have introduced a CI to validate that the pydantic settings validation passes for a given set of environment variables:

  • example pipeline run: https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/jobs/3849540
  • code: https://github.com/ITISFoundation/osparc-ops-environments/blob/main/scripts/deployments/validate_simcore_stack_yml.bash

This CI pipeline calls the settings subcommand of the simcore-executables to validate the configuration. In order to call the executable, the correct name of the service-executable (e.g. simcore-service-storage) has to be known and composed. It is not always easy to do this in a bash script with only a docker-compose.yml given, since for example the webserver runs in different flavors (GC, EVENTS), and has different names for the flavors' docker containers while the gunicorn executables' names remain the same.

By introducing the common alias simcore-service, which is added to $PATH as well, the CI pipeline can be coded more cleanly by checking for the existence of an executable called simcore-service and using it if it exists.

Perspectives

In this direction, we could potentially harmonize the files

- Dockerfile
- entrypoint.sh
- boot.sh

to have only one version of those for all simcore services, instead of duplicating them for every simcore microservice.

Related issue/s

How to test

Dev Checklist

DevOps Checklist

Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Merging #5051 (9d44570) into master (d410cf7) will increase coverage by 0.2%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #5051     +/-   ##
========================================
+ Coverage    87.3%   87.5%   +0.2%     
========================================
  Files        1259    1130    -129     
  Lines       51784   47927   -3857     
  Branches     1111     672    -439     
========================================
- Hits        45210   41951   -3259     
+ Misses       6334    5828    -506     
+ Partials      240     148     -92     
Flag Coverage Δ
integrationtests 64.8% <ø> (-0.1%) ⬇️
unittests 85.1% <ø> (+<0.1%) ⬆️

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

Files Coverage Δ
...ation/src/service_integration/commands/metadata.py 100.0% <ø> (ø)

... and 135 files with indirect coverage changes

@mrnicegyu11 mrnicegyu11 self-assigned this Nov 20, 2023
@mrnicegyu11 mrnicegyu11 added t:enhancement Improvement or request on an existing feature t:maintenance Some planned maintenance work idea Proposed new functionality that is still not implemented labels Nov 20, 2023
@mrnicegyu11 mrnicegyu11 added this to the 7peaks milestone Nov 20, 2023
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-ops-environments that referenced this pull request Nov 20, 2023
@mrnicegyu11
Copy link
Member Author

@mrnicegyu11 mrnicegyu11 marked this pull request as ready for review November 20, 2023 10:49
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

I think it is a good idea since we do not install more than one service at a time.
I would just like to ask for an extra cleanup and adding a test to constraint docker-compose

thx!

packages/postgres-database/setup.py Show resolved Hide resolved
packages/service-integration/setup.py Show resolved Hide resolved
services/osparc-gateway-server/docker-compose.yml Outdated Show resolved Hide resolved
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.

I'm OK with them, but I have no opinion on the change

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Looks good to me

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. thank you

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. thank you

@mrnicegyu11 mrnicegyu11 requested a review from pcrespov November 20, 2023 17:05
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

thx!

packages/postgres-database/setup.py Show resolved Hide resolved
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.

You should actually revert everything regarding the gateway-server

Copy link

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

Copy link

codeclimate bot commented Nov 21, 2023

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

View more on Code Climate.

@mrnicegyu11 mrnicegyu11 enabled auto-merge (squash) November 21, 2023 13:02
@mrnicegyu11 mrnicegyu11 merged commit 3f42bed into ITISFoundation:master Nov 21, 2023
55 checks passed
@mrnicegyu11 mrnicegyu11 deleted the add/aliasForSimcoreExecutable branch November 21, 2023 13:04
mrnicegyu11 added a commit to ITISFoundation/osparc-ops-environments that referenced this pull request Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Proposed new functionality that is still not implemented t:enhancement Improvement or request on an existing feature t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants