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

fix(daemon): pet-store removes petname when overwriting with write #1871

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

kumavis
Copy link
Member

@kumavis kumavis commented Dec 1, 2023

when overwriting a value in pet-store, we should remove the previous value.
This ensures we run proper cleanup:

  • remove known pet name for formula
  • report deletion to subscribers

@kumavis kumavis force-pushed the daemon-petstore-write-remove branch from d9b0f25 to a198476 Compare December 1, 2023 19:32
@kumavis kumavis requested a review from kriskowal December 1, 2023 19:32
@kumavis kumavis mentioned this pull request Dec 1, 2023
4 tasks
@kumavis kumavis force-pushed the daemon-petstore-write-remove branch from a198476 to 2eadb94 Compare December 1, 2023 20:14
Copy link
Member

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

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

This should work. I think the removePath can be removed since the writeFileText will do the job. That suggests isOverwrite doesn’t need to be tracked.

packages/daemon/src/pet-store.js Outdated Show resolved Hide resolved
@kumavis kumavis force-pushed the daemon-petstore-write-remove branch from 2eadb94 to 7fd962e Compare December 1, 2023 21:03
@kumavis kumavis merged commit 6050df8 into endo Dec 1, 2023
14 checks passed
@kumavis kumavis deleted the daemon-petstore-write-remove branch December 1, 2023 21:12
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.

2 participants