[MDS-6908] Fix PGSync DevOps Workflows#3899
Merged
alazar-aot merged 8 commits intoMay 7, 2026
Merged
Conversation
ent to the main gitops script, allowing it to accept a parameter for the pare nt directory.
…he script can correctly locate the pgsync deployment in Argo
…Argo wait for the entire service - prevents hangs if another part of the permit service is unhealthy
…ns to provide an ArgoCD app for nested deployments
simensma-fresh
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
MDS-6908
Why are you making this change? Provide a short explanation and/or screenshots
The PGSync - Promote Test and PGSync - Promote PROD GitHub Actions workflows were both non-functional, as PGSync is deployed as part of the Permits service in ArgoCD (
mds-permits-*) rather than having its own top-level GitOps directory. This created a structural mismatch with the shared scripts used by all other services. Subsequent compounding issues caused every workflow run to fail at different stages, all of which have been resolved in this PR.Key Points:
commit.shscript constructed the GitOps file paths assumed a{APP}/overlays/{ENV}/structure, while PGSync's actual path in the GitOps repo waspermits/overlays/{ENV}/pgsync/pgsync.build.dev.yamlwas missing the GitOps update step present in all other dev build workflows, meaning the dev overlay was permanently stuck atgit-commit-placeholderand could never be promoted to test.pgsync.deploy.test.yamlwas missingNEEDS_ROLLOUTconditions on the Notification step, causing it to run unconditionally and hang on every run, including when there was nothing to deploy.watch-deployment.shconstructed the ArgoCD app name asmds-pgsync-test, which does not exist.mds-permits-testargocd app waiton the full permits app caused indefinite hangs due to pre-existing unhealthy resources unrelated to PGSync, making it appear as though PGSync did not deploy successfully when it actually did.run-if-failedjob in both pgsync workflows was completely non-functional - it was missing a checkout step, calling the wrong script (watch-deployment.shinstead ofnotify_discord.sh), and passing insufficient arguments.notify_discord.shhardcoded the ArgoCD link asmds-{APP}-{ENV}, producing a broken link for any bundled service like PGSync.Note that all the changes made are backwards compatible, no existing calls have been broken.
Changes Made:
gitops/commit.sh: Added optional argumentGITOPS_APP_DIR. When provided, resolves GitOps paths as{GITOPS_APP_DIR}/overlays/{ENV}/{APP}/instead of the default.get_overlay_dir()andvalidate_patch_path()helper functions for cleaner path handling and fast, understandable failure messages.gitops/watch-deployment.sh: Added optional argumentARGOCD_APP(ArgoCD app name override) andARGOCD_WAIT(skipsargocd app waitwhen false).--grpc-webflag to all ArgoCD CLI calls to silence related warnings.gitops/notify_discord.sh: Added optional argumentARGOCD_APPand updated the ArgoCD embed link to use it.pgsync.build.dev.yaml: Added SSH agent setup and GitOps push step to write the real commit hash to the dev overlay on each build.services/pgsync/**to the push path trigger.pgsync.deploy.test.yaml: Passed permits as GITOPS_APP_DIR to commit.sh.NEEDS_ROLLOUTconditions to Install oc, oc login, and Notification steps.timeout-minutesfrom 10 to 15.mds-permits-testas ArgoCD app override and false forARGOCD_WAITtowatch-deployment.sh.run-if-failed: added checkout step, replacedwatch-deployment.shwithnotify_discord.sh, passedmds-permits-testas ArgoCD app override.pgsync.deploy.prod.yaml: Same changes as test workflow with prod-appropriate values.