Skip to content

render retry configuration in template, remove retry_interval attribute#166

Merged
Thanhphan1147 merged 4 commits intomainfrom
add_retry_configuration_to_haproxy_route_template
Aug 4, 2025
Merged

render retry configuration in template, remove retry_interval attribute#166
Thanhphan1147 merged 4 commits intomainfrom
add_retry_configuration_to_haproxy_route_template

Conversation

@Thanhphan1147
Copy link
Collaborator

@Thanhphan1147 Thanhphan1147 commented Jul 30, 2025

The retry_interval attribute is removed since there's no way to configure that in HAproxy. To configure the time between 2 retries we can use timeout.connect.

Fixes #160

Checklist

@Thanhphan1147
Copy link
Collaborator Author

Integration tests will be added shortly

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

Test results for commit 115bea0

Test coverage for 115bea0

Name                                     Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------------------
lib/charms/haproxy/v1/haproxy_route.py     343     57     80     25    79%   171, 174, 222, 231-234, 259-262, 283-288, 572-573, 716-719, 723, 749-760, 783-786, 790-792, 811-813, 822, 974-980, 984, 1157->1159, 1161->1163, 1163->1165, 1165->1167, 1167->1169, 1169->1172, 1205, 1210, 1213, 1238, 1266, 1270, 1274, 1297, 1317, 1326-1327, 1329->exit, 1365-1367, 1387, 1401, 1406-1408
src/charm.py                               221     79     64      7    56%   82, 178, 186-199, 204, 209, 225, 236, 242-243, 271-291, 310-326, 386-399, 412-417, 426, 438-452, 457, 467, 473-479, 489-495
src/haproxy.py                              94     37      2      0    59%   95, 104-110, 128-142, 155-164, 172-179, 188-197, 206-212, 220-229, 257, 281-283
src/http_interface.py                       73     25      4      0    62%   74, 83, 92, 106-108, 126, 138, 150, 162, 170-175, 187, 194, 202, 217-227
src/state/charm_state.py                    72     15     14      4    78%   89-91, 96-97, 100, 137-142, 151, 193-195, 207-208
src/state/exception.py                       1      0      0      0   100%
src/state/ha.py                             30      1      2      1    94%   50
src/state/haproxy_route.py                 105     19     28      5    76%   100, 114-117, 131-135, 149-157, 211, 221-222, 253, 261
src/state/ingress.py                        35      0      4      0   100%
src/state/ingress_per_unit.py               31      0      4      0   100%
src/state/tls.py                            38      5     10      3    83%   76, 114-119, 125-126
src/state/validation.py                     46     23      8      1    44%   66-67, 71-98
src/tls_relation.py                         43      5     12      4    84%   73-74, 76->75, 99-105, 117->119
------------------------------------------------------------------------------------
TOTAL                                     1132    266    232     50    72%

Static code analysis report

Run started:2025-08-04 12:57:13.910694

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 4256
  Total lines skipped (#nosec): 4
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 3

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@Thanhphan1147 Thanhphan1147 merged commit 6ad79f8 into main Aug 4, 2025
25 of 26 checks passed
@Thanhphan1147 Thanhphan1147 deleted the add_retry_configuration_to_haproxy_route_template branch August 4, 2025 13:25
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.

Units stuck in error state: haproxy-route-relation-departed hook failed

2 participants