Skip to content

Conversation

@thalesmg
Copy link
Contributor

@thalesmg thalesmg commented Oct 16, 2025

Part of https://emqx.atlassian.net/browse/EMQX-14804

Release version: 6.1.0

Summary

PR Checklist

  • For internal contributor: there is a jira ticket to track this change
  • The changes are covered with new or existing tests
  • Change log for changes visible by users has been added to changes/ee/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • Schema changes are backward compatible or intentionally breaking (describe the changes and the reasoning in the summary)

@thalesmg thalesmg force-pushed the 20251013-m-tls-central branch 3 times, most recently from c8f51c6 to d769474 Compare October 16, 2025 16:29
@thalesmg thalesmg force-pushed the 20251013-m-tls-central branch 3 times, most recently from 4b6f15c to e2fa9d5 Compare October 16, 2025 16:45
@thalesmg thalesmg force-pushed the 20251013-m-tls-central branch from e2fa9d5 to a894670 Compare October 16, 2025 16:49
@thalesmg thalesmg marked this pull request as ready for review October 16, 2025 17:32
@thalesmg thalesmg requested a review from a team as a code owner October 16, 2025 17:32
@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 85.62500% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.72%. Comparing base (7084b03) to head (76e92b4).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
apps/emqx_conf/src/emqx_conf_certs.erl 82.05% 14 Missing ⚠️
apps/emqx_management/src/emqx_mgmt_api_certs.erl 89.70% 7 Missing ⚠️
...s/emqx_conf/src/proto/emqx_conf_certs_proto_v1.erl 66.66% 1 Missing ⚠️
apps/emqx_dashboard/src/emqx_dashboard_swagger.erl 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16132      +/-   ##
==========================================
- Coverage   84.73%   84.72%   -0.02%     
==========================================
  Files        1151     1154       +3     
  Lines       79544    79705     +161     
==========================================
+ Hits        67401    67528     +127     
- Misses      12143    12177      +34     

☔ View full report in Codecov by Sentry.
📢 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.

}
}.

fields(file_in) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe provide multipart/form-data endpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed the original proposal which is designed as a one-by-one upload. multipart/form-data would be useful if we wanted to upload multiple files at once, right?

@zmstone WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

yes, good point.
one can upload single file using multipart, no problem.
e.g. if a cert is expire, one can just upload the cert file without having to re-upload key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

e.g. if a cert is expire, one can just upload the cert file without having to re-upload key.

the current design of uploading one-by-one already allows for this, without need for multipart. 🤔

Copy link
Member

Choose a reason for hiding this comment

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

it's good to have multipart upload so one curl command or one request from dashboard can be used to upload multiple files.

I mean supporting multi-part does not mean one cannot upload single file anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added multi-part support in the last two commits

@zmstone
Copy link
Member

zmstone commented Oct 17, 2025

This a great base, however not very useful without supporting it from SSL options config schema

Will you add it in a followup PR ?

@thalesmg
Copy link
Contributor Author

This a great base, however not very useful without supporting it from SSL options config schema

Will you add it in a followup PR ?

Yes, that's the idea. Instead of having one big PR that is both harder to read and requires a lot of rework due to potential change requests, it felt better to first check the API is acceptable before building upon it.

handle_list_bundles(Namespace) ->
case emqx_conf_certs:list_bundles(Namespace) of
{ok, Bundles} ->
Res = bundles_out(Bundles),
Copy link
Member

Choose a reason for hiding this comment

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

escape namespace to list, and unescape before return?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there's no need to escape/unescape namespace here.

aa1a8b8

zmstone
zmstone previously approved these changes Oct 20, 2025
@thalesmg thalesmg merged commit 1888051 into emqx:master Oct 21, 2025
298 of 300 checks passed
@thalesmg thalesmg deleted the 20251013-m-tls-central branch October 21, 2025 15:13
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.

4 participants