Open abdennebi opened 5 years ago
Hi,
I'm not sure if I understand completely your setup.
You using type: gs://MY TEMPLATES BUCKET/templates/gcs_bucket/gcs_bucket.py
in your config.yaml. This makes DM use type: gs://MY TEMPLATES BUCKET/templates/gcs_bucket/gcs_bucket.py
and type: gs://MY TEMPLATES BUCKET/templates/gcs_bucket/gcs_bucket.py.schema
.
And above this, you have
imports:
- path: gcs_bucket.py
in your .schema file?
If that is your setup, the Schema doesn't need to reference (import) the template which it is defining. it COULD reference further dependencies, however I never tested chained references in case the templates are stored in GCS.
Think about the config.yaml and schema imports this way: They need to reference all files, which DM collects before it executes the python/jinja run.
And in you case, yes: if you use - path: gcs_bucket.py
that's referencing for a local file.
@Abdennebi Can you please provide more info?
Hi,
I'am storing the templates into cloud storage. For exemple to create a bucket, my config looks like this : resources:
When running the deployment manager, I'm geeting the following error:
In fact, the schema is referencing
gcs_bucket.py
which the deployment likely cannot find (I presume because it's not stored localy):A workaround for this is to simply remove the import.
Is this import mandatory? Can we get rid of it ? (This import is not present in all templates)
Thanks for your help,