-
Notifications
You must be signed in to change notification settings - Fork 22
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(containers): refactor deployment #754
Draft
lusergit
wants to merge
17
commits into
edgehog-device-manager:feature/application-management
Choose a base branch
from
lusergit:chore/refactor-deployment
base: feature/application-management
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
chore(containers): refactor deployment #754
lusergit
wants to merge
17
commits into
edgehog-device-manager:feature/application-management
from
lusergit:chore/refactor-deployment
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tests will not pass for now as the infrastructure is not complete yet |
lusergit
force-pushed
the
chore/refactor-deployment
branch
4 times, most recently
from
December 5, 2024 14:27
aeb462f
to
a7b9556
Compare
lusergit
force-pushed
the
chore/refactor-deployment
branch
2 times, most recently
from
December 5, 2024 16:39
7d244f6
to
dbd3464
Compare
``` mix ash.gen.resource Edgehog.Containers.Image.Deployment \ --default-actions read,create,update,destroy \ --uuid-primary-key id \ --attribute pulled:boolean:required:public \ --relationship belongs_to:image:Edgehog.Containers.Image \ --relationship belongs_to:device:Edgehog.Devices.Device \ --timestamps ``` Signed-off-by: Luca Zaninotto <[email protected]>
``` mix ash.gen.resource Edgehog.Containers.Container.Deployment --default-actions read,create,update,destroy --uuid-primary-key id --attribute status:Edgehog.Containers.Container.Status:required:public --relationship belongs_to:container:Edgehog.Containers.Container --relationship belongs_to:device:Edgehog.Devices.Device --timestamps ``` Signed-off-by: Luca Zaninotto <[email protected]>
``` mix ash.gen.resource Edgehog.Containers.Network.Deployment --default-actions read,create,update,destroy --uuid-primary-key id --attribute created:boolean:required:public --relationship belongs_to:container:Edgehog.Containers.Network --relationship belongs_to:device:Edgehog.Devices.Device --timestamps ``` Signed-off-by: Luca Zaninotto <[email protected]>
``` mix ash.gen.resource Edgehog.Containers.Volume.Deployment --default-actions read,create,update,destroy --uuid-primary-key id --attribute created:boolean:required:public --relationship belongs_to:container:Edgehog.Containers.Volume --relationship belongs_to:device:Edgehog.Devices.Device --timestamps ``` Signed-off-by: Luca Zaninotto <[email protected]>
moving containers resources to appropriate subfolders, refactoring according to the rest of the project structure Signed-off-by: Luca Zaninotto <[email protected]>
Setting up generated resources Signed-off-by: Luca Zaninotto <[email protected]>
plugging refactor into existing architecture Signed-off-by: Luca Zaninotto <[email protected]>
The `.Deployment` module of each container resource (images, networks, etc.) use the `AshStateMachine` extension Signed-off-by: Luca Zaninotto <[email protected]>
`handle_trigger` handlers for images, networks, volumes and containers now work with deployments Signed-off-by: Luca Zaninotto <[email protected]>
generated migrations for the new structure and resources with ``` mix ash_postgers.gen_migrations containers_refactor ``` Signed-off-by: Luca Zaninotto <[email protected]>
some tests had no more reason to exist Signed-off-by: Luca Zaninotto <[email protected]>
``` mix ash.gen.resource Edgehog.Containers.ReleaseNetworks --relationship belongs_to:release:Edgehog.Containers.Release:primary_key --relationship belongs_to:network:Edgehog.Containers.Network:primary_key --uuid-primary-key id --timestamps ``` Signed-off-by: Luca Zaninotto <[email protected]>
Networks are related to releases instead of single containers Signed-off-by: Luca Zaninotto <[email protected]>
Networks deployment is now demamded to the release and not to the single container anymore Signed-off-by: Luca Zaninotto <[email protected]>
`mix ash_postgres.gen_migrations networks_moved_to_releases` Signed-off-by: Luca Zaninotto <[email protected]>
adjusted fixtures and tests to accomodate for the new flow and architecture Signed-off-by: Luca Zaninotto <[email protected]>
lusergit
force-pushed
the
chore/refactor-deployment
branch
3 times, most recently
from
December 16, 2024 16:20
acd3ce3
to
4834683
Compare
lusergit
force-pushed
the
chore/refactor-deployment
branch
3 times, most recently
from
December 20, 2024 13:04
837226a
to
21640d9
Compare
Signed-off-by: Luca Zaninotto <[email protected]>
lusergit
force-pushed
the
chore/refactor-deployment
branch
from
December 20, 2024 17:01
21640d9
to
2680b1e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR aims to refactor the deployment infrastructure. This should have various benefits:
Deploy
resource (e.g.Image
->Image.Deployment
)Deployment
resource is a state machine that allows transitions based on the semantics of the statesDeployment
resource