Skip to content

Commit 09ad8bf

Browse files
fix: fix the e2e and adjust log (#265)
1 parent a6e567e commit 09ad8bf

File tree

17 files changed

+38
-56
lines changed

17 files changed

+38
-56
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,34 +57,6 @@ jobs:
5757
## Comma-separated list of files to upload
5858
files: ./it-coverage.xml;./ut-coverage.xml
5959

60-
e2e-tests-v1alpha1:
61-
runs-on: ubuntu-latest
62-
needs: [
63-
detect-noop,
64-
]
65-
if: needs.detect-noop.outputs.noop != 'true'
66-
steps:
67-
- name: Set up Go
68-
uses: actions/setup-go@v6
69-
with:
70-
go-version: ${{ env.GO_VERSION }}
71-
72-
- name: Check out code into the Go module directory
73-
uses: actions/checkout@v5
74-
75-
- name: Install Kind
76-
# Before updating the kind version to use, verify that the current kind image
77-
# is still supported by the version.
78-
run: |
79-
go install sigs.k8s.io/kind@v0.20.0
80-
81-
- name: Run e2e tests
82-
run: |
83-
OUTPUT_TYPE=type=docker make docker-build-member-agent docker-build-hub-agent docker-build-refresh-token e2e-tests-v1alpha1
84-
env:
85-
KUBECONFIG: '/home/runner/.kube/config'
86-
HUB_SERVER_URL: 'https://172.19.0.2:6443'
87-
8860
e2e-tests:
8961
strategy:
9062
fail-fast: false
@@ -130,13 +102,13 @@ jobs:
130102

131103
- name: Install Ginkgo CLI
132104
run: |
133-
go install github.com/onsi/ginkgo/v2/ginkgo@v2.19.1
105+
go install github.com/onsi/ginkgo/v2/ginkgo@v2.23.4
134106
135107
- name: Install Kind
136108
# Before updating the kind version to use, verify that the current kind image
137109
# is still supported by the version.
138110
run: |
139-
go install sigs.k8s.io/kind@v0.22.0
111+
go install sigs.k8s.io/kind@v0.30.0
140112
141113
- name: Run e2e tests
142114
run: |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
REGISTRY ?= ghcr.io
2-
KIND_IMAGE ?= kindest/node:v1.31.0
2+
KIND_IMAGE ?= kindest/node:v1.33.4
33
ifndef TAG
44
TAG ?= $(shell git rev-parse --short=7 HEAD)
55
endif

charts/hub-agent/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,4 @@ hubAPIQPS: 250
4949
hubAPIBurst: 1000
5050
MaxConcurrentClusterPlacement: 100
5151
ConcurrentResourceChangeSyncs: 20
52-
logFileMaxSize: "10000000"
5352
MaxFleetSizeSupported: 100

hack/Azure/setup/createHubCluster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ helm install hub-agent charts/hub-agent/ \
4040
--set ConcurrentRolloutSyncs=20 \
4141
--set hubAPIQPS=100 \
4242
--set hubAPIBurst=1000 \
43-
--set logFileMaxSize=100000000 \
43+
--set logFileMaxSize=5000 \
4444
--set MaxFleetSizeSupported=100
4545

4646
# Check the status of the hub agent

pkg/controllers/workapplier/process.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func (r *Reconciler) takeOverInMemberClusterObjectIfApplicable(
229229
) (shouldSkipProcessing bool) {
230230
if !shouldInitiateTakeOverAttempt(bundle.inMemberClusterObj, work.Spec.ApplyStrategy, expectedAppliedWorkOwnerRef) {
231231
// Takeover is not necessary; proceed with the processing.
232-
klog.V(2).InfoS("Takeover is not needed; skip the step")
232+
klog.V(2).InfoS("Takeover is not needed; skip the step", "work", klog.KObj(work), "GVR", *bundle.gvr, "manifestObj", bundle.workResourceIdentifierStr)
233233
return false
234234
}
235235

pkg/propertyprovider/azure/provider_integration_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,8 @@ var (
320320
)
321321

322322
var (
323-
// The nodes below use actual capacities of their respective AKS SKUs; for more information,
324-
// see:
325-
// https://learn.microsoft.com/en-us/azure/virtual-machines/av2-series (for A-series nodes),
326-
// https://learn.microsoft.com/en-us/azure/virtual-machines/sizes-b-series-burstable (for B-series nodes), and
327-
// https://learn.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series (for D/DS v2 series nodes).
323+
// The nodes below use actual capacities of their respective AKS SKUs; We need to change them periodically as
324+
// they will be deprecated over time.
328325
nodes = []corev1.Node{
329326
{
330327
ObjectMeta: metav1.ObjectMeta{

pkg/propertyprovider/azure/suite_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ const (
4343

4444
const (
4545
region = "eastus"
46-
47-
aksNodeSKU1 = "Standard_B4ms"
48-
aksNodeSKU2 = "Standard_A4_v2"
49-
aksNodeSKU3 = "Standard_F4s"
46+
// we need to regularly update the SKUs used in tests as some of them get deprecated over time.
47+
aksNodeSKU1 = "Standard_D8s_v5"
48+
aksNodeSKU2 = "Standard_E16_v5"
49+
aksNodeSKU3 = "Standard_M16ms"
5050
// Note (chenyu1): cross-reference between the Azure VM SKU list and the Azure Retail Prices API
5151
// for a list of currently known SKUs to be missing from the Azure Retail Prices API.
5252
aksNodeKnownMissingSKU1 = "Standard_DS2_v2"

pkg/propertyprovider/azure/trackers/nodes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ func (nt *NodeTracker) trackSKU(node *corev1.Node) bool {
328328
return true
329329
default:
330330
// No further action is needed if the node's SKU remains the same.
331-
klog.V(2).InfoS("The node's SKU has not changed", "sku", sku, "node", klog.KObj(node))
331+
klog.V(3).InfoS("The node's SKU has not changed", "sku", sku, "node", klog.KObj(node))
332332
return false
333333
}
334334
}

test/e2e/actuals_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ func crpStatusWithExternalStrategyActual(
15061506
}
15071507

15081508
if diff := cmp.Diff(crp.Status, wantStatus, placementStatusCmpOptions...); diff != "" {
1509-
return fmt.Errorf("CRP status diff (-got, +want): %s", diff)
1509+
return fmt.Errorf("CRP status diff (-got, +want): %s for CRP %s", diff, crpName)
15101510
}
15111511
return nil
15121512
}
@@ -1529,11 +1529,11 @@ func customizedPlacementStatusUpdatedActual(
15291529
if wantObservedResourceIndex == "0" {
15301530
// When the observedResourceIndex is "0", it means the placement is just created and the placement controller
15311531
if diff := cmp.Diff(placement.GetPlacementStatus(), wantStatus, placementStatusCmpOptionsOnCreate...); diff != "" {
1532-
return fmt.Errorf("Placement status diff (-got, +want): %s", diff)
1532+
return fmt.Errorf("Placement status diff (-got, +want): %s for placement %v", diff, placementKey)
15331533
}
15341534
} else {
15351535
if diff := cmp.Diff(placement.GetPlacementStatus(), wantStatus, placementStatusCmpOptions...); diff != "" {
1536-
return fmt.Errorf("Placement status diff (-got, +want): %s", diff)
1536+
return fmt.Errorf("Placement status diff (-got, +want): %s for placement %v", diff, placementKey)
15371537
}
15381538
}
15391539
return nil

test/e2e/kindconfigs/cluster-1.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ apiVersion: kind.x-k8s.io/v1alpha4
77
nodes:
88
- role: control-plane
99
- role: worker
10+
- role: worker
11+
- role: worker

0 commit comments

Comments
 (0)