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

chore: decouple Docker image builder from substrapp #689

Conversation

SdgJlbl
Copy link
Contributor

@SdgJlbl SdgJlbl commented Jul 11, 2023

Description

How has this been tested?

Open questions

  • which version for the helm chart?

Checklist

  • changelog was updated with notable changes
  • documentation was updated

@linear
Copy link

linear bot commented Jul 11, 2023

FL-1080 Isolate Docker image builder in its own service

Context

https://www.notion.so/owkin-fdn/Decoupling-Docker-image-build-from-Substra-task-execution-b7b8d1e8abb44a42b8571d758c95d2c6

First step is to isolate all the code used to build a Docker image from a Dockerfile + build context in a separate service.

Specification

In the long term, we probably want the builder to be an independent service, but in the interest of time, I propose to host it for now in a Django app in the backend.

API spec:

  • Input: name of the function to build
  • Output: Docker image stored in the registry + status
  • The actual build context and Dockerfile is currently stored in MinIO during the function registration call, the builder should get it from there
  • We don't want a "blocking call" to the builder (because it will moved to the registration part that is synchronous), two options:
    • A/ endpoint returning 202 Accepted and processing the build in the background; another endpoint could be developed to return current status of the build (pending, done or failed)
    • B/ event-based system using gPRC, similar to what is done to communicate with the orchestrator

Technical refinement

  • go for option B (for easier integration with a future task queue)
  • no DB for the builder, image build status to be stored by the orchestrator

Acceptance criteria

Docker image build is no longer done as part of task execution.

@SdgJlbl SdgJlbl force-pushed the sarahdiot-girard/fl-1080-isolate-docker-image-builder-in-its-own-service branch from 1110ea3 to 79022de Compare July 11, 2023 07:43
@SdgJlbl
Copy link
Contributor Author

SdgJlbl commented Jul 11, 2023

/e2e

@Owlfred

This comment was marked as outdated.

@SdgJlbl SdgJlbl force-pushed the sarahdiot-girard/fl-1080-isolate-docker-image-builder-in-its-own-service branch from 79022de to 5554eac Compare July 11, 2023 08:51
@SdgJlbl
Copy link
Contributor Author

SdgJlbl commented Jul 11, 2023

/e2e

@Owlfred

This comment was marked as outdated.

@SdgJlbl SdgJlbl force-pushed the sarahdiot-girard/fl-1080-isolate-docker-image-builder-in-its-own-service branch from 5554eac to afb939b Compare July 11, 2023 10:19
@SdgJlbl SdgJlbl force-pushed the sarahdiot-girard/fl-1080-isolate-docker-image-builder-in-its-own-service branch 13 times, most recently from 24fc671 to b1c193c Compare July 17, 2023 15:38
@SdgJlbl SdgJlbl force-pushed the sarahdiot-girard/fl-1080-isolate-docker-image-builder-in-its-own-service branch from 01c8837 to 5fc845e Compare July 31, 2023 15:00
@github-actions github-actions bot added the api label Jul 31, 2023
@SdgJlbl
Copy link
Contributor Author

SdgJlbl commented Aug 1, 2023

/e2e

@Owlfred

This comment was marked as outdated.

SdgJlbl and others added 4 commits August 3, 2023 14:15
Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
guilhem-barthes and others added 9 commits August 3, 2023 14:15
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com>
Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
@SdgJlbl SdgJlbl force-pushed the sarahdiot-girard/fl-1080-isolate-docker-image-builder-in-its-own-service branch from c406c0b to 583f27d Compare August 3, 2023 12:16
@github-actions github-actions bot removed the api label Aug 3, 2023
Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
@SdgJlbl
Copy link
Contributor Author

SdgJlbl commented Aug 3, 2023

/e2e

@Owlfred
Copy link

Owlfred commented Aug 3, 2023

End to end tests: ❌ FAILURE

Jobs status:

  • Camelyon: ⏭️
  • Dispatch Jobs: ✔️
  • Distributed / distributed-sdk:
  • MNIST: ⏭️
  • Standalone / standalone-sdk:

Oh well.

@SdgJlbl
Copy link
Contributor Author

SdgJlbl commented Aug 17, 2023

Closed since the POC now lives on https://github.com/Substra/substra-backend/tree/poc-decoupled-builder

@SdgJlbl SdgJlbl closed this Aug 17, 2023
@SdgJlbl SdgJlbl deleted the sarahdiot-girard/fl-1080-isolate-docker-image-builder-in-its-own-service branch December 14, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants