Skip to content

Conversation

@mishraomp
Copy link
Contributor

@mishraomp mishraomp commented May 2, 2025

  • Improve Helm release name to specify when PostGIS is used
  • Clean up database user on PR close

Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

Copilot AI review requested due to automatic review settings May 2, 2025 16:54
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 naming conventions used in the deployment and management scripts for the Crunchy PostgreSQL clusters. It updates chart values, action inputs, and workflow commands to reference the new “postgres-crunchy” cluster naming scheme.

  • Updated chart default values for Postgres and PostGIS versions.
  • Added new action inputs for specifying Postgres and PostGIS versions.
  • Renamed all references from “-crunchy” to “-postgres-crunchy” in action and workflow files.

Reviewed Changes

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

File Description
actions/crunchy/charts/crunchy/values.yaml Updates version values to null (~) to force input overrides
actions/crunchy/action.yml Introduces new inputs and adjusts cluster naming to “postgres-crunchy”
.github/workflows/.pr-close.yml Adjusts cleanup commands and cluster reference names
.github/workflows/.deployer-db.yml Updates helm commands and cluster references to align with new naming
Comments suppressed due to low confidence (2)

.github/workflows/.pr-close.yml:151

  • [nitpick] The chained psql commands contain unnecessary backslashes before some invocations, which can reduce code readability. Consider simplifying or reformatting the command chain to enhance clarity.
oc exec -it "${CRUNCHY_PG_PRIMARY_POD_NAME}" -- bash -c "psql -U postgres -d postgres -c "..." && \psql -U postgres -d postgres -c "DROP DATABASE \"app-${{ github.event.number }}\";" && \psql -U postgres -d postgres -c "DROP ROLE \"app-${{ github.event.number }}\";""

actions/crunchy/charts/crunchy/values.yaml:6

  • Using '~' as a version value in YAML will be interpreted as null. Please confirm that downstream processes handle a null value as expected, or consider specifying an explicit version.
postgresVersion: ~

Copy link
Member

@DerekRoberts DerekRoberts left a comment

Choose a reason for hiding this comment

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

LOL! You beat me to your ticket AND to my ticket. Great work. :D

@mishraomp
Copy link
Contributor Author

testing pr close

@mishraomp mishraomp closed this May 2, 2025
@mishraomp mishraomp reopened this May 2, 2025
@mishraomp mishraomp closed this May 2, 2025
@mishraomp mishraomp reopened this May 2, 2025
@DerekRoberts DerekRoberts requested a review from Copilot May 2, 2025 19:20
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 enhances the Helm release naming convention and introduces parameterization for PostgreSQL and PostGIS versions, while also cleaning up the database user on PR close. Key changes include:

  • Updating configuration values in the Helm chart (values.yaml) by replacing explicit version numbers with placeholders.
  • Modifying the action and workflow definitions to compute a unique release name and pass version inputs when deploying the Crunchy PostgreSQL database.
  • Implementing changes in the PR-close workflow to remove the PR-specific database user and drop the associated database and role.

Reviewed Changes

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

File Description
actions/crunchy/charts/crunchy/values.yaml Replaced explicit version numbers with placeholder "~" to defer version specification.
actions/crunchy/action.yml Updated default chart directory, added inputs for version parameters, and integrated release name computation into Helm commands.
.github/workflows/.pr-close.yml Introduced logic to clean up the PR-specific database user and remove the database and role.
.github/workflows/.deployer-db.yml Updated the chart directory and introduced computed release name logic; however, version values remain hard-coded.

@mishraomp
Copy link
Contributor Author

closing to test pr close

@mishraomp mishraomp closed this May 2, 2025
@mishraomp mishraomp reopened this May 2, 2025
@mishraomp
Copy link
Contributor Author

closing to test workflow

@mishraomp mishraomp closed this May 2, 2025
@mishraomp mishraomp reopened this May 2, 2025
@mishraomp mishraomp merged commit e7b8ab9 into main May 2, 2025
29 checks passed
@mishraomp mishraomp deleted the feat/release-name branch May 2, 2025 23:40
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.

3 participants