Skip to content

refactor(ci): modularize aws.sh with namespace prefixes and deduplication (RHIDP-11714)#4327

Merged
openshift-merge-bot[bot] merged 8 commits intoredhat-developer:mainfrom
gustavolira:refactor-ci-last-parts
Mar 5, 2026
Merged

refactor(ci): modularize aws.sh with namespace prefixes and deduplication (RHIDP-11714)#4327
openshift-merge-bot[bot] merged 8 commits intoredhat-developer:mainfrom
gustavolira:refactor-ci-last-parts

Conversation

@gustavolira
Copy link
Copy Markdown
Member

Summary

  • Refactor aws.sh (RHIDP-11714): Add source-once guard, remove dead code (aws_configure, aws_eks_get_load_balancer_hostname), extract _aws::get_hosted_zone_id (4x dedup) and _aws::apply_route53_change (3x dedup) helpers, namespace all functions with aws::/_aws:: prefixes, migrate bare echo to log:: calls, replace fragile cat/sed -i JSON construction in cleanup with jq, use mktemp instead of fixed /tmp/ paths, add input validation to public functions
  • Update callers in eks-helm.sh and eks-operator.sh to use new namespaced function names
  • Fix EKS operator deployment: Make PostgresCluster CRD check non-blocking — on EKS the Crunchy operator is not installed, so the RHDH operator uses the built-in StatefulSet database instead

Test plan

  • cd .ibm && yarn shellcheck — passes with no new warnings
  • cd .ibm && yarn prettier:check — formatting passes
  • grep -r "generate_dynamic_domain_name\|get_eks_certificate\|configure_eks_ingress_and_dns\|cleanup_eks_dns_record" .ibm/pipelines/ — returns zero hits (all old names replaced)
  • Verify EKS Helm nightly job passes
  • Verify EKS Operator nightly job passes

🤖 Generated with Claude Code

@gustavolira
Copy link
Copy Markdown
Member Author

/test e2e-eks-helm-nightly

@github-actions
Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@gustavolira
Copy link
Copy Markdown
Member Author

/test e2e-eks-operator-nightly

@gustavolira
Copy link
Copy Markdown
Member Author

/test e2e-eks-helm-nightly

Comment thread .ibm/pipelines/install-methods/operator.sh Outdated
gustavolira and others added 6 commits March 4, 2026 14:31
…tion

RHIDP-11714

- Add source-once guard and module description header
- Remove dead code: aws_configure(), aws_eks_get_load_balancer_hostname()
- Extract _aws::get_hosted_zone_id (4x duplication) and
  _aws::apply_route53_change (3x duplication) private helpers
- Rename all functions with aws::/_aws:: namespace prefixes
- Replace fragile cat/sed JSON construction in cleanup with jq
- Use mktemp instead of fixed /tmp/ paths to prevent race conditions
- Migrate bare echo/echo >&2 to log:: functions, remove emoji from messages
- Add input validation to public functions
- Update callers in eks-helm.sh and eks-operator.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace fragile $? checks with `if ! var=$(cmd)` pattern in
aws::generate_domain_name and aws::get_certificate to prevent
accidental return code clobbering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…xplicitly

Convert three remaining $? patterns in aws::get_certificate to idiomatic
`if ! var=$(cmd)` style. Refactor aws::configure_ingress_and_dns to accept
domain_name as explicit parameter instead of reading EKS_INSTANCE_DOMAIN_NAME
global, improving testability and reducing hidden coupling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion

Replace 7 duplicated "Missing required parameter" blocks with a single
_aws::require_param helper that centralizes validation, error logging,
and optional usage hints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… deployment

On EKS, the Crunchy Postgres operator is not installed so the CRD check
always times out and fails. The RHDH operator supports both Crunchy
PostgresCluster and built-in StatefulSet databases, so the CRD check
should be informational rather than a hard failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address review feedback: the CRD is required because the operator
relies on CrunchyDB for its internal database. Revert to blocking
check with return 1 on failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gustavolira gustavolira force-pushed the refactor-ci-last-parts branch from 9d85d22 to 19822b4 Compare March 4, 2026 17:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Image was built and published successfully. It is available at:

@gustavolira
Copy link
Copy Markdown
Member Author

/test e2e-eks-helm-nightly

The showcase-k8s project only excluded token-propagation-workflow but
allowed other orchestrator tests to run, which fail because orchestrator
infrastructure is never installed on K8s environments. Align with
showcase-rbac-k8s which already excludes all orchestrator tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gustavolira
Copy link
Copy Markdown
Member Author

https://redhat-internal.slack.com/archives/C07D05S8U82/p1772512617636149
EKS on nightly is not even running, so my PR is on a better shape hahaha

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@gustavolira
Copy link
Copy Markdown
Member Author

/test e2e-eks-helm-nightly

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 4, 2026

@gustavolira: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-eks-operator-nightly 9d85d22 link false /test e2e-eks-operator-nightly
ci/prow/e2e-eks-helm-nightly 9ad2533 link false /test e2e-eks-helm-nightly

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

…uire_param

Address SonarQube code smell: positional parameters $1, $2, $3
should be assigned to named local variables for readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 5, 2026

The container image build and publish workflows were skipped (either due to [skip-build] tag or no relevant changes with existing image).

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 5, 2026

@subhashkhileri
Copy link
Copy Markdown
Member

/lgtm

@openshift-merge-bot openshift-merge-bot Bot merged commit 80525d5 into redhat-developer:main Mar 5, 2026
16 checks passed
@zdrapela
Copy link
Copy Markdown
Member

/cherry-pick release-1.9

@openshift-cherrypick-robot
Copy link
Copy Markdown
Contributor

@zdrapela: #4327 failed to apply on top of branch "release-1.9":

Applying: refactor(ci): modularize aws.sh with namespace prefixes and deduplication
Using index info to reconstruct a base tree...
M	.ci/pipelines/jobs/eks-helm.sh
M	.ci/pipelines/jobs/eks-operator.sh
Falling back to patching base and 3-way merge...
Auto-merging .ci/pipelines/jobs/eks-operator.sh
CONFLICT (content): Merge conflict in .ci/pipelines/jobs/eks-operator.sh
Auto-merging .ci/pipelines/jobs/eks-helm.sh
CONFLICT (content): Merge conflict in .ci/pipelines/jobs/eks-helm.sh
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 refactor(ci): modularize aws.sh with namespace prefixes and deduplication

Details

In response to this:

/cherry-pick release-1.9

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

"**/playwright/e2e/dynamic-home-page-customization.spec.ts",
"**/playwright/e2e/plugins/scorecard/scorecard.spec.ts",
"**/playwright/e2e/plugins/orchestrator/token-propagation-workflow.spec.ts",
"**/playwright/e2e/plugins/orchestrator/**/*.spec.ts",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@gustavolira can you please backport this PR, or at least this fix to release-1.9?

gustavolira added a commit to gustavolira/rhdh that referenced this pull request Mar 13, 2026
…from redhat-developer#4327)

Backport the playwright config fix from PR redhat-developer#4327 to release-1.9.
Adds orchestrator/**/*.spec.ts glob pattern to SHOWCASE_K8S testIgnore
to properly exclude all orchestrator tests in K8S test runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
openshift-merge-bot Bot pushed a commit that referenced this pull request Mar 13, 2026
…from #4327) (#4406)

Backport the playwright config fix from PR #4327 to release-1.9.
Adds orchestrator/**/*.spec.ts glob pattern to SHOWCASE_K8S testIgnore
to properly exclude all orchestrator tests in K8S test runs.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants