Commit c8fb4ae
fix(ci): fix RHDH OCP Orchestrator Helm e2e job failures (#3929)
* fix(ci): add SSL support for external PostgreSQL in sonataflow database creation
Signed-off-by: Chad Crum <ccrum@redhat.com>
* fix(ci): remove redundant hardcoded PGSSLMODE export
PGSSLMODE was being set twice in the database creation and verification
pods: hardcoded to 'require' via export, and also injected as an env var
from the postgres-cred secret. The export overrode the secret value,
making the secret-based env var misleading. Remove the hardcoded export
so PGSSLMODE is sourced solely from the secret, consistent with all
other connection parameters.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* fix(ci): remove redundant verify_sonataflow_database function
The verification function spun up a separate pod just to run
`\l | grep sonataflow`, but its result was non-blocking — failures
logged a warning and continued anyway. The creation function already
reports success/failure, making this an unnecessary extra pod and
additional CI time for no actionable outcome.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* fix(ci): add timeout to sonataflow database job wait loop
The loop waiting for the create-sonataflow-database job had no upper
bound, so a silent helm install failure would spin indefinitely until
the Prow timeout killed the entire CI job. Add a 5-minute cap (60
attempts x 5s) with a clear error message and namespace job listing
to aid debugging.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* style: fix prettier formatting in utils.sh
Signed-off-by: Chad Crum <ccrum@redhat.com>
* fix(ci): parameterize PostgreSQL namespace in RBAC helm deploy
The externalDBHost was hardcoded to the postgress-external-db namespace,
but nightly Prow jobs create it as postgress-external-db-nightly. Use
NAME_SPACE_POSTGRES_DB env var via --set override to inject the correct
hostname at deploy time.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <ccrum@redhat.com>
* fix(ci): fail fast when jobs-service rollout times out
Previously a failed rollout just logged a warning and continued to
deploy workflows, wasting CI time on guaranteed failures. Now
rbac_deployment returns 1 so the job fails with a clear root cause.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* docs(ci): document perform_helm_install pass-through args
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* fix(ci): clean up failed helm create-sonataflow-database job
The helm chart's create-sonataflow-database job is expected to fail
due to missing PGSSLMODE, and we replace it with a manual database
creation. Delete the failed job afterwards so it doesn't linger in
the namespace and show up in monitoring or alerts.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* fix(ci): restore reactive datasource URL and SSL require mode
The SonataFlowPlatform patch was accidentally changed: SSL mode was
downgraded from 'require' to 'allow' (allowing silent plaintext
fallback), the env var was renamed, and QUARKUS_DATASOURCE_REACTIVE_URL
was dropped entirely. Restore the full reactive datasource URL with
SSL connection params and set SSL mode back to 'require'. Also
parameterize the postgres namespace instead of hardcoding it.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* fix(ci): use exact job lookup instead of grep in wait loop
Replace `oc get jobs | grep | wc -l` with a direct `oc get job/<name>`
lookup. This avoids false positives from substring matches and is
simpler to read.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* fix(ci): use quoted heredoc with envsubst for pod YAML template
Replace unquoted heredoc (requiring fragile backslash escaping of k8s
env var references) with a quoted heredoc and selective envsubst for
the namespace variable. This eliminates the risk of accidental shell
expansion corrupting the pod spec.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* fix(ci): pre-delete database creation pod to avoid AlreadyExists
If a previous run was killed mid-execution, the create-sonataflow-db-manual
pod may still exist. Delete it before applying the new pod spec to
prevent AlreadyExists failures on retry.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* refactor(ci): convert database creation pod to a k8s Job
Replace the bare Pod + manual poll/cleanup loop with a proper Job
resource. This gives us automatic retries (backoffLimit: 3), built-in
TTL cleanup (ttlSecondsAfterFinished: 120), and replaces ~40 lines of
hand-rolled polling with a single oc wait --for=condition=complete.
Failure vs timeout is distinguished by inspecting job status.
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* style: fix prettier formatting in utils.sh
Signed-off-by: Chad Crum <ccrum@redhat.com>
Made-with: Cursor
* fix(ci): wait for PostgreSQL readiness instead of sleep 5
The hardcoded sleep 5 was a race condition — postgres may not be ready
when secrets are extracted or when sonataflow services connect. Use
oc wait to block until the master pod is actually accepting connections.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <ccrum@redhat.com>
* fix(ci): poll for PostgreSQL master pod before oc wait
oc wait fails with "no matching resources found" when the Crunchy PGO
operator hasn't created the master pod yet. Add a bounded poll loop
(60s timeout) to wait for pod creation before calling oc wait.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <ccrum@redhat.com>
* style: fix prettier formatting in utils.sh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <ccrum@redhat.com>
* fix(ci): increase PostgreSQL pod creation timeout to 300s
60s was not enough for the Crunchy PGO operator to reconcile and create
the master pod after namespace recreation. Increase to 300s to match
the oc wait readiness timeout.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <ccrum@redhat.com>
---------
Signed-off-by: Chad Crum <ccrum@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 3d7b45e commit c8fb4ae
1 file changed
+131
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
336 | 350 | | |
337 | 351 | | |
338 | 352 | | |
| |||
798 | 812 | | |
799 | 813 | | |
800 | 814 | | |
| 815 | + | |
801 | 816 | | |
802 | 817 | | |
803 | 818 | | |
804 | 819 | | |
| 820 | + | |
805 | 821 | | |
806 | 822 | | |
807 | 823 | | |
808 | 824 | | |
809 | 825 | | |
810 | 826 | | |
811 | | - | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
812 | 906 | | |
813 | 907 | | |
814 | 908 | | |
| |||
834 | 928 | | |
835 | 929 | | |
836 | 930 | | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
842 | 947 | | |
843 | 948 | | |
844 | | - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
845 | 959 | | |
846 | | - | |
| 960 | + | |
847 | 961 | | |
848 | 962 | | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
849 | 970 | | |
850 | 971 | | |
851 | 972 | | |
| |||
1254 | 1375 | | |
1255 | 1376 | | |
1256 | 1377 | | |
1257 | | - | |
| 1378 | + | |
1258 | 1379 | | |
1259 | 1380 | | |
1260 | 1381 | | |
| |||
0 commit comments