pentium100 opened a new pull request, #4101:
URL: https://github.com/apache/hertzbeat/pull/4101
## What's changed?
fix(manager): set instance to 'unknow' for dynamic monitors on modification
In the `modifyMonitor` method, the `instance` field for dynamically
discovered monitors (where `isStatic` is false) was not being explicitly set to
"unknow". This could lead to incorrect instance values or unexpected behavior
when updating service discovery monitors.
This commit aligns the behavior of `modifyMonitor` with `addMonitor` by
explicitly setting `monitor.setInstance("unknow")` for non-static scrape types
before processing the instance and port fields.
refer to #4100
## Checklist
- [X] I have read the [Contributing
Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide)
- [X] I have written the necessary doc or comment.
- [X] I have added the necessary unit tests and all cases have passed.
## Add or update API
- [ ] I have added the necessary [e2e
tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have
passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]