Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Delete command to gRPC #2212

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

Merged
MatteoPologruto merged 5 commits into arduino:master from MatteoPologruto:set-value
Jun 27, 2023
Merged

Conversation

Copy link
Contributor

@MatteoPologruto MatteoPologruto commented Jun 13, 2023
edited
Loading

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Code enhancement

What is the current behavior?

It is not possible to entirely remove a key from the config file using the gRPC interface. Setting it to an empty object using either Merge or SetValue would not work because viper would set it back to its default value, which is the one written in the config when it was loaded.
The only workaround would be to set the nested key to empty objects using the above mentioned commands:

network:
 proxy: ""
 user_agent_ext: ""

What is the new behavior?

The key can be deleted from the runtime configuration using the Delete command.

Does this PR introduce a breaking change, and is titled accordingly?

No

@MatteoPologruto MatteoPologruto added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Jun 13, 2023
Copy link

codecov bot commented Jun 13, 2023
edited
Loading

Codecov Report

Patch coverage: 93.93% and project coverage change: +0.03 🎉

Comparison is base (eca9d9a) 62.95% compared to head (9ae9461) 62.99%.

Additional details and impacted files
@@ Coverage Diff @@
## master #2212 +/- ##
==========================================
+ Coverage 62.95% 62.99% +0.03% 
==========================================
 Files 220 220 
 Lines 19478 19496 +18 
==========================================
+ Hits 12263 12281 +18 
 Misses 6132 6132 
 Partials 1083 1083 
Flag Coverage Δ
unit 62.99% <93.93%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/cli/config/delete.go 88.88% <71.42%> (-2.54%) ⬇️
commands/board/list.go 60.19% <100.00%> (+0.19%) ⬆️
commands/daemon/settings.go 92.78% <100.00%> (+2.50%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MatteoPologruto MatteoPologruto marked this pull request as ready for review June 13, 2023 11:50
@MatteoPologruto MatteoPologruto linked an issue Jun 13, 2023 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@cmaglie cmaglie cmaglie approved these changes

@alessio-perugini alessio-perugini Awaiting requested review from alessio-perugini

@umbynos umbynos Awaiting requested review from umbynos

Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Network configuration items can't be unset

AltStyle によって変換されたページ (->オリジナル) /