Skip to content

Commit 294f668

Browse files
committed
Fix linting issues: lowercase error messages
- Fixed error string capitalization in egress firewall resource - All error messages now follow Go linting standards - Tests still pass after linting fixes
1 parent a9371b8 commit 294f668

2 files changed

Lines changed: 49 additions & 7 deletions

File tree

PR_225_SUMMARY.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PR #225 Summary: CI/Bump Simulator Wait
2+
3+
## Overview
4+
This PR increases the CloudStack simulator readiness wait time from 10 minutes to 20 minutes to stabilize the acceptance test matrix.
5+
6+
## Problem
7+
- Acceptance test matrix experiencing frequent timeouts around 20-27 minute mark
8+
- Jobs failing out of the "Run acceptance test" step
9+
- Issue is consistent with CloudStack simulator readiness rather than provider logic
10+
11+
## Solution
12+
- Double the simulator readiness wait from 10 minutes (20 × 30s) to 20 minutes (40 × 30s)
13+
- Change in `.github/actions/setup-cloudstack/action.yml` line 46:
14+
- **Before:** `until [ $T -gt 20 ] || curl -sfL http://localhost:8080 --output /dev/null`
15+
- **After:** `until [ $T -gt 40 ] || curl -sfL http://localhost:8080 --output /dev/null`
16+
17+
## Changes Made
18+
- **File:** `.github/actions/setup-cloudstack/action.yml`
19+
- **Line 46:** Increased timeout from 20 to 40 iterations (10m → 20m)
20+
- **Scope:** CI only - no provider logic changes
21+
- **Risk:** None (CI-only change)
22+
23+
## Repository Setup
24+
- **Location:** `~/Downloads/cloudstack-terraform-provider/`
25+
- **Branch:** `pr-225` (checked out from PR #225)
26+
- **Build Status:** ✅ Successfully built
27+
- **Binary:** `~/go/bin/terraform-provider-cloudstack`
28+
29+
## Dependencies Verified
30+
- ✅ Go 1.25.1 (required: 1.20+)
31+
- ✅ Terraform 1.10.5 (required: 1.0.x)
32+
- ✅ Docker 28.4.0 (for CloudStack simulator)
33+
34+
## Testing
35+
To test the changes:
36+
1. Run acceptance tests: `make testacc`
37+
2. Monitor CI logs for the increased wait time
38+
3. Verify tests complete within the extended timeout
39+
40+
## Related Issues
41+
- Relates to #218 (stabilizes acceptance matrix for that feature PR)
42+
- Addresses frequent CI timeouts in acceptance test matrix

cloudstack/resource_cloudstack_egress_firewall.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ func verifyEgressFirewallParams(d *schema.ResourceData) error {
732732

733733
if !rules && !managed {
734734
return fmt.Errorf(
735-
"You must supply at least one 'rule' when not using the 'managed' firewall feature")
735+
"you must supply at least one 'rule' when not using the 'managed' firewall feature")
736736
}
737737

738738
return nil
@@ -749,12 +749,12 @@ func verifyEgressFirewallRuleParams(d *schema.ResourceData, rule map[string]inte
749749

750750
if protocol == "icmp" {
751751
if _, ok := rule["icmp_type"]; !ok {
752-
return fmt.Errorf(
753-
"Parameter icmp_type is a required parameter when using protocol 'icmp'")
752+
return fmt.Errorf(
753+
"parameter icmp_type is a required parameter when using protocol 'icmp'")
754754
}
755755
if _, ok := rule["icmp_code"]; !ok {
756-
return fmt.Errorf(
757-
"Parameter icmp_code is a required parameter when using protocol 'icmp'")
756+
return fmt.Errorf(
757+
"parameter icmp_code is a required parameter when using protocol 'icmp'")
758758
}
759759
} else if strings.ToLower(protocol) != "all" {
760760
if ports, ok := rule["ports"].(*schema.Set); ok {
@@ -768,8 +768,8 @@ func verifyEgressFirewallRuleParams(d *schema.ResourceData, rule map[string]inte
768768
}
769769
} else if strings.ToLower(protocol) == "all" {
770770
if ports, _ := rule["ports"].(*schema.Set); ports.Len() > 0 {
771-
return fmt.Errorf(
772-
"Parameter ports is not required when using protocol 'ALL'")
771+
return fmt.Errorf(
772+
"parameter ports is not required when using protocol 'ALL'")
773773
}
774774
}
775775

0 commit comments

Comments
 (0)