Skip to content

fix: preserve user-defined fileservice cache fields - #607

Merged
loveRhythm1990 merged 1 commit into
matrixorigin:mainfrom
loveRhythm1990:lr90/fix-fileservice-cache
Aug 21, 2026
Merged

fix: preserve user-defined fileservice cache fields#607
loveRhythm1990 merged 1 commit into
matrixorigin:mainfrom
loveRhythm1990:lr90/fix-fileservice-cache

Conversation

@loveRhythm1990

Copy link
Copy Markdown
Contributor

Summary

  • normalize operator-generated fileservice cache tables to map[string]interface{} at the source
  • preserve non-conflicting user-defined cache fields while keeping operator values authoritative on conflicts
  • add a DN ConfigMap regression test based on real TOML decoding
  • update fileservice unit expectations for the normalized cache representation
  • ignore local docs/troubleshooting/ and docs/draft directories

Testing

  • go test ./api/...
  • KUBEBUILDER_ASSETS="/Users/lr90/Library/Application Support/io.kubebuilder.envtest/k8s/1.24.1-darwin-amd64" CGO_ENABLED=0 go test ./pkg/...
  • CGO_ENABLED=0 go vet ./api/... ./pkg/...
  • make check-license
  • git diff --check

Fixes #602

@loveRhythm1990
loveRhythm1990 marked this pull request as ready for review August 21, 2026 06:54
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes deep merging of user-defined fileservice cache settings while preserving operator precedence.

Changes:

  • Normalizes generated cache tables to map[string]interface{}.
  • Adds DN regression coverage using decoded TOML.
  • Updates unit expectations and ignores local documentation drafts.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
.gitignore Ignores local documentation directories.
pkg/controllers/common/fileservice.go Normalizes generated cache maps.
pkg/controllers/common/fileservice_test.go Updates expected cache types.
pkg/controllers/dnset/resource_test.go Verifies user fields survive controller merging.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@loveRhythm1990
loveRhythm1990 merged commit 09476a0 into matrixorigin:main Aug 21, 2026
4 checks passed
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.

[Bug]: MergeDeep drops user-defined fileservice.cache fields

3 participants