Skip to content

Conversation

@dragomirp
Copy link
Contributor

Issue

Solution

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@dragomirp dragomirp added the enhancement New feature, UI change, or workload upgrade label Jan 20, 2026
@dragomirp dragomirp changed the base branch from main to 16/edge January 20, 2026 11:43
@dragomirp dragomirp force-pushed the dpe-8932-strict-mode branch from e0f03fd to 315f821 Compare January 20, 2026 11:44
@github-actions github-actions bot added the Libraries: Out of sync The charm libs used are out-of-sync label Jan 20, 2026
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.64%. Comparing base (8ae83a7) to head (52cb476).

Additional details and impacted files
@@             Coverage Diff             @@
##           16/edge    #1389      +/-   ##
===========================================
+ Coverage    70.53%   70.64%   +0.11%     
===========================================
  Files           16       16              
  Lines         4297     4293       -4     
  Branches       691      689       -2     
===========================================
+ Hits          3031     3033       +2     
+ Misses        1055     1050       -5     
+ Partials       211      210       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dragomirp dragomirp force-pushed the dpe-8932-strict-mode branch 3 times, most recently from 0e04de2 to d974297 Compare January 20, 2026 12:55
Comment on lines -2393 to -2406
if value < 2:
from pydantic_core import InitErrorDetails

raise ValidationError.from_exception_data(
"ValidationError",
[
InitErrorDetails(
type="greater_than_equal",
ctx={"ge": 2},
input=value,
loc=("cpu_max_worker_processes",),
)
],
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pydantic can validate this, there's no need to check separately.

# Update the configuration.
self._charm.set_unit_status(MaintenanceStatus("updating configuration"), refresh=refresh)
self._charm.update_config(refresh=refresh)
self._charm.updated_synchronous_node_count()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be called inside _charm.update_config().

@dragomirp dragomirp changed the title [DPE-8932] strict mode [DPE-8932] Strict mode configuration Jan 20, 2026
@dragomirp dragomirp force-pushed the dpe-8932-strict-mode branch from d974297 to 2b2e4a7 Compare January 23, 2026 15:04

base_patch = {}
base_patch = {
**self._patroni.synchronous_configuration,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update the sync node count and strict mode together with the other config params. To reduce the amount of PATCH calls.

base_patch = {}
base_patch = {
**self._patroni.synchronous_configuration,
"maximum_lag_on_failover": self.config.durability_maximum_lag_on_failover,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Patroni param, so should be part of the base patch.

@dragomirp dragomirp force-pushed the dpe-8932-strict-mode branch from d658b06 to 52cb476 Compare January 27, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, UI change, or workload upgrade Libraries: Out of sync The charm libs used are out-of-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants