Skip to content

fix(ci): CCP-6557 - deploy PR Redis with the DEV values, not the base ones - #356

Closed
NikhilMM89 wants to merge 1 commit into
mainfrom
fix/ccp-6557-pr-envs-use-dev-redis-values
Closed

NikhilMM89 wants to merge 1 commit into
mainfrom
fix/ccp-6557-pr-envs-use-dev-redis-values

Conversation

@NikhilMM89

@NikhilMM89 NikhilMM89 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

PR environments deploy Redis with the base values, not DEV's, even though they run in the DEV namespace and share DEV's Redis release.

The mechanism

RELEASE_NAME="${{ github.event.repository.name }}-redis" — common-notify-redis for every caller, with no PR number in it. So a PR that touches charts/redis/ does a helm upgrade on the one shared DEV release.

Which values it uses came from this branch:

if   [ "$environment" == "PROD" ]; then  -f charts/redis/values-prod.yml
elif [ "$environment" == "DEV"  ]; then  -f charts/redis/values-dev.yml
else                                     (base values.yml only)
fi

pr-open.yml never passes environment — the input is documented as "Environment name; omit for PRs". So PRs fell to the else and applied the base profile, which is TEST's, to the DEV release.

What diverges today

base values.yml values-dev.yml
replica.replicaCount 2 1

values-dev.yml pins DEV to 1 replica and says why: "Reduced replicas due to storage constraints (40Gi quota)". A PR deploy quietly scales it to 2 and takes another PVC against that quota.

Why it matters more with two PRs in flight

The result either way is that DEV's Redis config oscillates with whichever pipeline ran last.

The change

PROD and TEST are now named explicitly; everything else — DEV and PRs, which share both the namespace and the release — takes values-dev.yml.

environment before after
PROD values-prod.yml values-prod.yml
TEST base only base only
DEV values-dev.yml values-dev.yml
(empty — a PR) base only values-dev.yml

Only the PR row changes. Verified by running the branch under bash for all four inputs, and the workflow YAML still parses.

How this surfaced

I pushed to #354 and it started run 46564487326, which would have applied the base profile to DEV's shared Redis. I cancelled it during Deploy Crunchy; Deploy Redis and Helm Deploy both show skipped, so nothing was applied.

Not fixed here

The Crunchy selection a few lines up has the same shape:

values_file: ${{ inputs.environment == 'PROD' && 'charts/crunchy/values-prod.yml' || inputs.environment == 'DEV' && 'charts/crunchy/values-dev.yml' || 'charts/crunchy/values.yml' }}

A PR gets charts/crunchy/values.yml there for the same reason. I have not touched it — that is the database, and it deserves its own change with someone who knows the intended PR topology. Worth a ticket.


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:

… ones

The Redis release name is ${repo}-redis for every caller, so a PR that
touches charts/redis/ upgrades the one shared DEV release. PRs pass no
environment, so that upgrade was falling through to the base values.yml -
the TEST profile - and overwriting DEV's own overrides.

Invert the branch: PROD and TEST are named explicitly, everything else
(DEV and PRs, which share the namespace and the release) takes
values-dev.yml.

Today this silently scales DEV's Redis from 1 replica to 2, against the
storage-quota reason values-dev.yml gives for pinning it at 1. It gets
worse with two PRs in flight: #353 adds a master PDB to the base values
that DEV deliberately disables, and #354 enables Sentinel for DEV only,
which a PR deploy would then fail to enable while the app expects it.
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

@NikhilMM89

Copy link
Copy Markdown
Collaborator Author

Folded into #354 to keep the review queue short — same commit, cherry-picked as 80c8d67. Closing this.

The change matters for #354 specifically: without it a PR environment deploys Redis with the base values, so Sentinel would never be enabled while the app chart's DEV/PR profile expects it on 26379. Reviewing it alongside the Sentinel change is the more useful read anyway.

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