Skip to content

Override output dir for preorpcessor#102

Open
gmechali wants to merge 2 commits into
mainfrom
pathfix
Open

Override output dir for preorpcessor#102
gmechali wants to merge 2 commits into
mainfrom
pathfix

Conversation

@gmechali
Copy link
Copy Markdown
Contributor

@gmechali gmechali commented Jun 3, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the ingestion preprocessing job configuration to append /datacommons to both the ingestion artifacts path and the OUTPUT_DIR environment variable. The review feedback suggests using trimsuffix to sanitize these paths, preventing potential double slashes if the base paths already end with a trailing slash.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +82 to +88
preprocessing_env_variables = [
for env in local.cloud_run_shared_env_variables :
env.name == "OUTPUT_DIR" ? {
name = "OUTPUT_DIR"
value = "${env.value}/datacommons"
} : env
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To prevent potential double slashes (e.g., //datacommons) in the GCS path if env.value already has a trailing slash, consider using trimsuffix to sanitize the path.

  preprocessing_env_variables = [
    for env in local.cloud_run_shared_env_variables :
    env.name == "OUTPUT_DIR" ? {
      name  = "OUTPUT_DIR"
      value = "${trimsuffix(env.value, "/")}/datacommons"
    } : env
  ]

Comment thread infra/dcp/modules/stack/main.tf Outdated
bucket_name = module.storage.artifacts_bucket_name
input_path = var.ingestion_config.input_path
ingestion_artifacts_path = var.ingestion_config.ingestion_artifacts_path
ingestion_artifacts_path = "${var.ingestion_config.ingestion_artifacts_path}/datacommons"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To prevent potential double slashes (e.g., //datacommons) in the GCS path if var.ingestion_config.ingestion_artifacts_path already has a trailing slash, consider using trimsuffix to sanitize the path.

  ingestion_artifacts_path = "${trimsuffix(var.ingestion_config.ingestion_artifacts_path, "/")}/datacommons"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant