Skip to content

feat!: drop legacy reverseproxy and website relations - #700

Merged
Thanhphan1147 merged 18 commits into
mainfrom
foreman/ISD-6909
Nov 16, 2026
Merged

Thanhphan1147 merged 18 commits into
mainfrom
foreman/ISD-6909

Conversation

@Thanhphan1147

@Thanhphan1147 Thanhphan1147 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

  • Removes the legacy reverseproxy and website relation endpoints, the legacy HTTP interface implementation (src/http_interface.py), the legacy HAProxy config template, and src/legacy.py.
  • Drops the legacy proxy mode from CharmState and the corresponding reconcile path in charm.py.
  • Removes unit and integration tests and fixtures that exercised the legacy relations, and updates Terraform outputs and relation-endpoint documentation.
  • Fixes the shared CI infrastructure:
    • spread.yaml no longer passes --storage to juju add-k8s on Juju 4, where the flag was removed. It keeps --storage csi-rawfile-default for the Juju 3 test_oauth_spoe task.
    • The docs tutorial spread check verifies the Pollen route with curl because pollinate cannot write to syslog in the spread environment. The human-facing pollinate instructions remain in the tutorial.
  • Adds .opencode/ to .gitignore so agent state is never committed.

Why we need it

ISD-6909 drops support for the deprecated legacy relations. The CI changes unblock the shared integration and docs checks after the Juju 4.1 and CK8s environment changes.

Checklist

  • I followed the contributing guide
  • I added or updated the documentation (if applicable)
  • I updated docs/changelog.md with user-relevant changes
  • I added a change artifact for user-relevant changes in docs/release-notes/artifacts. If no change artifact is necessary, I tagged the PR with the label no-release-note.
  • I used AI to assist with preparing this PR
  • I added or updated tests as needed (unit and integration)
  • If integration test modules are used: I updated the workflow configuration
    (e.g., in .github/workflows/integration_tests.yaml, ensure the modules list is correct)
  • If this PR involves a Grafana dashboard: I added a screenshot of the dashboard
  • If this PR involves Terraform: terraform fmt passes and tflint reports no errors

Test plan

  • tox -e lint,unit in haproxy-operator/: 364 unit tests passed, lint clean.
  • opcli tutorial expand on docs/tutorial/getting-started.md: generated spread script uses the new curl route check and excludes the pollinate block.
  • spread.yaml parses as valid YAML.
  • Integration and docs spread jobs pass on the PR. Two unrelated flaky integration jobs (a bind install failure and a postgresql storage-attached failure) passed on rerun.

Review focus

  • Juju major-version detection in the tests/integration/ spread prepare step.
  • The SPREAD SKIP approach that keeps the tutorial's pollinate instructions for humans while testing the route with curl in CI.
  • Confirm that removing the remaining legacy fixtures does not drop coverage of current features.

Potential breaking changes

  • The reverseproxy and website relation endpoints are removed. Integrators must use haproxy-route or haproxy-route-tcp.

New dependencies, APIs, modules, or workflow changes

  • No new dependencies or APIs.
  • spread.yaml prepare logic now depends on the installed Juju major version.

Move the haproxy charm base to ubuntu@26.04, which provides HAProxy 3.2, and publish the charm on the 3.2 track. Update integration tests, Terraform defaults, docs, and CI promotion workflows, and add a workload version check.
- Keep the hacluster fixture on ubuntu@24.04 and xfail the HA test since
  hacluster does not support ubuntu@26.04.
- Remove the workload version integration test.
- Document high availability with the keepalived subordinate charm instead
  of the deprecated hacluster charm.
Comment thread haproxy-operator/src/haproxy.py Resolved
Comment thread haproxy-operator/src/haproxy.py Resolved
@Thanhphan1147
Thanhphan1147 marked this pull request as ready for review November 2, 2026 23:35
@Thanhphan1147
Thanhphan1147 requested a review from a team as a code owner November 2, 2026 23:35
Send the HTTP/TCP request inside the log-hash retry loop so it is logged by the reloaded HAProxy worker. Retry the route-policy relation update when the any-charm requirer runs before the relation is ready. Keep grafana-agent, hacluster and keepalived on ubuntu@24.04 in the terraform product module, and pin the terraform test deployment to the published 2.8/edge revision while the 3.2 track is not yet available.
@Thanhphan1147
Thanhphan1147 requested a lite review from Copilot November 3, 2026 10:21
@Thanhphan1147
Thanhphan1147 marked this pull request as ready for review November 3, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The breaking removal of live Juju relation endpoints and legacy reconciliation remains insufficiently validated because runtime tests, integration checks, and Sphinx documentation/lint builds could not run, requiring CI or human verification.

