-
Notifications
You must be signed in to change notification settings - Fork 267
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
Add E2E test to create pipeline run #2565
Conversation
Hi @marniks7. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/kind misc |
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.
Thanks for the PR @marniks7. Overall it looks good, we just need to avoid doing anything platform specific where possible. Let me know if you have any questions.
cy.contains('button', 'Create').click(); | ||
cy.contains('simple-pipeline').first().click(); | ||
|
||
cy.get('header[class="tkn--pipeline-run-header"]', { timeout: 10000 }) |
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'm curious where the timeout values here came from, was it from experimentation?
We'll need to keep an eye on these to ensure we don't end up with a flaky test.
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 was experimentation over many runs (but I have done that for pipeline with workspaces)
reworked
- remove timeout for header (let's assume my system has been hanging)
- decrease timeout for status from 15s to 10s
- add retry = 3
https://cypress.io/blog/2020/12/03/retry-rerun-repeat/
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.
Sorry I should have been clearer, my comment was just pointing out that we'll need to be aware of this and account for CI potentially being slower than a local cluster, not requesting a change in strategy.
I would prefer to increase the timeout for the status and remove the retries. Especially in CI where we create a new cluster and registry it's likely to take longer to run the first time due to pulling the image used in the pipeline. Subsequent attempts will most likely be faster as the image has already been pulled which is why the retries succeed. Using retries to accommodate this also has the side effect of creating multiple runs which we don't really need.
We should also consider cleanup after a successful run and delete it but that can be done later.
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.
Please also squash your commits when done so this is ready to merge.
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.
Ok,
- timeout increased to
15s
for status wait - retries removed
@AlanGreene, note, I have changed permission for ~/.kube/config
file to 644
otherwise permission denied on CI. I don't like that much for local runs, because it change permissions for common user kubeconfig file
Other option:
- copy
~/.kube/config
file to~/.kube/tekton
, change permissions for~/.kube/tekton
, add trap before docker run and remove file~/.kube/tekton
in the trap
/ok-to-test |
Add e2e test to create pipeline run that can be executed from any environment
/test tekton-dashboard-unit-tests |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlanGreene 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 |
Thanks @marniks7 |
Changes
Add e2e test to create pipeline run that can be executed from any environment.
This is preparation for tests for workspaces and for yaml editor
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep