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/remove mandatory name editing #2120

Merged
merged 4 commits into from
Dec 26, 2022

Conversation

mclcavalcante
Copy link
Contributor

@mclcavalcante mclcavalcante commented Dec 26, 2022

allow partial updates by removing mandatory name for editing requests for agents, agent groups, and datasets. following these rules:

  • If the name is informed, the new name must overwrite the old name
  • If the name is omitted, the old name must be maintained.
  • If the name is informed with empty, the old name must be maintained.
  • If the name is informed with an invalid value, an error must be raised informing that the name doesn't match the pattern required.

@mclcavalcante mclcavalcante self-assigned this Dec 26, 2022
@codecov-commenter
Copy link

codecov-commenter commented Dec 26, 2022

Codecov Report

Base: 4.91% // Head: 64.00% // Increases project coverage by +59.08% 🎉

Coverage data is based on head (144fbad) compared to base (7ef874b).
Patch coverage: 95.55% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #2120       +/-   ##
============================================
+ Coverage     4.91%   64.00%   +59.08%     
============================================
  Files           15       61       +46     
  Lines         1057     4604     +3547     
============================================
+ Hits            52     2947     +2895     
- Misses        1005     1657      +652     
Impacted Files Coverage Δ
policies/api/http/endpoint.go 96.00% <80.00%> (ø)
policies/policy_service.go 86.15% <80.00%> (ø)
fleet/agent_group_service.go 76.71% <100.00%> (ø)
fleet/agent_service.go 65.51% <100.00%> (ø)
fleet/api/http/endpoint.go 92.48% <100.00%> (ø)
fleet/api/http/requests.go 100.00% <100.00%> (ø)
fleet/postgres/agent_groups.go 81.88% <100.00%> (ø)
sinks/api/http/endpoint.go 97.00% <100.00%> (ø)
sinks/api/http/requests.go 97.95% <100.00%> (ø)
sinks/postgres/sinks.go 73.41% <100.00%> (ø)
... and 77 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

Copy link
Contributor

@lpegoraro lpegoraro left a comment

Choose a reason for hiding this comment

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

LGTM

@mclcavalcante mclcavalcante merged commit fa9adaf into develop Dec 26, 2022
@mclcavalcante mclcavalcante deleted the fix/remove-mandatory-name-editing branch December 26, 2022 18:57
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.

3 participants