-
Notifications
You must be signed in to change notification settings - Fork 67
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
OADP-2745: Testing instructions for AWS/IBM Cloud #1153
OADP-2745: Testing instructions for AWS/IBM Cloud #1153
Conversation
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
Skipping CI for Draft Pull Request. |
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
/hold |
nice! Thank you @mateusoliveira43 this got me past my initial error. FYI.. I had to export bucket_file vs.. bucket
Thank you! Still hitting something but I need to dig into it. The test is running through :) |
ah nice.. cleaned up MI BUCKET laddi and I'm good to go! Thank you!!!
|
@weshayutin we can debug together, but from your snippet, I suspect |
@@ -434,7 +428,11 @@ catalog-build-replaces: opm ## Build a catalog image using replace mode | |||
catalog-push: ## Push a catalog image. | |||
$(MAKE) docker-push IMG=$(CATALOG_IMG) | |||
|
|||
OADP_BUCKET = $(shell cat $(OADP_BUCKET_FILE)) | |||
.PHONY: install-ginkgo | |||
install-ginkgo: # Make sure ginkgo is in $GOPATH/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaovilai since we are discussing it
Do you know how to install this in ProjectRoot/bin/
instead of $GOPATH/bin
?
(we can address this later in another PR as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The code for this is already in the makefile under go-install-tool
.
Here's an example: https://github.com/kaovilai/oadp-operator/blob/b09ce0461bc113e3dbb409d52e38b46555e808dc/Makefile#L177-L178
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you wanna do go-install-tool for ginkgo here? or in a later PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will try on this later. If its simple, will do in this one; otherwise, another
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very simple like you couldn't believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't like we have to hardcode version
Like we have to pick a version rather than using latest?
You could @latest
as well but we wanna minimize external changes to CI. We should bump versions via explicit PRs IMO.
You could get CLI based on go mod version. like here
https://github.com/mateusoliveira43/oadp-operator/blob/fix/testing-instructions/build/ci-Dockerfile#L8C5-L8C5
RUN go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
This would install the same CLI version as specified in go.mod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to update go-install-tool to accept -mod=mod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could use latest (already outdated, we are on 2.11.0
and latest is 2.12.1
) and update when needed (do not like this approach because the update necessity will be when CI start breaking and not when we want)
Yeah, was using this approach, but then it install computer wide ($GOPATH/bin instead of PROJECT_ROOT/bin)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to try to modify go-install-tool , if I can not, going to add a TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright, got it working
# go-install-tool-mod will 'go install' any package $2 and install it to $1 with same version as from Project's go.mod.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-install-tool-mod
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
cp $(PROJECT_DIR)/go.mod . ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go install -mod=mod $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
But then, this https://github.com/openshift/oadp-operator/blob/master/build/ci-Dockerfile#L8 would be unnecessary, right?
If so, I propose we do this in a separate PR to also change Dockerfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried these instructions on a newly installed system with a newly installed AWS cluster, and got reasonable test results (just two failures from unrelated temporary VolumeSnapshot errors). Looks good to me.
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
@@ -22,7 +22,7 @@ import ( | |||
) | |||
|
|||
var _ = Describe("Configuration testing for DPA Custom Resource", func() { | |||
provider := Dpa.Spec.BackupLocations[0].Velero.Provider | |||
providerFromDPA := Dpa.Spec.BackupLocations[0].Velero.Provider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was needed for IBM use case
Upon further review... I cleaned up my check out.. it's working
|
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
/unhold |
@mateusoliveira43: This pull request references OADP-2745 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but it targets "OADP 1.3.0" instead. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
/retest |
I think this can be improved a bit, question if within this PR or separate ones?
$ make install-ginkgo
which: no oc in (/home/migi/.local/bin:/home/migi/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
/bin/sh: line 1: get: command not found
$CLUSTER_TYPE is []
bash: line 1: /home/migi/Development/Upstream/OADP/mpryc-oadp-operator/bin/setup-envtest: No such file or directory
go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo
go: downloading golang.org/x/tools v0.11.0
$ make test-e2e-setup
which: no oc in (/home/migi/.local/bin:/home/migi/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
/bin/sh: line 1: get: command not found
$CLUSTER_TYPE is []
bash: line 1: /home/migi/Development/Upstream/OADP/mpryc-oadp-operator/bin/setup-envtest: No such file or directory
cat: /var/run/oadp-credentials/new-velero-bucket-name: No such file or directory
mkdir -p /tmp/test-settings
TMP_DIR=/tmp/test-settings \
OPENSHIFT_CI="true" \
PROVIDER="" \
SECRET="cloud-credentials" \
AZURE_RESOURCE_FILE="/var/run/secrets/ci.openshift.io/multi-stage/metadata.json" \
CI_JSON_CRED_FILE="/Users/drajds/.aws/osServicePrincipal.json" \
OADP_JSON_CRED_FILE="/var/run/oadp-credentials/azure-credentials" \
OADP_CRED_FILE="/var/run/oadp-credentials/new-aws-credentials" \
BUCKET="" \
TARGET_CI_CRED_FILE="/Users/drajds/.aws/.awscred" \
VSL_REGION="" \
BSL_REGION="us-east-1" \
BSL_AWS_PROFILE="default" \
/bin/bash "tests/e2e/scripts/_settings.sh"
/bin/bash: tests/e2e/scripts/_settings.sh: No such file or directory
$ make install-ginkgo
E0927 11:09:56.226559 1999614 memcache.go:238] couldn't get current server API group list: the server has asked for the client to provide credentials
E0927 11:09:56.280106 1999614 memcache.go:238] couldn't get current server API group list: the server has asked for the client to provide credentials
E0927 11:09:56.334531 1999614 memcache.go:238] couldn't get current server API group list: the server has asked for the client to provide credentials
E0927 11:09:56.391443 1999614 memcache.go:238] couldn't get current server API group list: the server has asked for the client to provide credentials
E0927 11:09:56.453311 1999614 memcache.go:238] couldn't get current server API group list: the server has asked for the client to provide credentials
error: You must be logged in to the server (the server has asked for the client to provide credentials)
$CLUSTER_TYPE is []
bash: line 1: /home/migi/Development/Upstream/OADP/mpryc-oadp-operator/bin/setup-envtest: No such file or directory
go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo
#### After oc login to the cluseter:
$ make install-ginkgo
$CLUSTER_TYPE is [aws]
bash: line 1: /home/migi/Development/Upstream/OADP/mpryc-oadp-operator/bin/setup-envtest: No such file or directory
go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo |
@mpryc we currently do not install
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: mateusoliveira43, mrnold The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/override ci/prow/4.12-operator-e2e-gcp |
@kaovilai: Overrode contexts on behalf of kaovilai: ci/prow/4.12-operator-e2e-gcp In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
/override ci/prow/4.12-operator-e2e-gcp |
@kaovilai: Overrode contexts on behalf of kaovilai: ci/prow/4.12-operator-e2e-gcp In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/override ci/prow/4.12-operator-e2e-gcp |
@mateusoliveira43: mateusoliveira43 unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file, and the following github teams:openshift: openshift-release-oversight. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/override ci/prow/4.12-operator-e2e-gcp |
@kaovilai: Overrode contexts on behalf of kaovilai: ci/prow/4.12-operator-e2e-gcp In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@mateusoliveira43: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Update docs regarding how to run E2E (end to end) tests locally.
How to test
Prerequisites
Run
Checkout PR branch locally
Read instructions in https://github.com/mateusoliveira43/oadp-operator/blob/fix/testing-instructions/docs/developer/testing/TESTING.md about prerequisites and how to set up environment variables to run tests in AWS or IBM Cloud.
Either
run all tests with
make test-e2e
, orrun only MySQL application RESTIC test, following these steps
Run E2E tests setup (creates DPA spec that will be used for tests run) (NORMALLY THIS STEP IS NOT NECESSARY, if running
make test-e2e
)Install Ginkgo CLI (NORMALLY THIS STEP IS NOT NECESSARY, if running
make test-e2e
)Run MySQL application RESTIC test (this is basically
make test-e2e
with--ginkgo.focus
)