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

Porting template based test to Multi Stage testing #3270

Closed
2 tasks done
prietyc123 opened this issue Jun 1, 2020 · 19 comments
Closed
2 tasks done

Porting template based test to Multi Stage testing #3270

prietyc123 opened this issue Jun 1, 2020 · 19 comments
Assignees
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).

Comments

@prietyc123
Copy link
Contributor

prietyc123 commented Jun 1, 2020

/kind user-story

User Story

As a user, I want to be able to use the custom credential features for multi-stage tests. So that I can get all the support of the feature added in issue.

Acceptance Criteria

  • Our test should be multi-stage and run on prow
  • It should be able to use custom credential features for multi-stage testing on OpenShift CI.

Links

Currently we are running template based test due to which not able to get the custom credential for issue. Possible approach has been discussed in comment

/kind user-story
/kind test

@openshift-ci-robot openshift-ci-robot added kind/user-story An issue of user-story kind kind/test labels Jun 1, 2020
@amitkrout amitkrout added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jun 1, 2020
@amitkrout
Copy link
Contributor

cc_ @petr-muller

@girishramnani girishramnani added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Jun 1, 2020
@prietyc123
Copy link
Contributor Author

prietyc123 commented Jun 4, 2020

In template based test few key environment variable which we are looking for like volume mount, secret path in our test are not availabile/accessible, so moving our test to multi-stage.

Things need to be done here :

  1. Use ipi-aws workflow
  2. Add Custom steps to run odo tests in ci-operator config file.
  3. Extract the mounted secret

Not sure about the mounted secret whether the same volume mount will work for multi-stage also. We may need to do some work around this. cc_ @amitkrout @mohammedzee1000

@prietyc123
Copy link
Contributor Author

prietyc123 commented Jun 4, 2020

Porting the new workflow along with our existing config facing permission issue while copying secret to /tmp directory error: failed to copy secret mount: open /tmp/secret/kubeconfig: permission denied. I am removing this /tmp dir from the docker image in a separate pr #3290.
In the second step I will clean up the old secret management that we were using.

@prietyc123 prietyc123 removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Jun 9, 2020
@prietyc123
Copy link
Contributor Author

prietyc123 commented Jun 10, 2020

It seems in the multi-state test structure oc binary is not copied in the test container https://deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gcs/origin-ci-test/pr-logs/pull/openshift_release/9431/rehearse-9431-pull-ci-openshift-odo-master-v4.2-integration-e2e-steps/8#1:build-log.txt%3A61 . Ideally it should be copied by default but not sure why this weird is happening. @mohammedzee1000 can you please share your thought on this?

@mohammedzee1000
Copy link
Contributor

@openshift/openshift-team-developer-productivity-platform ^

@thrasher-redhat
Copy link

I think you may want @openshift/openshift-team-developer-productivity-test-platform

@petr-muller
Copy link

Providing oc to multi-steps automatically is https://issues.redhat.com/browse/DPTP-1242, not yet delivered. Currently it's possible to include oc in an image by building a new image and only adding oc to it, like people are doing it e.g. here.

@prietyc123
Copy link
Contributor Author

prietyc123 commented Jun 15, 2020

Added oc binary to the test container bin path in pr #3362

@prietyc123 prietyc123 added the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Jun 22, 2020
@prietyc123
Copy link
Contributor Author

This issue is blocked on copying oc binary to the bin path of build image. There is one pr on this #3362. Once it gets merged expecting I can proceed with this.

@girishramnani girishramnani removed the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Jun 24, 2020
@prietyc123
Copy link
Contributor Author

prietyc123 commented Jun 25, 2020

As per the last slack discussion i need another dockerfile to inject oc in test container path. It seems shell script approach doesn't work. Once this is done it is likely to get migrated into multistage but again I am not sure about the uncertainty of the issue.

@kadel
Copy link
Member

kadel commented Jun 26, 2020

As per the last slack discussion i need another dockerfile to inject oc in test container path. It seems shell script approach doesn't work. Once this is done it is likely to get migrated into multistage but again I am not sure about the uncertainty of the issue.

Can you provide more info on this. Why we need another Dockerfile just with oc?

@amitkrout
Copy link
Contributor

amitkrout commented Jun 28, 2020

As per the last slack discussion i need another dockerfile to inject oc in test container path. It seems shell script approach doesn't work. Once this is done it is likely to get migrated into multistage but again I am not sure about the uncertainty of the issue.

Can you provide more info on this. Why we need another Dockerfile just with oc?

@kadel Unlike other project we tried a nice and simple shell script workaround to inject oc binary to the test container path but unfortunately it did not work for a reason which even surprises @petr-muller from platform team. We should not spend more time on it to debug as this is a workaround ,so we can follow the same way like other project has been done it through another Dockerfile instead. For example - https://github.com/openshift-knative/serverless-operator/tree/6805a2d1b560dbc6955ad1d4aa9686f5d8f8a9c8/openshift/ci-operator.

Shell script workaround we tried - https://github.com/openshift/odo/blob/master/openshift-ci/build-root/multistage/check-oc.sh
Build log - https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_release/9431/rehearse-9431-pull-ci-openshift-odo-master-v4.2-images/1276035075401584640/artifacts/build-logs/oc-bin-image.log

NOTE: oc binary auto injection feature is not delivered yet - https://issues.redhat.com/browse/DPTP-1242

@petr-muller
Copy link

@kadel Unlike other project we tried a nice and simple shell script workaround to inject oc binary to the test container path but unfortunately it did not work for a reason which even surprises @petr-muller from platform team.

Not just that, but also Build API team was not able to help... :/

@prietyc123
Copy link
Contributor Author

prietyc123 commented Jun 30, 2020

After banging head a lot oc got injected to the multi-stage 😀 But here comes the new challenge, now facing permission issue with KUBECONFIG Failure : https://deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gcs/origin-ci-test/pr-logs/pull/openshift_release/9431/rehearse-9431-periodic-ci-openshift-odo-master-v4.2-integration-e2e-periodic-steps/1277932938616377344#1:build-log.txt%3A68

Due to this permission issue we are not able to change the current namespace for operatorhub oc new-project ci-operator-hub-project. This is happening in multi-stage because KUBECONFIG is a secret mount on multi-stage testing, Hence its read only. We can think of a workaround for this.

Workaround Steps:

  1. Need to copy the KUBECONFIG file to some temporary file
  2. Give Read and Write permission and use it.

@prietyc123
Copy link
Contributor Author

pr #3462 is a fix for #3270 (comment)

@kadel kadel added area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering and removed kind/test labels Jul 10, 2020
@prietyc123
Copy link
Contributor Author

Facing some weird behaviour of kubeconfig on openshift release repo. Issue tracked #3501

@prietyc123
Copy link
Contributor Author

I am observing cluster specific issue #3547 and till now I can see it is purely specific to 4.5 cluster. None of the time I have seen it passing on 4.5 and also did not get this failure on any of other cluster. Failure logs can been seen https://deck-ci.apps.ci.l2s4.p1.openshiftapps.com/pr-history/?org=openshift&repo=release&pr=9431

@prietyc123
Copy link
Contributor Author

Blocked on #3547 due to comment . Completely new to me and I need to debug more for the solution.

@prietyc123 prietyc123 added the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Jul 17, 2020
@prietyc123 prietyc123 removed the status/blocked Denotes an issue or PR that is blocked on something (e.g., issue/PR in different repo) label Jul 23, 2020
@prietyc123
Copy link
Contributor Author

Multistage pr openshift/release#9431 already merge. So closing this issue.

/close

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
None yet
Development

No branches or pull requests

8 participants