No open issues 🎉

What changed in this PR

This breaking change removes the deprecated reverseproxy and website relations and their legacy HAProxy implementation, leaving the supported haproxy-route integrations.

Changes:

  • Removed legacy relation interfaces, reconciliation logic, state mode, template, endpoints, tests, and fixtures.
  • Updated Terraform outputs, charm metadata, coverage configuration, and service reload tests.
  • Updated relation documentation and release notes to reflect the breaking removal.
File Description
terraform/​product/​outputs.tf Removes the product-level reverseproxy requirement output.
terraform/​charm/​haproxy/​outputs.tf Removes the HAProxy module’s reverseproxy requirement output.
haproxy-operator/​tests/​unit/​test_state.py Updates state tests for removal of the legacy relation.
haproxy-operator/​tests/​unit/​test_haproxy_service.py Tests consolidated reload failure handling.
haproxy-operator/​tests/​integration/​legacy/​test_website.py Removes legacy website relation integration coverage.
haproxy-operator/​tests/​integration/​legacy/​test_http_interface.py Removes legacy reverse-proxy integration coverage.
haproxy-operator/​tests/​integration/​legacy/​conftest.py Removes fixtures used by legacy relation tests.
haproxy-operator/​templates/​haproxy_legacy.cfg.j2 Removes the legacy HAProxy configuration template.
haproxy-operator/​src/​state/​charm_state.py Removes legacy proxy mode and validation inputs.
haproxy-operator/​src/​legacy.py Removes the legacy HAProxy implementation.
haproxy-operator/​src/​http_interface.py Removes the legacy HTTP relation implementation.
haproxy-operator/​src/​haproxy.py Removes legacy reconciliation and consolidates reload errors.
haproxy-operator/​src/​charm.py Removes legacy endpoints, handlers, observers, and reconciliation paths.
haproxy-operator/​pyproject.toml Removes coverage exclusion for the deleted legacy module.
haproxy-operator/​charmcraft.yaml Removes the reverseproxy and website endpoints.
docs/​release-notes/​artifacts/​pr0700.yaml Documents the breaking removal and supported replacements.
docs/​reference/​relation-endpoints.md Removes legacy endpoint documentation and examples.

Review effort: Lite

@Thanhphan1147

Copy link
Copy Markdown
Collaborator Author

[merge bot]: This PR is now being monitored to automatically rerun failing tests

Co-authored-by: Thanhphan1147 <42444001+Thanhphan1147@users.noreply.github.com>
@Thanhphan1147
Thanhphan1147 marked this pull request as ready for review November 13, 2026 17:14
@Thanhphan1147
Thanhphan1147 enabled auto-merge (squash) November 13, 2026 17:14
@Thanhphan1147
Thanhphan1147 marked this pull request as draft November 16, 2026 06:48
auto-merge was automatically disabled November 16, 2026 06:48

Pull request was converted to draft

Juju 4 removed the --storage flag from add-k8s. Detect the Juju major
version and only pass --storage on Juju 3, which is still used by the
test_oauth_spoe task.

The docs spread tutorial cannot run pollinate because logger cannot write
to syslog in the spread environment. Keep the pollinate instructions in
the tutorial but verify the route with curl in spread.
The previous route check ran before the haproxy-route relation was applied
and expected a successful HTTP status. Wait for pollen to become active and
match pollen's intentional 400 response instead.
@Thanhphan1147
Thanhphan1147 marked this pull request as ready for review November 16, 2026 08:40
@Thanhphan1147
Thanhphan1147 merged commit 202a2f1 into main Nov 16, 2026
113 of 116 checks passed
@Thanhphan1147
Thanhphan1147 deleted the foreman/ISD-6909 branch November 16, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants