Skip to content

Conversation

@dhurley
Copy link
Collaborator

@dhurley dhurley commented Nov 18, 2025

Proposed changes

Ensure only files are in file overview in config apply request.

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

@dhurley dhurley self-assigned this Nov 18, 2025
@dhurley dhurley requested a review from a team as a code owner November 18, 2025 10:37
@github-actions github-actions bot added the chore Pull requests for routine tasks label Nov 18, 2025
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.41%. Comparing base (34a13e6) to head (bea3f91).
⚠️ Report is 2 commits behind head on release-3.5.1.

Files with missing lines Patch % Lines
internal/file/file_manager_service.go 80.95% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           release-3.5.1    #1395   +/-   ##
==============================================
  Coverage          86.41%   86.41%           
==============================================
  Files                102      102           
  Lines              12585    12604   +19     
==============================================
+ Hits               10875    10892   +17     
  Misses              1233     1233           
- Partials             477      479    +2     
Files with missing lines Coverage Δ
internal/file/file_manager_service.go 75.31% <80.95%> (+0.18%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34a13e6...bea3f91. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

modifiedFile.Action = model.Unchanged

// if file is unmanaged, action is set to unchanged so file is skipped when performing actions
// If file is unmanaged, action is set to unchanged so file is skipped when performing actions.
Copy link

@vrmare vrmare Nov 18, 2025

Choose a reason for hiding this comment

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

I think this function can be refactored for simplicity? I imagine existing manifest (source of truth) is maintained as a virtual FS in memory. Then single loop over modified files can be applied to the VFS.

Something like this:

type VirtualFS struct {
    files map[string]SomeFileCache
    mu    sync.RWMutex
}

func (vfs *VirtualFS) ApplyChanges(modifiedFiles map[string]SomeFileCache) ([]FileAction, error) {}

The idea is that VFS holds canonical state.

Copy link

Choose a reason for hiding this comment

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

A bigger change I believe and happy to discuss outside this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah we can take a look at this and do any changes in a separate PR

@dhurley dhurley merged commit 944c71d into release-3.5.1 Nov 19, 2025
35 checks passed
@dhurley dhurley deleted the add-directory-check-for-config-apply-request branch November 19, 2025 14:31
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants