fix: add proper type to hosts in haproxy libraries#383
Merged
Thanhphan1147 merged 1 commit intocanonical:mainfrom Apr 1, 2026
Merged
fix: add proper type to hosts in haproxy libraries#383Thanhphan1147 merged 1 commit intocanonical:mainfrom
Thanhphan1147 merged 1 commit intocanonical:mainfrom
Conversation
89e657e to
abd5475
Compare
abd5475 to
578d063
Compare
Contributor
Author
|
@seb4stien @Thanhphan1147 thank you for your patience. This is no longer blocked. I addressed the comments and it is back to you to review it. |
a78576e to
0269cb2
Compare
seb4stien
approved these changes
Mar 30, 2026
Contributor
|
@Thanhphan1147 I leave it to you to merge. |
Collaborator
|
Hi @skatsaounis, since we have a signed commit requirement on our repos, please allow me to create a duplicate PR and I'll close this one once the duplicated one has been merged |
Contributor
Test results for commit 2d41e87Test coverage for 2d41e87 Static code analysis report |
Contributor
Test results for commit 2d41e87Test coverage for 2d41e87 Static code analysis report |
Contributor
Test results for commit 2d41e87Test coverage for 2d41e87 Static code analysis report |
Contributor
Test results for commit 2d41e87Test coverage for 2d41e87 Static code analysis report |
2d41e87 to
9bbc18d
Compare
9bbc18d to
9ae5715
Compare
Contributor
Author
|
@Thanhphan1147 I fixed it here instead 🙂 |
Thanhphan1147
pushed a commit
that referenced
this pull request
Apr 2, 2026
Thanhphan1147
added a commit
that referenced
this pull request
Apr 2, 2026
Thanhphan1147
added a commit
that referenced
this pull request
Apr 24, 2026
* Implement request API * update model validation before save and add unit tests * use environment variables for secret key * ISD-5226 update docs landing pages (#387) * update how-to landing page * Update docs/how-to/index.md Co-authored-by: Erin Conley <erin.conley@canonical.com> * add summary for each section * Update docs/how-to/index.md Co-authored-by: Erin Conley <erin.conley@canonical.com> * Update docs/how-to/index.md Co-authored-by: Erin Conley <erin.conley@canonical.com> * Update docs/how-to/index.md Co-authored-by: Erin Conley <erin.conley@canonical.com> --------- Co-authored-by: Erin Conley <erin.conley@canonical.com> * ruff format * add secret key for testing * remove port attribute from test * add requirements.txt for testing * reintroduce port field * Add change artifact * run lint with uv * add unit testing * remove custom test * update migration * Wrap creation under `transaction.atomic` Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * remove unused code * minor fixes to settings * use django serializer * update gitignore * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * update view to use django rest * remove python-version * update gitignore * add missing license headers * Add rules engine * update migration * update view * fix lint * remove extra tests * add validation and update tests * update view * remove to_dict * use serializer for get * use serializer * remove unused tests * use filter for delete query * update tests and move validation to serializer class * Apply suggestion from @github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * remove license header from generated files * Update haproxy-route-policy/policy/migrations/0001_initial.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Revert "Update haproxy-route-policy/policy/migrations/0001_initial.py" This reverts commit 10a2708. * ignore migration files for license header * add change artifact * add envlist to tox commands * update envlist * convert pk to uuid for requests * Add guard against mal-formed uuid and parameter. Add logging configs, Add middleware to guard against db connection errors * add validators for port and paths * add tests for validators * add note for migration * remove unused imports * add static tests * guard rules API against pk * update view, middle wares and tests * chore(deps): update dependency haproxy-spoe-auth to v75 (#406) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * refactor tests by parametrizing * chore(deps): update dependency haproxy-spoe-auth to v77 (#408) * chore(deps): update dependency haproxy-spoe-auth to v77 * fix(tests): Fix root integration tests by ignoring route-policy specific tests. * chore: fmt files --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ali Ugur <ali.ugur@canonical.com> * group tests by parameterizing * refactor Rule model to rename attribute from "value" to "parameters" * update test name * update naming * Add coverage-report as part of unit test suite * update env list * implement rule evaluation * add change artifact * update imports * update naming * update rules matching logic * update tests * save request using serializer with the correct instace * Haproxy route policy rules api (#400) * group tests * update formatting * Add authentication configuration for django-restframework and adapt tests for auth * add change artifact * Add token urls * switch DB engine to postgres * add change artifact * Add snap files * fix build issue * update module-name * set secret key as default, drop fetching from file * update readme, fix secret key generation * add change artifact * add build snap workflow * use upload-artifact v4 * update path * add checkout step * change working dir for build action * sparse checkout the policy directory * debug * debug path * remove debug * update scripts to guard against empty DB config values and update allowed-hosts to be more restrictive * update docs link * fix(deps): update all non-major dependencies (#381) * fix(deps): update all non-major dependencies * Test a fix for the RTD workflows * Update Python version to 3.12 * Revert change to uses key --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Erin Conley <erin.conley@canonical.com> Co-authored-by: swetha1654 <swetha.swaminathan@canonical.com> * fix(deps): update dependency cryptography to v46.0.6 [security] (#418) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Haproxy route policy rules matching (#401) * Implement request API * update model validation before save and add unit tests * use environment variables for secret key * ruff format * add secret key for testing * remove port attribute from test * add requirements.txt for testing * reintroduce port field * Add change artifact * run lint with uv * add unit testing * remove custom test * update migration * Wrap creation under `transaction.atomic` Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * remove unused code * minor fixes to settings * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * use django serializer * update gitignore * update view to use django rest * remove python-version * update gitignore * add missing license headers * Add rules engine * update migration * update view * fix lint * remove extra tests * add validation and update tests * update view * remove to_dict * use serializer for get * use serializer * remove unused tests * use filter for delete query * update tests and move validation to serializer class * Apply suggestion from @github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update haproxy-route-policy/policy/migrations/0001_initial.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Revert "Update haproxy-route-policy/policy/migrations/0001_initial.py" This reverts commit 10a2708. * ignore migration files for license header * remove license header from generated files * add change artifact * add envlist to tox commands * update envlist * convert pk to uuid for requests * Add guard against mal-formed uuid and parameter. Add logging configs, Add middleware to guard against db connection errors * add validators for port and paths * add tests for validators * add note for migration * ruff format * remove unused imports * add static tests * guard rules API against pk * update view, middle wares and tests * refactor tests by parametrizing * group tests by parameterizing * refactor Rule model to rename attribute from "value" to "parameters" * update test name * update naming * Add coverage-report as part of unit test suite * update env list * implement rule evaluation * add change artifact * update imports * update naming * update rules matching logic * update tests * save request using serializer with the correct instace * group tests * update formatting --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ali UĞUR <39213991+alithethird@users.noreply.github.com> * chore: update Copilot collections to v0.8.0 (#419) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * use python3 to run manage script instead of uv * bump snap version * add spread test workflow (#420) * fix: add proper type to hosts in haproxy libraries (#383) * update docs for postgresql container * Update haproxy-route-policy/snap/hooks/configure Co-authored-by: Ali UĞUR <39213991+alithethird@users.noreply.github.com> * address comments * add tests for snap * shell script lint fix * update manage script * revert script change * fix shellcheck errors * Fix drifts from main * remove 10s sleep * wait for snap service to settle * set config to start the snap * add MVP for haproxy-roite-policy-operator * simplify charm mbp * properly handles postgresql charm state and fix lint errors * fix unit and reformat tox * update snap config dict * update tox config and add integration test * add change artifact * run integration tests for haproxy-route-policy-operator * add secret handling, update tests * ignore bandit rules * add action, fix issue with command run * add change artifact * add upsertsuperuser command * block until peer relation and set a value after creating a secret to trigger peer unit reconcile * add peer relation definition and only run migration/update user if leader * move juju secret handling to charm state, add charm state for policy related values, add unit tests * cast to string before dumping to json * add change artifact * bootstrap lib * update fetch logic for admin credentials, update tests, update juju version to 3.6 * move juju secret handling to charm state, add charm state for policy related values, add unit tests * cast to string before dumping to json * add change artifact * update handling of credentials * bootstrap lib * bootstrap haproxy-route-policy lib * update lib, fix test issues * add autoapprove logic and add integration tests with any-charm * update uv.lock * wait for complete relation data * update charm and requirer * update integration tests * remove unused lib and update tests and lib * remove haproxy-route from charm-libs * run integration test for haproxy-route-policy * ruff fmt * add change artifact * update change artifacts * fix failing tests * explicitly hint types, update uv lock, update tests * remove docstring * update lib patch version * update business logic * update logic to send haproxy route policy data to provider * update password length checks * don't use self-hosted runner for unit tests * update unit test wf * update runs-on tag * rename * update unit tests * query the API to refresh backend requests * remove merge errors * fix rendering bug for gprc backends * add test for grpc backend rendering * thin out the client * add relation interface, add global test * add relation interface * move exception handling to a separate state module, refactor charm code * small fixes * fix unit tests * add static assets * update db schema, add static files to gunicorn, update business logic * update custom view in admin panel, fix small issue with model validation * Update haproxy-route-policy-operator/charmcraft.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix issues in PR * minor fixes * update method and add change artifact * expose policy provider via a backend, update tests * add trusted origins to snap config * set secure proxy header for haproxy * update template, conditionally render haproxy-route-policy backend when relation is present * add change artifact * add change artifact * Add comments for django DEBUG mode * Add change artifact * add logic to set allowed-hosts if haproxy has sent a proxied-endpoint * send policy hostname via relation data * update scheme in hostname * update lib for serialization and update logic * fix merge conflicts * resolve merge conflicts * resolve merge conflicts, update snap, remove unused conf * resolve conflicts * add change artifact * update lib schema to not send a HttpUrl but send the hostname directly * update lib schema to not send a HttpUrl but send the hostname directly * rework charm logic to avoid dead zones * update test * add context docstring * move whitenoise and remove debug * update serving static files, disabling debug mode * correctly use gunicorn bin * hook update status to the reconcile loop * add change artifact * Add an action to refresh backend requests on-demand * update integration tests * fix typo * fix missing import --------- Co-authored-by: Erin Conley <erin.conley@canonical.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ali Ugur <ali.ugur@canonical.com> Co-authored-by: swetha1654 <swetha.swaminathan@canonical.com> Co-authored-by: Ali UĞUR <39213991+alithethird@users.noreply.github.com>
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.
Applicable spec:
Overview
Rationale
Juju Events Changes
Module Changes
Library Changes
Checklist
docs/release-notes/artifacts. If this PR does not require a change artifact, the PR has been tagged withno-release-note.urgent,trivial,complex)