Skip to content

jir-ogc#561

Merged
jirhiker merged 1 commit intostagingfrom
jir-ogc
Feb 27, 2026
Merged

jir-ogc#561
jirhiker merged 1 commit intostagingfrom
jir-ogc

Conversation

@jirhiker
Copy link
Member

Why

This PR addresses the following problem / context:

  • Use bullet points here

How

Implementation summary - the following was changed / added / removed:

  • Use bullet points here

Notes

Any special considerations, workarounds, or follow-up work to note?

  • Use bullet points here

Copilot AI review requested due to automatic review settings February 27, 2026 19:17
@jirhiker jirhiker merged commit 8035735 into staging Feb 27, 2026
9 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the GitHub Actions CI/CD workflows to use a centralized template file with envsubst for generating the app.yaml configuration file used in Google Cloud deployments. This improves maintainability by eliminating duplicated inline YAML generation across staging and production workflows.

Changes:

  • Refactored staging and production deployment workflows to use envsubst with a shared template file
  • Added .github/app.template.yaml containing the Google App Engine deployment configuration template
  • Added docs/ directory to .gitignore

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
.gitignore Added docs/ directory to be ignored by git
.github/workflows/CD_staging.yml Replaced inline YAML generation with envsubst-based template rendering for staging deployments
.github/workflows/CD_production.yml Replaced inline YAML generation with envsubst-based template rendering for production deployments
.github/app.template.yaml New shared template file for Google App Engine deployment configuration

Comment on lines +66 to +67
PYGEOAPI_POSTGRES_HOST: "${{ vars.PYGEOAPI_POSTGRES_HOST || '127.0.0.1' }}"
PYGEOAPI_POSTGRES_PORT: "${{ vars.PYGEOAPI_POSTGRES_PORT || '5432' }}"
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

GitHub Actions does not support the || operator for providing default values in the env context. The expression ${{ vars.PYGEOAPI_POSTGRES_HOST || '127.0.0.1' }} will always evaluate to the first value (even if empty) rather than falling back to the default. Consider using a separate step to set defaults, or use a ternary expression like ${{ vars.PYGEOAPI_POSTGRES_HOST != '' && vars.PYGEOAPI_POSTGRES_HOST || '127.0.0.1' }}.

Suggested change
PYGEOAPI_POSTGRES_HOST: "${{ vars.PYGEOAPI_POSTGRES_HOST || '127.0.0.1' }}"
PYGEOAPI_POSTGRES_PORT: "${{ vars.PYGEOAPI_POSTGRES_PORT || '5432' }}"
PYGEOAPI_POSTGRES_HOST: "${{ vars.PYGEOAPI_POSTGRES_HOST != '' && vars.PYGEOAPI_POSTGRES_HOST || '127.0.0.1' }}"
PYGEOAPI_POSTGRES_PORT: "${{ vars.PYGEOAPI_POSTGRES_PORT != '' && vars.PYGEOAPI_POSTGRES_PORT || '5432' }}"

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +67
PYGEOAPI_POSTGRES_HOST: "${{ vars.PYGEOAPI_POSTGRES_HOST || '127.0.0.1' }}"
PYGEOAPI_POSTGRES_PORT: "${{ vars.PYGEOAPI_POSTGRES_PORT || '5432' }}"
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

GitHub Actions does not support the || operator for providing default values in the env context. The expression ${{ vars.PYGEOAPI_POSTGRES_PORT || '5432' }} will always evaluate to the first value (even if empty) rather than falling back to the default. Consider using a separate step to set defaults, or use a ternary expression like ${{ vars.PYGEOAPI_POSTGRES_PORT != '' && vars.PYGEOAPI_POSTGRES_PORT || '5432' }}.

Suggested change
PYGEOAPI_POSTGRES_HOST: "${{ vars.PYGEOAPI_POSTGRES_HOST || '127.0.0.1' }}"
PYGEOAPI_POSTGRES_PORT: "${{ vars.PYGEOAPI_POSTGRES_PORT || '5432' }}"
PYGEOAPI_POSTGRES_HOST: "${{ vars.PYGEOAPI_POSTGRES_HOST != '' && vars.PYGEOAPI_POSTGRES_HOST || '127.0.0.1' }}"
PYGEOAPI_POSTGRES_PORT: "${{ vars.PYGEOAPI_POSTGRES_PORT != '' && vars.PYGEOAPI_POSTGRES_PORT || '5432' }}"

Copilot uses AI. Check for mistakes.
PYGEOAPI_POSTGRES_PORT: "${{ vars.PYGEOAPI_POSTGRES_PORT || '5432' }}"
PYGEOAPI_POSTGRES_PASSWORD: "${{ secrets.PYGEOAPI_POSTGRES_PASSWORD }}"
PYGEOAPI_SERVER_URL: "${{ vars.PYGEOAPI_SERVER_URL }}"
CLOUD_SQL_IAM_AUTH: "true"
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The CLOUD_SQL_IAM_AUTH value has been changed from a boolean true to a string "true". While YAML will treat both as truthy values, this may cause issues if the application code expects a boolean type. Verify that the application correctly handles string values for this environment variable, or consider using true without quotes to maintain consistency with the previous implementation.

Copilot uses AI. Check for mistakes.
PYGEOAPI_POSTGRES_PORT: "${{ vars.PYGEOAPI_POSTGRES_PORT || '5432' }}"
PYGEOAPI_POSTGRES_PASSWORD: "${{ secrets.PYGEOAPI_POSTGRES_PASSWORD }}"
PYGEOAPI_SERVER_URL: "${{ vars.PYGEOAPI_SERVER_URL }}"
CLOUD_SQL_IAM_AUTH: "true"
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The CLOUD_SQL_IAM_AUTH value has been changed from a boolean true to a string "true". While YAML will treat both as truthy values, this may cause issues if the application code expects a boolean type. Verify that the application correctly handles string values for this environment variable, or consider using true without quotes to maintain consistency with the previous implementation.

Suggested change
CLOUD_SQL_IAM_AUTH: "true"
CLOUD_SQL_IAM_AUTH: true

Copilot uses AI. Check for mistakes.
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.

2 participants