-
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 image #288
Conversation
fa578cf
to
6c94da8
Compare
a298c9b
to
b69ecc8
Compare
72d3647
to
01e13e7
Compare
8bdc2b9
to
3f6f539
Compare
FL-1149 Checking Docker images checksums after download
We bypass the check in https://github.com/Substra/substra-backend/blob/b0442bace3c2de6c3d5936c1101fe63098be3887/backend/substrapp/clients/organization.py#L177 because we don't share the checksum with all backends (through a gRPC event) |
66d521c
to
1cde2ff
Compare
04cb078
to
5ccaa18
Compare
e93a611
to
0245a55
Compare
1cde2ff
to
8cb67d4
Compare
79642a3
to
bda611a
Compare
c7cbbfa
to
5fea929
Compare
5fea929
to
b758139
Compare
## Description On top of #288. We remove Image from NewFunction, and we create the Addressable Image with empty strings when we register the Function. We create the `getOrAddAddressable` to avoid multiple creation of the empty Image Addressable. ## 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: ThibaultFy <[email protected]>
Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: SdgJlbl <[email protected]> Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: ThibaultFy <[email protected]>
## Description On top of #288. We remove Image from NewFunction, and we create the Addressable Image with empty strings when we register the Function. We create the `getOrAddAddressable` to avoid multiple creation of the empty Image Addressable. ## 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: ThibaultFy <[email protected]>
b00ef66
to
797dfbe
Compare
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.
Thanks for your contribution ! I don't remember why we decided to not accept Image
to be null, but this looks like a decent solution keeping this in mind
@@ -14,6 +14,50 @@ func (d *DBAL) addAddressable(addressable *asset.Addressable) error { | |||
return d.exec(stmt) | |||
} | |||
|
|||
func (d *DBAL) getOrAddAddressable(addressable *asset.Addressable) 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.
I think that the name could be confusing, as we never get
the object.
Also, if the intent is to add only if it does not exist, we could consider adding a parameter in addAddressable
and when this parameter is set, we could add .Suffix("ON CONFLICT DO NOTHING")
. instead of creating this function. This would avoid a transaction to check if the row exists before the transaction for adding it.
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.
I proposed some changes in that sense. Tell me if it seems ok for you :)
Having a nullable |
Signed-off-by: ThibaultFy <[email protected]>
/e2e --tests sdk --refs orchestrator=feat/add-function-image,substra-backend=feat/check-image-checksum,substra=feat/rename-function-to-archive,substrafl=feat/rename-function-to-archive |
End to end tests: ✔️ SUCCESS “It’s alive! It’s alive!” ― Henry Frankenstein, Frankenstein |
Signed-off-by: ThibaultFy <[email protected]>
Signed-off-by: ThibaultFy <[email protected]>
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.
LGTM 🥇
Description
Add the docker image URI + checksum to the orchestrator
Reviewable commit by commit
Companion PR Substra/substra-backend#739
Fixes FL-1149
How has this been tested?
Checklist