Conversation
… charmlibs.nginx_k8s Agent-Logs-Url: https://github.com/canonical/pyroscope-operators/sessions/de6973f8-6702-48b9-a3e7-b9c42908c816 Co-authored-by: lucabello <36242061+lucabello@users.noreply.github.com>
Agent-Logs-Url: https://github.com/canonical/pyroscope-operators/sessions/de6973f8-6702-48b9-a3e7-b9c42908c816 Co-authored-by: lucabello <36242061+lucabello@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor to use nginx module from charmlibs
chore: use nginx module from charmlibs instead of coordinated-workers
Apr 30, 2026
Contributor
|
@copilot Can you address conflicts? |
…inx-library # Conflicts: # coordinator/src/charm.py # coordinator/src/nginx_config.py # coordinator/uv.lock # worker/uv.lock
Author
Conflicts resolved in 19d1c20. The merge brought in latest
All unit tests pass (63 coordinator, 23 worker). |
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.
Issue
The nginx module was extracted from
coordinated-workersinto the standalonecharmlibs.nginx_k8sPyPI package. This charm was still importing nginx utilities directly fromcoordinated_workers.nginx, which no longer exists in v4.0.0.Solution
Bump
coordinated-workersto>=4.0.0in both coordinator and worker, and migrate all nginx-related imports tocharmlibs.nginx_k8s.Import migration:
coordinator/src/charm.py:from charmlibs.nginx_k8s import NginxConfig, TLSConfigManager— cert path constants now derived asTLSConfigManager.{CA_CERT,CERT,KEY}_PATHcoordinator/src/nginx_config.py:from charmlibs.nginx_k8s import NginxLocationConfig, NginxUpstream—ignore_worker_rolerenamed toignore_address_lookup_keyAPI removals in v4.0.0:
ClusterRolesConfigno longer acceptsrecommended_deployment— removed frompyroscope_config.pyalong with the now-deadRECOMMENDED_DEPLOYMENTconstantCoordinator._default_degraded_messageremoved — cleaned up fromPyroscopeCoordinatorTest updates:
Exec(["nginx", "-s", "reload"])to nginx container fixtures (coordinator unit + interface)test_recommendedfromtest_coherence.py(Coordinator.is_recommendedno longer exists)test_happy_status_message— expected message changes from"[degraded] UI ready at ..."to"UI ready at ..."(degraded status concept removed upstream)Worker._is_readiness_check_failingin workerendpoint_readyfixtureContext
coordinated-workers4.0.0 extracted the nginx configuration layer intocharmlibs-nginx-k8s(a standalone PyPI package). Therecommended_deploymentconcept and associatedis_recommendedproperty were also dropped fromCoordinator/ClusterRolesConfigin this release. This follows the same migration done for Tempo in tempo-operators#315.Testing Instructions
Upgrade Notes
No user-facing changes. The nginx configuration behaviour is identical; only the library source changed.