Skip to content

Commit

Permalink
fixed major bug
Browse files Browse the repository at this point in the history
  • Loading branch information
palladius committed Mar 8, 2024
1 parent 5d49bdb commit 84dd976
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/auto_import_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
REPO_NAME: 'my-awesome-app'
# These work! Just make sure you do it in ORDER. (God bless python dicts naivity)
BUCKET: "gs://my-unique-${PROJECT_ID}-bucket"
IMAGE_URI: "${REGION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/my_vertex_image:latest"
IMAGE_URI: "${GCP_REGION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/my_vertex_image:latest"
'''
# python is ugly: https://stackoverflow.com/questions/17215400/format-string-unused-named-arguments doesnt help.

Expand All @@ -105,6 +105,7 @@ def execute(command):
print(f"[DRYRUN] 🔞 {command}")
else:
# executing for real.. no excuses!
#print(f"💻 Executing for real: {command}")
os.system(command)

# def get_project_number_from_wrong(project_id):
Expand Down Expand Up @@ -202,7 +203,7 @@ def inject_all_configs(config_data):

# gcloud config ('gcloud' stanza)
for property_name, value in properties['gcloud'].items():
execute(f"echo gcloud config set {property_name} {value} --configuration {config_name}")
execute(f"gcloud config set {property_name} {value} --configuration {config_name}")
if property_name == 'project':
opinionated_properties['PROJECT_ID'] = value
pn = get_project_number_from(value)
Expand Down

0 comments on commit 84dd976

Please sign in to comment.