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

fix(firewall): missing error when not setting port for tcp rule #734

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

phm07
Copy link
Contributor

@phm07 phm07 commented Apr 19, 2024

Switch cases don't fall through by default in Go, which lead to there being no user-friendly error emitted when the user attempts to create a TCP rule without specifying a port.

Related to #733

@phm07 phm07 requested a review from a team as a code owner April 19, 2024 10:33
@phm07 phm07 force-pushed the fix-firewall-add-rule-error branch from aa1328e to 93307aa Compare April 19, 2024 10:35
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 59.94%. Comparing base (da1b684) to head (93307aa).

Files Patch % Lines
internal/cmd/firewall/add_rule.go 50.00% 1 Missing ⚠️
internal/cmd/firewall/delete_rule.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #734      +/-   ##
==========================================
+ Coverage   59.92%   59.94%   +0.01%     
==========================================
  Files         180      180              
  Lines        6511     6509       -2     
==========================================
  Hits         3902     3902              
+ Misses       1991     1987       -4     
- Partials      618      620       +2     

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

@phm07 phm07 added the bug label Apr 19, 2024
@phm07 phm07 self-assigned this Apr 19, 2024
@phm07 phm07 merged commit c5ad470 into main Apr 19, 2024
4 checks passed
@phm07 phm07 deleted the fix-firewall-add-rule-error branch April 19, 2024 11:27
apricote pushed a commit that referenced this pull request Apr 22, 2024
🤖 I have created a release *beep* *boop*
---


## [1.43.1](v1.43.0...v1.43.1) (2024-04-19)


### Bug Fixes

* allow passing multiple args to server ssh command ([#729](#729))
([d98aee5](d98aee5)),
closes [#728](#728)
* creating firewall with rules not working correctly
([64aeb23](64aeb23))
* **firewall:** missing error when not setting port for tcp rule
([#734](#734))
([c5ad470](c5ad470))
* **firewall:** setting rules not working correctly
([da1b684](da1b684))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants