Skip to content

[tool] clean up https cert configuration handling#178139

Merged
auto-submit[bot] merged 14 commits into
masterfrom
tool_https_cleanup
Nov 13, 2025
Merged

[tool] clean up https cert configuration handling#178139
auto-submit[bot] merged 14 commits into
masterfrom
tool_https_cleanup

Conversation

@kevmoo

@kevmoo kevmoo commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

It's only valid if both the cert and the cert key are set.
Makes the code a lot cleaner, too.

@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 6, 2025

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

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.

Code Review

This pull request refactors the HTTPS certificate configuration handling, making HttpsConfig more robust by ensuring both certificate and key paths are non-null. The changes are correctly propagated through WebAssetServer and DebuggingOptions. My review includes a suggestion to improve error handling for partial HTTPS configurations, making it more explicit for the user rather than silently failing.

Comment thread packages/flutter_tools/lib/src/device.dart Outdated
@kevmoo kevmoo marked this pull request as draft November 6, 2025 23:14
@kevmoo kevmoo marked this pull request as ready for review November 10, 2025 21:16
@kevmoo kevmoo requested a review from ditman November 10, 2025 21:17
@kevmoo

kevmoo commented Nov 11, 2025

Copy link
Copy Markdown
Contributor Author

/gemini review

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

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.

Code Review

This pull request refactors the handling of HTTPS certificate configuration to ensure that both the certificate path and key path are provided. This is a good improvement for correctness and code clarity. The introduction of HttpsConfig.parse centralizes the validation logic, and making HttpsConfig fields non-nullable enforces the invariant that both paths must exist. The related code cleanups in device.dart and web_asset_server.dart are also positive changes. I have one minor suggestion to improve the error handling to be more idiomatic.

Comment thread packages/flutter_tools/lib/src/web/devfs_config.dart Outdated
Comment on lines -212 to +236
final String? certPath;
final String? certKeyPath;
final String certPath;
final String certKeyPath;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like that this is more strict now, and throwy in the static factory method!

Comment thread packages/flutter_tools/lib/src/web/devfs_config.dart

@ditman ditman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but cc/ @bkonyi as well!

@kevmoo

kevmoo commented Nov 12, 2025

Copy link
Copy Markdown
Contributor Author

@ditman – tests added!

@kevmoo kevmoo added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 12, 2025
@auto-submit auto-submit Bot added this pull request to the merge queue Nov 13, 2025
Merged via the queue into master with commit 017e4f0 Nov 13, 2025
151 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 17, 2025
IvoneDjaja pushed a commit to IvoneDjaja/flutter that referenced this pull request Nov 22, 2025
It's only valid if both the cert and the cert key are set.
Makes the code a lot cleaner, too.
mboetger pushed a commit to mboetger/flutter that referenced this pull request Dec 2, 2025
It's only valid if both the cert and the cert key are set.
Makes the code a lot cleaner, too.
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
It's only valid if both the cert and the cert key are set.
Makes the code a lot cleaner, too.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants