Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug from PR#691 where the nodes of a newly created file are lost upon a subsequent load operation #810

Merged
merged 1 commit into from
May 10, 2023

Conversation

georgehansper
Copy link
Member

Pull Request #691 introduced a new function to path expressions modified()
This function exposed the value of the internal flag dirty on a node.
In order for modifed() to reflect only the changed nodes, some of the logic around the dirty flag was modified.
This caused a bug which appeared after a saveoperation, where upon a subsequent load operation, where the nodes of a newly created file were inadvertently removed.
This PR fixes the inadvertent cleanup on the subsequent load operation, if the file has been saved.
Unsaved nodes under /files are still cleaned up by the load operation

Copy link

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

In voxpupuli/puppet-augeasproviders_core#49 (comment) there's a verification that this solves the bug showing up in Puppet so 👍 for this.

@georgehansper
Copy link
Member Author

Thanks for confirming this @ekohl

@georgehansper georgehansper merged commit b6713d7 into hercules-team:master May 10, 2023
@ekohl
Copy link

ekohl commented May 23, 2023

Thanks for this. Any plans for a release that includes it? While we do have a workaround in our code now (voxpupuli/puppet-augeasproviders_core@da34348), it would be great to have the real fix in place. Especially since it can take some time before a new release makes it to all platforms.

@georgehansper
Copy link
Member Author

I'd like to do a minor release soon

@georgehansper georgehansper deleted the fix_691_modified branch July 15, 2023 00:40
@georgehansper
Copy link
Member Author

augeas-1.14.1 is now released, with this fix included

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants