Hey All, i am using Dagster Cloud hybrid deployme...
# ask-community
a
Hey All, i am using Dagster Cloud hybrid deployment, and using github actions to deploy my code locations : i have few observations/questions: • i am running one code locations per docker image, (we are storing docker image in ECR), one docker image per location is a good approach ? • when i deploy one code location, github actions runs all code locations and deploy all of them even though there were no changes in other code locations, how to handle this situation where it deploys only the code location where the changes are done. following this github workflow, hybrid quick start workflow
s
Hi Ashish - having one docker image per code location is reasonable. We are close to releasing a new version of the quickstart workflow that will let you select a subset of the code locations you want to deploy. You will still have to write some code to determine which code locations to deploy. Is there a way you can determine which code locations are affected in a PR? Here are some details for the new hybrid workflow: https://dagster.slack.com/archives/C02LJ7G0LAZ/p1682701968388629?thread_ts=1682699356.463789&cid=C02LJ7G0LAZ
a
Hi, i have implemented this, however i am getting error in this step, https://github.com/dagster-io/dagster-cloud-hybrid-quickstart/blob/main/.github/workflows/dagster-cloud-deploy.yml#L137
│ │     self = <repr-error "'FileStore' object has no attribute 'statedir'"> │ │
Fixed it by adding validate and init steps
👍 1
Hey Shalabh, since we merged the main deployment and branch deployment CI/CD in github, thanks to the repo you have pointed is this still valid documentation (https://docs.dagster.io/guides/dagster/branch_deployments#step-2-configure-our-job-for-each-environment), should i create clone in github workflow and then delete or should we leave it up to the actual job to handle it. we do not have one database, we have multiple databases to get data from. what are your thoughts ?
s
Hi Ashish - I see the documentation that mention
branch_deployments.yaml
is out of date. However you can use the same actions in your combined cicd yaml. You will just need to modify the condition for cloning, instead of `
Copy code
if: github.event.action != 'closed'
you should just use something like
Copy code
if: github.event.action == 'opened' || 'reopened'
The action to delete a database clone, should work as is since it uses
if: github.event.action == 'closed'
. I'm not sure what you mean by "leave it up to the actual job to handle it". Typically you will have a clone-db job (and a delete-cloned-db job), but these jobs will be launched from the github action when a PR is opened (or closed).