Skip to content

export driver tags with unit - #2955

Merged
fengzeroz merged 1 commit into
emqx:v2.16from
fengzeroz:v2.16
Nov 9, 2026
Merged

fengzeroz merged 1 commit into
emqx:v2.16from
fengzeroz:v2.16

Conversation

@fengzeroz

Copy link
Copy Markdown
Member

No description provided.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T07:47:27.876935Z 40d7b3d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40d7b3da2b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

gdatatags[i].tags[j].bias = gtag_array->gtags[i].tags[j].bias;
gdatatags[i].tags[j].address = gtag_array->gtags[i].tags[j].address;
gdatatags[i].tags[j].name = gtag_array->gtags[i].tags[j].name;
gdatatags[i].tags[j].unit = gtag_array->gtags[i].tags[j].unit;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject units that cannot be persisted

When PUT /api/v2/global/drivers supplies a unit longer than 128 characters, this new assignment carries it into persistence without any corresponding check in send_drivers(). The tags.unit constraint in persistence/0121_2.15.1_tag.sql rejects the insert, but adapter_storage_add_tags() only logs that failure while NEU_REQ_ADD_DRIVERS still replies with success, so after a restart the tag is missing (and a multi-tag transaction loses all tags in that group). Validate the optional unit before queuing the request so an invalid import cannot appear successful.

Useful? React with 👍 / 👎.

@codecov-commenter

codecov-commenter commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.74%. Comparing base (fb168d1) to head (40d7b3d).

Files with missing lines Patch % Lines
plugins/restful/global_config_handle.c 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            v2.16    #2955      +/-   ##
==========================================
- Coverage   68.74%   68.74%   -0.01%     
==========================================
  Files         135      135              
  Lines       34434    34439       +5     
==========================================
+ Hits        23671    23674       +3     
- Misses      10763    10765       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fengzeroz
fengzeroz merged commit 0606ec9 into emqx:v2.16 Nov 9, 2026
14 checks passed
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.

2 participants