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

Properly and consistently report changes in 'files' promises #4196

Merged
merged 28 commits into from Jun 10, 2020

Commits on Jun 10, 2020

  1. Add a functions for recording changes, failures, etc.

    More high-level function than just 'Log()' which, unlike
    'cfPS()', say nothing about the state of the whole promise
    because one promise can cause multiple changes on the system.
    
    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    a402fff View commit details
    Browse the repository at this point in the history
  2. Make it possible to check if MakeParentDirectory() created something

    So that we can report the fact.
    
    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    e7a2989 View commit details
    Browse the repository at this point in the history
  3. Properly report changes in the CfCreateFile function

    It should report all changes it makes. And it should use
    LogChange() instead of cfPS() for doing so because cfPS() is for
    reporting status of a whole promise.
    
    Ticket: ENT-5291
    Changelog: Directory and file creations are now properly reported as 'info' messages
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    2a5d1dd View commit details
    Browse the repository at this point in the history
  4. Record that no change was required for file (not) existing as promised

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    332e37b View commit details
    Browse the repository at this point in the history
  5. Properly report changes for files.transformer

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    d92fe6a View commit details
    Browse the repository at this point in the history
  6. Properly report changes in VerifyName()

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    3b7d216 View commit details
    Browse the repository at this point in the history
  7. Properly report changes in VerifyDelete

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    b2ae02e View commit details
    Browse the repository at this point in the history
  8. Properly report about changes in TouchFile()

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    b89cac8 View commit details
    Browse the repository at this point in the history
  9. Properly report changes in VerifyFileAttributes()

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    c62cd9d View commit details
    Browse the repository at this point in the history
  10. Properly report changes in File Integrity Monitoring

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    3dc1e55 View commit details
    Browse the repository at this point in the history
  11. Properly report ACL changes

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    039eb8a View commit details
    Browse the repository at this point in the history
  12. Properly report about changes in DepthSearch()

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    b391032 View commit details
    Browse the repository at this point in the history
  13. Properly report changes when manipulating links

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    584ae97 View commit details
    Browse the repository at this point in the history
  14. Properly report about changes when copying

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    5b943ab View commit details
    Browse the repository at this point in the history
  15. Properly report changes when editing lines in files

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    aae236c View commit details
    Browse the repository at this point in the history
  16. Properly report about changes when editing XML files

    Also report failures as failures not interruptions.
    
    Ticket: ENT-5291
    Changelog: Failures in edit_xml result in promises marked as failed not interrupted
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    8d4c1ac View commit details
    Browse the repository at this point in the history
  17. Properly report changes when rendering contents from templates

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    4822a54 View commit details
    Browse the repository at this point in the history
  18. Properly report and record results of 'files' promises

    Ticket: ENT-5291
    Changelog: All changes made by 'files' promises are now reported
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    c27ac00 View commit details
    Browse the repository at this point in the history
  19. Notes and small fixes

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    e0afc11 View commit details
    Browse the repository at this point in the history
  20. Adapt the 10_files/09_insert_lines/nothing_to_repeat_error.cf test

    With the improved changes reporting the test now produces 'info:'
    lines which are expected.
    
    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    1fc269b View commit details
    Browse the repository at this point in the history
  21. Minor fixes for file changes reporting

    Also adapt the 10_files/02_maintain/changes_update_hashes.cf test
    and add comments about why certain classes are (not) defined.
    
    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    1240130 View commit details
    Browse the repository at this point in the history
  22. Do not define outcome classes for skipped files

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    489a315 View commit details
    Browse the repository at this point in the history
  23. Adapt the 10_files/this_promiser.cf test to better changes reporting

    The outcome classes are now defined for the top-level directory
    even if 'include_basedir' is 'false'. It makes more sense -- if
    there are changes made in the directory, the respective
    '_repaired' class is defined. And then it can be used for things
    like "Do we need to update the archive/backup of that
    directory?".
    
    Ticket: ENT-5291
    Changelog: The outcome classes are now defined for the top-level directory when 'include_basedir' is 'false'
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    d8c1b4d View commit details
    Browse the repository at this point in the history
  24. Use 'permissions' instead of 'permission' when (not) changing them

    It's a set of permissions.
    
    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    91d0023 View commit details
    Browse the repository at this point in the history
  25. Adapt the 00_basics/02_switches/dry_run_perms_doesnt_lie.cf test

    The log messages are now slightly different.
    
    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    76a149d View commit details
    Browse the repository at this point in the history
  26. Do not overwrite xattrs if they are the same already

    If 'preserve => "true"' is used in a copy_from body and the
    xattrs of the source and the destination are the same, the
    destination's xattrs should not be overwritten by the source's
    xattrs.
    
    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    955a9ad View commit details
    Browse the repository at this point in the history
  27. Properly report about changes in FinishEditContext()

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    f984491 View commit details
    Browse the repository at this point in the history
  28. Report failures in 'fields_edit' promises that don't find a match

    Ticket: ENT-5291
    Changelog: None
    vpodzime committed Jun 10, 2020
    Copy the full SHA
    9f11404 View commit details
    Browse the repository at this point in the history