CHIMEFRB / workflow

🌊 Working in flowstate.
0 stars 0 forks source link

59 feature deployment configuration #61

Closed chrisfandrade16 closed 4 months ago

chrisfandrade16 commented 4 months ago

Closes #59

I had to create a custom model DockerDeployerNetwork because there was no "network" model in the Docker SDK for Python that resembled what docker.APIClient.create_network expects. There is docker.types.NetworkingConfig, docker.types.NetworkAttachmentConfig, and docker.models.networks.Network, but they don't directly match what the input for docker.APIClient.create_network is, nor what the networks section of Docker Compose expects.

And of course, I created a WorkspaceDockerDeployer model too, to describe the type of the deployers field in Workspace. I could've added workflow-pipelines as a dependency, and then just use DockerDeployer, but the fields were slightly different (e.g. client, secrets, deploy_wait_time, deploy_max_replicas, and some Union on most fields' types because they differ before/after validator transformations).

Though if we feel it's better to import workflow-pipelines, we can maybe(?) make it work by making some changes in DockerDeployer through a PR in workflow-pipelines.

shinybrar commented 4 months ago

Great and efficient job on this PR.