Skip to content

Add unmanaged option to file proto#964

Merged
aphralG merged 2 commits intov3from
add-unmanaged-option-to-file
Jan 16, 2025
Merged

Add unmanaged option to file proto#964
aphralG merged 2 commits intov3from
add-unmanaged-option-to-file

Conversation

@aphralG
Copy link
Contributor

@aphralG aphralG commented Jan 15, 2025

Proposed changes

Add Unmanaged option to File proto

  • When determining the file actions during a config apply, if unmanaged is set to true for a file the file will be treated as if it is unchanged, so that no action is performed on the file during a config apply.
// Represents meta data about a file
message File {
    // Meta information about the file, the name (including path) and hash
    FileMeta file_meta = 1;
    // Action enumeration
    enum FileAction {
        // Default value, no action
        FILE_ACTION_UNSPECIFIED = 0;
        // No changes to the file
        FILE_ACTION_UNCHANGED = 1;
        // New file
        FILE_ACTION_ADD = 2;
        // Updated file
        FILE_ACTION_UPDATE = 3;
        // File deleted
        FILE_ACTION_DELETE = 4;
    }
    // Optional action
    optional FileAction action = 2;
    // Unmanaged files will not be modified
    bool unmanaged = 3;
}

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@aphralG aphralG self-assigned this Jan 15, 2025
@aphralG aphralG requested a review from a team as a code owner January 15, 2025 16:23
@github-actions github-actions bot added chore Pull requests for routine tasks documentation Improvements or additions to documentation labels Jan 15, 2025
@aphralG aphralG merged commit db82ebd into v3 Jan 16, 2025
20 checks passed
@aphralG aphralG deleted the add-unmanaged-option-to-file branch January 16, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants