Skip to content

CNTRLPLANE-3997: correct wrangler pages deploy flags for docs publish - #9252

Merged
celebdor merged 1 commit into
openshift:mainfrom
celebdor:cntrlplane-3997-fix-docs-deploy-wrangler
Aug 7, 2026
Merged

CNTRLPLANE-3997: correct wrangler pages deploy flags for docs publish#9252
celebdor merged 1 commit into
openshift:mainfrom
celebdor:cntrlplane-3997-fix-docs-deploy-wrangler

Conversation

@celebdor

@celebdor celebdor commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the failing "Deploy Production" job in the new docs production publishing workflow.

  • wrangler pages deploy (v4) has no --production flag — it never existed in any wrangler version. It only classifies a deployment as production by comparing --branch against the Cloudflare project's configured production branch (isProduction = project.production_branch === branch, confirmed by inspecting the bundled wrangler CLI). Passing --production made the command fail with Unknown argument: production, exit code 1. Replaced it with --branch=main, matching the project's configured production branch, consistent with how the preview job already passes --branch.
  • The ARC runners have no $HOME set, so Wrangler was failing with EACCES: permission denied, mkdir '/.config' trying to write its debug log (non-fatal here, but noisy and worth fixing). Set HOME to ${{ runner.temp }} for the wrangler-action steps in both the reusable deploy workflow and the PR-preview deploy workflow.

Ref: CNTRLPLANE-3997

Test plan

  • Merge and confirm Docs Publish / Deploy Production succeeds and https://hypershift.pages.dev/ updates
  • Open a docs PR and confirm the preview deploy still works and produces https://pr-<number>.hypershift.pages.dev

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved documentation deployment reliability across production and preview environments.
    • Updated production deployments to use the main branch configuration.
    • Ensured deployment processes use a temporary runner directory for consistent execution.

…LANE-3997)

Wrangler 4's `pages deploy` never accepted a `--production` flag; it only
determines production vs. preview by comparing `--branch` against the
Cloudflare project's configured production branch. The docs production
deploy job was passing `--production`, which is an unrecognized argument
and made the job fail with "Unknown argument: production". Replace it
with `--branch=main`, matching the project's configured production
branch, consistent with how the preview job already passes `--branch`.

Also set HOME to the runner temp dir for the wrangler-action steps, since
the ARC runners have no $HOME set and Wrangler was failing to write its
debug log to /.config with EACCES.

Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The documentation deployment workflows now set HOME to ${{ runner.temp }} for Cloudflare Pages deployment steps. The reusable workflow applies this setting to production and preview deployments. Production deployment now targets the main branch instead of using the --production option.

Possibly related PRs

Suggested reviewers: bryan-cox

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only two GitHub Actions YAML workflows; no Ginkgo declarations or test-like files are changed, so this check is not applicable.
Test Structure And Quality ✅ Passed The pull request changes only two GitHub Actions workflow files; it adds or modifies no Ginkgo tests, so the listed test-quality requirements are not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only GitHub Actions workflow steps for Cloudflare Pages; it adds no deployment manifests, operator code, controllers, replicas, affinity, selectors, tolerations, or topology constrai...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The commit changes only two GitHub Actions YAML workflows; it adds no Ginkgo e2e tests or test code, so this compatibility check is not applicable.
No-Weak-Crypto ✅ Passed The PR only adds HOME settings and changes Wrangler to --branch=main; added lines contain no weak algorithms, custom crypto, or secret/token comparisons.
Container-Privileges ✅ Passed The commit changes only GitHub Actions workflows, adding HOME and --branch=main; no privileged, hostPID/Network/IPC, SYS_ADMIN, or escalation settings were added.
No-Sensitive-Data-In-Logs ✅ Passed The diff only adds HOME overrides and changes the Wrangler branch argument; it adds no logging of secrets, tokens, PII, hostnames, or customer data.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the Wrangler Pages deployment flag fix, which is the primary change in the pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: celebdor
Once this PR has been reviewed and has the lgtm label, please assign csrwng for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
openshift-ci Bot requested review from clebs and devguyio August 7, 2026 11:48
@celebdor celebdor added the area/ci-tooling Indicates the PR includes changes for CI or tooling label Aug 7, 2026
@celebdor celebdor changed the title fix(ci): correct wrangler pages deploy flags for docs publish (CNTRLPLANE-3997) CNTRLPLANE-3997: correct wrangler pages deploy flags for docs publish Aug 7, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 7, 2026

Copy link
Copy Markdown

@celebdor: This pull request references CNTRLPLANE-3997 which is a valid jira issue.

Details

In response to this:

Summary

Fixes the failing "Deploy Production" job in the new docs production publishing workflow.

  • wrangler pages deploy (v4) has no --production flag — it never existed in any wrangler version. It only classifies a deployment as production by comparing --branch against the Cloudflare project's configured production branch (isProduction = project.production_branch === branch, confirmed by inspecting the bundled wrangler CLI). Passing --production made the command fail with Unknown argument: production, exit code 1. Replaced it with --branch=main, matching the project's configured production branch, consistent with how the preview job already passes --branch.
  • The ARC runners have no $HOME set, so Wrangler was failing with EACCES: permission denied, mkdir '/.config' trying to write its debug log (non-fatal here, but noisy and worth fixing). Set HOME to ${{ runner.temp }} for the wrangler-action steps in both the reusable deploy workflow and the PR-preview deploy workflow.

Ref: CNTRLPLANE-3997

Test plan

  • Merge and confirm Docs Publish / Deploy Production succeeds and https://hypershift.pages.dev/ updates
  • Open a docs PR and confirm the preview deploy still works and produces https://pr-<number>.hypershift.pages.dev

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
  • Improved documentation deployment reliability across production and preview environments.
  • Updated production deployments to use the main branch configuration.
  • Ensured deployment processes use a temporary runner directory for consistent execution.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 7, 2026
@celebdor
celebdor merged commit 8ddee28 into openshift:main Aug 7, 2026
16 of 20 checks passed
celebdor added a commit that referenced this pull request Aug 7, 2026
Docs Publish only ran on pushes touching docs/** or itself, so changes to
the reusable build/deploy workflows it depends on (e.g. #9252) merged to
main without triggering a production deploy. Add those workflow files to
the path filter and add workflow_dispatch so the deploy can be re-run
manually without needing a docs change.

Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci-tooling Indicates the PR includes changes for CI or tooling jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants