-
Couldn't load subscription status.
- Fork 101
Avoid deleting unmanaged files #1336
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
Conversation
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.3.0 to 3.6.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@v3.3.0...5e57cd1) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 3.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.7.3 to 4.8.0. - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](actions/dependency-review-action@595b5ae...56339e5) --- updated-dependencies: - dependency-name: actions/dependency-review-action dependency-version: 4.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.3 to 3.30.6. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@192325c...64d10c1) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.30.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/github-script](https://github.com/actions/github-script) from 7.0.1 to 8.0.0. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@60a0d83...ed59741) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
||
| // if file is unmanaged skip deletion | ||
| if manifestFile.GetUnmanaged() { | ||
| slog.DebugContext(ctx, "skipping unmanaged file", "file_name", fileName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| slog.DebugContext(ctx, "skipping unmanaged file", "file_name", fileName) | |
| slog.DebugContext(ctx, "Skipping deletion of unmanaged file", "file_name", fileName) |
|
|
||
| // if file is unmanaged, action is set to unchanged so file is skipped when performing actions | ||
| if modifiedFile.File.GetUnmanaged() { | ||
| slog.DebugContext(ctx, "skipping unmanaged file", "file_name", fileName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| slog.DebugContext(ctx, "skipping unmanaged file", "file_name", fileName) | |
| slog.DebugContext(ctx, "Skipping unmanaged file updates", "file_name", fileName) |
|
|
||
| // if file is unmanaged, action is set to unchanged so file is skipped when performing actions | ||
| if modifiedFile.File.GetUnmanaged() { | ||
| slog.DebugContext(ctx, "skipping unmanaged file updates", "file_name", fileName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| slog.DebugContext(ctx, "skipping unmanaged file updates", "file_name", fileName) | |
| slog.DebugContext(ctx, "Skipping unmanaged file updates", "file_name", fileName) |
|
Closing this and adding a new PR into the release branch as this merge would pull in changes from main which we don't want in the patch release. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-3.4.1 #1336 +/- ##
================================================
Coverage ? 84.54%
================================================
Files ? 103
Lines ? 14642
Branches ? 0
================================================
Hits ? 12379
Misses ? 1796
Partials ? 467 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Proposed changes
When determining the file actions during a config apply, we must track the file's
Unmanagedstatus in the manifest file when it is passed from the Mgmt plane, in order to avoid deleting these unmanaged files.Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)