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

Perf opt #106

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/kuttl-e2e-test-1.28.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.20'
go-version: '1.21'
- name: Install dependencies
run: |
sudo curl -Lo $KUTTL https://github.com/kudobuilder/kuttl/releases/download/v0.13.0/kubectl-kuttl_0.13.0_linux_x86_64
Expand Down
2 changes: 1 addition & 1 deletion .husky/hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if git status --short | grep -qv "??"; then
trap unstash EXIT
fi

make generate
make generate generate-pkg generate-tests
git diff --exit-code --quiet || (git status && exit 1)

make lint go.test.unit
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ run: go.build
# Create k8s service to allows pods to communicate with
# localstack.
cluster: $(KIND) $(KUBECTL) cluster-clean
docker pull localstack/localstack:2.2
@$(INFO) Creating kind cluster
@$(KIND) create cluster --name=$(KIND_CLUSTER_NAME) --config e2e/kind/kind-config-$(LATEST_KUBE_VERSION).yaml
@$(KIND) load docker-image --name=$(KIND_CLUSTER_NAME) localstack/localstack:2.2
@$(OK) Creating kind cluster

# Spin up a Kind cluster and localstack and install Crossplane via Helm.
Expand Down
2 changes: 0 additions & 2 deletions e2e/kuttl/ceph/provider-ceph-1.25.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ testDirs:
kindConfig: e2e/kind/kind-config-1.25.yaml
startKIND: false
kindNodeCache: true
kindContainers:
- localstack/localstack:2.2
timeout: 120
2 changes: 0 additions & 2 deletions e2e/kuttl/ceph/provider-ceph-1.26.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ testDirs:
kindConfig: e2e/kind/kind-config-1.26.yaml
startKIND: false
kindNodeCache: true
kindContainers:
- localstack/localstack:2.2
timeout: 120
2 changes: 0 additions & 2 deletions e2e/kuttl/ceph/provider-ceph-1.27.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ testDirs:
kindConfig: e2e/kind/kind-config-1.27.yaml
startKIND: false
kindNodeCache: true
kindContainers:
- localstack/localstack:2.2
timeout: 120
2 changes: 0 additions & 2 deletions e2e/kuttl/ceph/provider-ceph-1.28.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ testDirs:
kindConfig: e2e/kind/kind-config-1.28.yaml
startKIND: false
kindNodeCache: true
kindContainers:
- localstack/localstack:2.2
timeout: 120
2 changes: 0 additions & 2 deletions hack/generate-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ testDirs:
kindConfig: e2e/kind/kind-config-${major}.yaml
startKIND: false
kindNodeCache: true
kindContainers:
- localstack/localstack:2.2
timeout: 120
EOF

Expand Down
6 changes: 4 additions & 2 deletions internal/controller/bucket/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ func (c *external) Create(ctx context.Context, mg resource.Managed) (managed.Ext

pc := &apisv1alpha1.ProviderConfig{}
if err := c.kubeClient.Get(ctx, types.NamespacedName{Name: beName}, pc); err != nil {
c.log.Info("Failed to fetch provider config", "backend name", beName, "bucket_name", originalBucket.Name, "err", err.Error())

return managed.ExternalCreation{}, errors.Wrap(err, errGetPC)
}

Expand All @@ -94,7 +96,7 @@ func (c *external) Create(ctx context.Context, mg resource.Managed) (managed.Ext
}

if err != nil {
c.log.Info("Failed to create bucket on backend", "backend name", beName, "bucket_name", originalBucket.Name)
c.log.Info("Failed to create bucket on backend", "backend name", beName, "bucket_name", originalBucket.Name, "err", err.Error())

errChan <- err

Expand Down Expand Up @@ -160,7 +162,7 @@ WAIT:
errorsLeft--

if err != nil {
c.log.Info("Failed to create on backend", "bucket_name", bucket.Name)
c.log.Info("Failed to create on backend", "bucket_name", bucket.Name, "err", err.Error())

if errorsLeft > 0 {
continue
Expand Down
Loading