Skip to content

Enhanced Auto State Logic and Bug Fixes in v24.2.2

This merge request introduces key improvements and bug fixes in the auto state logic, marking our transition from v24.2.1 to v24.2.2.

Key Changes:

  1. Consistency in 'Get' Operations: Ensured that 'name' and 'resource_id' are always included in the return of a 'get' operation. This addresses previous inconsistencies where these elements weren't explicitly passed, leading to irregularities in the auto state logic, especially during 'present' state executions expecting no changes on the resource.

  2. Refined Auto State 'Present' Function: Updated the auto_state 'present' function to not assume the existence of a resource merely based on the presence of a 'resource_id'. Now, if a 'resource_id' is provided, the system attempts a 'get' operation first. If this 'get' fails, the system infers the non-existence of the resource and proceeds to create it. This enhancement mitigates erroneous assumptions about resource existence and streamlines resource management.

  3. Contextual Naming Update: Renamed 'ctx.before' to 'ctx.old_state' for consistency with the naming conventions used in other state operations. This change improves code readability and maintainability.

These updates are pivotal for supporting functionalities in idem-gitlab, ensuring more reliable and predictable behavior in our auto state management.

Versioning Note: This MR constitutes a bugfix release, hence the version bump to 24.2.2. It's a part of our ongoing efforts to refine idem's functionality and ensure robustness in our system operations.

Your review and feedback on these changes are highly appreciated to ensure we maintain high standards in our development process.

Needed by idem-gitlab!12 (merged)

Edited by Akmod

Merge request reports