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

feat: support hostname target #1455

Merged
merged 7 commits into from
Jan 3, 2024
Merged

feat: support hostname target #1455

merged 7 commits into from
Jan 3, 2024

Conversation

ldysdu
Copy link
Contributor

@ldysdu ldysdu commented Dec 28, 2023

support hostname target

  • I hereby agree to the terms of the HertzBeat CLA
  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

close #1452

Signed-off-by: ldysdu <ldysdu@163.com>
Signed-off-by: ldysdu <ldysdu@163.com>
@tomsun28 tomsun28 added enhancement New feature or request good first pull request Good for newcomers labels Dec 28, 2023
@tomsun28 tomsun28 added this to the 1.4.4 milestone Dec 28, 2023
@tomsun28
Copy link
Contributor

tomsun28 commented Dec 28, 2023

👍👍 hi, please help us fix the unit test error.

Error:  Failures: 
Error:    IpDomainUtilTest.validateIpDomain:43 expected: <false> but was: <true>
[INFO] 
Error:  Tests run: 37, Failures: 1, Errors: 0, Skipped: 0
[INFO] 

@ldysdu
Copy link
Contributor Author

ldysdu commented Jan 2, 2024

updated the test case, improved the regex.
wish you all have a happy new year!

@tomsun28
Copy link
Contributor

tomsun28 commented Jan 2, 2024

@ldysdu Happy New Year!

@tomsun28
Copy link
Contributor

tomsun28 commented Jan 2, 2024

hi, it seem something wrong in Pattern.compile("^[-\w]+(\.[-\w]+)*$");

[INFO] -------------------------------------------------------------
Error: COMPILATION ERROR :
[INFO] -------------------------------------------------------------
Error: /home/runner/work/hertzbeat/hertzbeat/common/src/main/java/org/dromara/hertzbeat/common/util/IpDomainUtil.java:[39,34] illegal escape character
Error: /home/runner/work/hertzbeat/hertzbeat/common/src/main/java/org/dromara/hertzbeat/common/util/IpDomainUtil.java:[39,39] illegal escape character
Error: /home/runner/work/hertzbeat/hertzbeat/common/src/main/java/org/dromara/hertzbeat/common/util/IpDomainUtil.java:[39,43] illegal escape character
[INFO] 3 errors

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


hi, it seem something wrong in Pattern.compile("^[-\w]+(\.[-\w]+)*$");

[INFO] -------------------------------------------------------------
Error: COMPILATION ERROR :
[INFO] -------------------------------------------------------------
Error: /home/runner/work/hertzbeat/hertzbeat/common/src/main/java/org/dromara/hertzbeat/common/util/IpDomainUtil.java:[39,34] illegal escape character
Error: /home/runner/work/hertzbeat/hertzbeat/common/src/main/java/org/dromara/hertzbeat/common/util/IpDomainUtil.java:[39,39] illegal escape character
Error: /home/runner/work/hertzbeat/hertzbeat/common/src/main/java/org/dromara/hertzbeat/common/util/IpDomainUtil.java:[39,43] illegal escape character
[INFO] 3 errors

Signed-off-by: ldysdu <ldysdu@163.com>
@ldysdu
Copy link
Contributor Author

ldysdu commented Jan 3, 2024

sorry for my poor java skill, and the poor network connection. 😂
a double slash should fix the illegal escape character issue hopefully.

@tomsun28
Copy link
Contributor

tomsun28 commented Jan 3, 2024

@ldysdu No need to apologize, it’s a great job to take the first step contribute 👍

Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

LGTM!

@tomsun28
Copy link
Contributor

tomsun28 commented Jan 3, 2024

@all-contributors please add @ldysdu for code

Copy link
Contributor

@tomsun28

I've put up a pull request to add @ldysdu! 🎉

@tomsun28 tomsun28 merged commit b40dc12 into apache:master Jan 3, 2024
2 checks passed
@ldysdu ldysdu deleted the patch-1 branch January 4, 2024 07:29
tomsun28 pushed a commit that referenced this pull request Jan 16, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 9, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 9, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 9, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 10, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 10, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 11, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 11, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 11, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
tomsun28 pushed a commit that referenced this pull request Mar 11, 2024
Signed-off-by: ldysdu <ldysdu@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first pull request Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Suggestion] Target Host support hostname entry
3 participants