-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add function event #263
Conversation
FL-1160 Add function event
ContextTranfer these statuses through the orchestrator. Change SpecificationAcceptance criteria |
/e2e |
End to end tests: ✔️ SUCCESS |
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review still in progress
@@ -18,6 +18,23 @@ message FunctionOutput { | |||
bool multiple = 2; | |||
} | |||
|
|||
enum FunctionAction { | |||
FUNCTION_ACTION_UNKNOWN = 0; | |||
FUNCTION_ACTION_BUILDING = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: an action would probably be a verb, something like FUNCTION_ACTION_BUILD
/ Cancel / Fail / Ready
Also, make sure you are consistent (for instance canceling/canceled/cancel) for all the entries.
Edit, after reading other parts of the code: actions should match their statuses:
- build -> building
- cancel -> canceled
- fail -> failed
ready is not clear, does it mean "built"? then build -> built
Created can be confusing, one would expect that it's usable, but actually we want "built". Maybe "pending" or "waiting" would be more explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to rename CREATED to WAITING, but we kept READY as we envision use-cases where we do not build internally in Substra
) | ||
|
||
// functionStateEvents is the definition of the state machine representing function states | ||
var functionStateEvents = fsm.Events{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some doc in docs/assets/function.md to graph the state machine would be super helpful.
@@ -198,7 +200,7 @@ func (d *DBAL) queryFunctions(p *common.Pagination, filter *asset.FunctionQueryF | |||
return functions, bookmark, nil | |||
} | |||
|
|||
// UpdateFunction updates the mutable fields of an function in the DB. List of mutable fields: name. | |||
// UpdateFunction updates the mutable fields of an function in the DB. List of mutable fields: name, status. | |||
func (d *DBAL) UpdateFunction(function *asset.Function) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then that should be UpdateFunctionName
since it only deals with name.
Maybe double check the API: do you need 2 distinct functions here?
server/standalone/dbal/function.go
Outdated
@@ -207,3 +209,12 @@ func (d *DBAL) UpdateFunction(function *asset.Function) error { | |||
|
|||
return d.exec(stmt) | |||
} | |||
|
|||
func (d *DBAL) UpdateFunctionStatus(functionKey string, status asset.FunctionStatus) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you keep this one, maybe worth adding a test case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed and merged call with previous UpdateFunction
Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
## Companion PR - Substra/orchestrator#263 ## Description Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 ## How has this been tested? As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. ## Checklist - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/substra-backend#714 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the `Function`. It also includes another PR (merged here), to have functions build logs working again. Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: guilhem-barthes <guilhem-barthes@users.noreply.github.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/substra-backend#714 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the `Function`. It also includes another PR (merged here), to have functions build logs working again. Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: guilhem-barthes <guilhem-barthes@users.noreply.github.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/substra-backend#714 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the `Function`. It also includes another PR (merged here), to have functions build logs working again. Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: guilhem-barthes <guilhem-barthes@users.noreply.github.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/substra-backend#714 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the `Function`. It also includes another PR (merged here), to have functions build logs working again. Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: guilhem-barthes <guilhem-barthes@users.noreply.github.com>
- Substra/substra-backend#714 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the `Function`. It also includes another PR (merged here), to have functions build logs working again. Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: guilhem-barthes <guilhem-barthes@users.noreply.github.com>
- Substra/substra-backend#714 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the `Function`. It also includes another PR (merged here), to have functions build logs working again. Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: guilhem-barthes <guilhem-barthes@users.noreply.github.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
* feat: decouple image builder from worker Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * fix: update skaffold config Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: add `ServiceAccount` and modify role Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: improve `wait_for_image_built` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: build image in new pod Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * chore: rename `deployment-builder.yaml` to `stateful-builder.yaml` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * chore: rename `stateful-builder.yaml` to `statefulset-builder.yaml` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * chore: centralize params Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: create `BuildTask` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: move some values to `builder` module Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: move more code to `builder` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: remove TaskProfiling as Celery task + save Entrypoint in DB Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * fix: extract entrypoint from registry Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * fix: make doc for helm chart Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * feat: build function at registration (#707) <!-- Please reference issue if any. --> <!-- Please include a summary of your changes. --> <!-- Please describe the tests that you ran to verify your changes. --> - [ ] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com> * feat: share images between backends (#708) Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * chore: update helm worklfow Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> * chore: add .DS_Store to gitignore Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> * chore: rm DS_Store Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> * chore: rm .DS_Store Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> * [sub]fix: add missing migration poc (#728) ## Description Add a migration missing in the poc. This migration alters two things: - modify `ComputeTaskFailureReport.logs` - modify `FunctionImage.file` This migration has been generated automatically with `make migrations` ## How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> ## Checklist - [ ] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * [sub]feat: add function events (#714) - Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com> * [sub]fix(app/orchestrator/resources): FunctionStatus.FUNCTION_STATUS_CREATED -> FunctionStatus.FUNCTION_STATUS_WAITING (#742) # Issue Backend FunctionStatus are not aligned with [orchestrator definitions](https://github.com/Substra/orchestrator/blob/poc-decoupled-builder/lib/asset/function.proto#L29-L36). In particular, `FunctionStatus.FUNCTION_STATUS_CREATED` leading to the following error: ```txt ValueError: 'FUNCTION_STATUS_WAITING' is not a valid FunctionStatus ``` ## Description FunctionStatus.FUNCTION_STATUS_CREATED -> FunctionStatus.FUNCTION_STATUS_WAITING ## How has this been tested? Running Camelyon benchmark on [poc-builder-flpc](https://substra.org-1.poc-builder-flpc.cg.owkin.tech/compute_plans/a420306f-5719-412b-ab9c-688b7bed9c70/tasks?page=1&ordering=-rank) environment. ## Checklist - [ ] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> * fix: builder using builder SA (#754) * fix: builder using builder SA Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * docs: changelog Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> --------- Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * fix: rebase changelog Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * fix: adapt to pydantic 2.x.x (#758) Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * [sub]fix(backend/image_transfert/encoder): update pydantic method (#763) * fix(backend/image_transfert/encoder): update pydantic method Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> * fix(backend/image_transfer/decoder): parse_raw -> model_validate_json Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> --------- Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> * [sub]chore: upgrade chart (#765) * chore(charts): bump chart version Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> * chore(charts/substra-backend/CHANGELOG): bring back unreleased section Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> --------- Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> * fix: post-rebase Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * chore: rationalize migrations Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * [sub]chore(builder): waitPostgresqlInitContainer (#764) * fix: builder using builder SA (#754) * fix: builder using builder SA Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * docs: changelog Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> --------- Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * chore(charts/substra-backend/templates/statefulset-builder): add init-container waitPostgresqlInitContainer Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> --------- Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> Co-authored-by: Guilhem Barthés <guilhem.barthes@owkin.com> --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com> Co-authored-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> Co-authored-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
- Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com>
* feat: decouple image builder from worker Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * fix: update skaffold config Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: add `ServiceAccount` and modify role Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: build image in new pod Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * chore: rename `deployment-builder.yaml` to `stateful-builder.yaml` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * chore: rename `stateful-builder.yaml` to `statefulset-builder.yaml` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * chore: centralize params Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: create `BuildTask` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: move more code to `builder` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: remove TaskProfiling as Celery task + save Entrypoint in DB Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * feat: build function at registration (#707) <!-- Please reference issue if any. --> <!-- Please include a summary of your changes. --> <!-- Please describe the tests that you ran to verify your changes. --> - [ ] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com> * feat: share images between backends (#708) Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * chore: update helm worklfow Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> * [sub]fix: add missing migration poc (#728) ## Description Add a migration missing in the poc. This migration alters two things: - modify `ComputeTaskFailureReport.logs` - modify `FunctionImage.file` This migration has been generated automatically with `make migrations` ## How has this been tested? <!-- Please describe the tests that you ran to verify your changes. --> ## Checklist - [ ] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * [sub]feat: add function events (#714) - Substra/orchestrator#263 Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the Function. It also includes another PR (merged here), to have functions build logs working again. In a future PR, we will change the compute task execution to avoid having to wait_for_function_built in compute_task() Fixes FL-1160 As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com> * [sub]fix(app/orchestrator/resources): FunctionStatus.FUNCTION_STATUS_CREATED -> FunctionStatus.FUNCTION_STATUS_WAITING (#742) # Issue Backend FunctionStatus are not aligned with [orchestrator definitions](https://github.com/Substra/orchestrator/blob/poc-decoupled-builder/lib/asset/function.proto#L29-L36). In particular, `FunctionStatus.FUNCTION_STATUS_CREATED` leading to the following error: ```txt ValueError: 'FUNCTION_STATUS_WAITING' is not a valid FunctionStatus ``` ## Description FunctionStatus.FUNCTION_STATUS_CREATED -> FunctionStatus.FUNCTION_STATUS_WAITING ## How has this been tested? Running Camelyon benchmark on [poc-builder-flpc](https://substra.org-1.poc-builder-flpc.cg.owkin.tech/compute_plans/a420306f-5719-412b-ab9c-688b7bed9c70/tasks?page=1&ordering=-rank) environment. ## Checklist - [ ] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> * fix: rebase changelog Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * feat: decouple image builder from worker Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> * feat: add `ServiceAccount` and modify role Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: build function at registration (#707) <!-- Please reference issue if any. --> <!-- Please include a summary of your changes. --> <!-- Please describe the tests that you ran to verify your changes. --> - [ ] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com> * feat: save status update in orc Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: use status for build waiting Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: re-add `container_image_exists` Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: rebase errors Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: format Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: tests Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: add `si` to building invokations Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: tests Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: apply feedback Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * fix: only import during typing Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * [sub]feat: modify computetask failure report (#727) ## Companion PR - Substra/orchestrator#277 - Substra/substra-frontend#240 ## Description The aim is to allow registering failure reports not only for compute task but for other kind of assets (for now, functions which are not building as part of the execution of a compute task) - Modifies `ComputeTaskFailureReport`: - renamed the model to `AssetFailureReport` - renamed field `compute_task_key` to `asset_key` (as we can now have a function key) - added field `asset_type` to provide - Updates protobuf reflecting the previous changes - refactor `download_file` in `PermissionMixin` to provide mroe flexibility (and decouple from DRF) - create new `FailableTask` (Celery task): - centralize the logic to submit asset failure ## How has this been tested? As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main. ## Checklist - [x] [changelog](../CHANGELOG.md) was updated with notable changes - [ ] documentation was updated --------- Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> * feat: add config to run celery in tests Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * feat: add tests Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * fix: remove rebqse duplicate Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * docs: changelog Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * fix: adapt to pydantic 2.x.x Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * fix: remove rebase artifacts Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> * fix: update to pydantic 2.x.x Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> --------- Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com> Signed-off-by: Guilhem Barthes <guilhem.barthes@owkin.com> Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com> Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com> Co-authored-by: SdgJlbl <sarah.diot-girard@owkin.com> Co-authored-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> Co-authored-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com>
Companion PR
Description
Add function events, used now we decoupled the building of the function with the execution of the compute task. For that it add a status field on the
Function
. It also includes another PR (merged here), to have functions build logs working again.Fixes FL-1160
How has this been tested?
As this is going to be merged on a branch that is going to be merged to a POC branch, we use MNIST as a baseline of a working model. We will deal with failing tests on the POC before merging on main.
Checklist