Skip to content

chore: test ci env#35173

Open
kailixu wants to merge 1 commit intomainfrom
test/TD-6670071929-main
Open

chore: test ci env#35173
kailixu wants to merge 1 commit intomainfrom
test/TD-6670071929-main

Conversation

@kailixu
Copy link
Copy Markdown
Contributor

@kailixu kailixu commented Apr 19, 2026

Description

Issue(s)

  • Close/close/Fix/fix/Resolve/resolve: Issue Link

Checklist

Please check the items in the checklist if applicable.

  • Is the user manual updated?
  • Are the test cases passed and automated?
  • Is there no significant decrease in test coverage?

Copilot AI review requested due to automatic review settings April 19, 2026 09:22
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates a warning message in tglobal.c to adjust the formatting of the time unit. The review feedback suggests replacing the printf call with the project's internal uWarn logging macro for better consistency and integration with the logging system, and recommends removing the parentheses around the unit 'ms'.

}
if (cost >= 1000) {
printf("warning: get fqdn cost %" PRId64 " ms\n", cost);
printf("warning: get fqdn cost %" PRId64 " (ms)\n", cost);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In this codebase, it is preferred to use the internal logging macros (such as uWarn, uError, or uInfo) instead of printf for consistency and to ensure that messages are correctly handled by the logging system. These macros automatically include appropriate log level prefixes and handle trailing newlines. Additionally, units like ms are typically not enclosed in parentheses in log messages within this project.

    uWarn("get fqdn cost %" PRId64 " ms", cost);

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes a small, user-visible adjustment to a client configuration warning emitted during FQDN discovery in the common/global configuration initialization code.

Changes:

  • Tweaks the printf warning message formatting for the FQDN lookup time cost.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
if (cost >= 1000) {
printf("warning: get fqdn cost %" PRId64 " ms\n", cost);
printf("warning: get fqdn cost %" PRId64 " (ms)\n", cost);
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

The warning string prints as e.g. cost 123 (ms), which is an unusual unit format and less readable than the previous 123 ms. Consider formatting as ... cost <n> ms (or ... cost <n>ms) to match common log/unit conventions and avoid looking like a missing value in parentheses.

Suggested change
printf("warning: get fqdn cost %" PRId64 " (ms)\n", cost);
printf("warning: get fqdn cost %" PRId64 " ms\n", cost);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants