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

Add Docker image for Python Testing #24235

Merged
merged 8 commits into from
Nov 11, 2021

Conversation

khalludi
Copy link
Contributor

@khalludi khalludi commented Nov 4, 2021

Separates Docker test image code from PR #24034 . This allows us to test that the Docker test image is being built before it is used in the referenced PR.

This PR also partially takes care of the root issue #23830.

(@chaodaiG, please review at your convenience)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 4, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @khalludi. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 4, 2021
@k8s-ci-robot k8s-ci-robot added area/images area/metrics sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Nov 4, 2021
Copy link
Contributor

@chaodaiG chaodaiG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok-to-test

annotations:
testgrid-dashboards: sig-testing-images, sig-k8s-infra-gcb
testgrid-tab-name: "pytest"
testgrid-alert-email: [email protected], [email protected]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not alert until we know it works

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

- --scratch-bucket=gs://k8s-staging-test-infra-gcb
- --project=k8s-staging-test-infra
- --build-dir=.
- images/pytest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new line at the end of the file, please also do this to the other files

COPY requirements3.txt /app/requirements3.txt

RUN /bin/bash -c "apt-get update && apt-get install -y make wget"
RUN /bin/bash -c "pip3 install -r requirements3.txt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a PR updates requirements3.txt, do we expect make pytests also run pip3 install -r requirements3.txt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea?

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 4, 2021
@@ -273,3 +273,27 @@ postsubmits:
- --project=k8s-staging-test-infra
- --env-passthrough=PULL_BASE_REF
- triage/
-name: post-test-infra-push-pytest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test failed, add a space between - and name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@khalludi
Copy link
Contributor Author

khalludi commented Nov 4, 2021

it seems like the 2 tests are failing because of py3_deps. Is there a way we can outright ignore this since we are deprecating it?

@chaodaiG
Copy link
Contributor

chaodaiG commented Nov 4, 2021

We might not want to ignore them in this PR, at least not yet. I think the reason why the tests failed is because the changes in requirements3.txt file, one idea is revert the change in the file, and do pip3 install in make rules for now. What do you think?

@khalludi
Copy link
Contributor Author

khalludi commented Nov 5, 2021

It looks like all the tests are passing this time. Are we green to merge?

Copy link
Contributor

@chaodaiG chaodaiG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at my comments

annotations:
testgrid-dashboards: sig-testing-images, sig-k8s-infra-gcb
testgrid-tab-name: "pytest"
testgrid-alert-email: [email protected], [email protected]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete this line

COPY requirements3.txt /app/requirements3.txt

RUN /bin/bash -c "apt-get update && apt-get install -y make wget"
RUN /bin/bash -c "pip3 install -r requirements3.txt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea?

khalludi added a commit to khalludi/test-infra that referenced this pull request Nov 10, 2021
RUN /bin/bash -c "pip3 install certifi chardet google-api-core google-cloud-bigquery google-cloud-pubsub idna python-dateutil pytz requests six urllib3"
RUN /bin/bash -c "chmod a+x get_jq.sh && ./get_jq.sh && mv jq-1.5 .."

CMD ["make", "pytests"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new line at the end of this file, as well as other files

@@ -9,4 +9,4 @@ PyYAML==5.3
ruamel.yaml==0.16.5
setuptools==44.0.0
sh==1.12.14
singledispatch==3.4.0.3
singledispatch==3.4.0.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand why this is considered a change, I'm afraid that there is some encoding thing going on, can you revert changes in this file?

@chaodaiG
Copy link
Contributor

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Nov 10, 2021
@khalludi
Copy link
Contributor Author

Seems like adding the new line at end of requirement3.txt reverted it back to what's in master branch appropriately. Also added \n to the end of all files.

Copy link
Contributor

@chaodaiG chaodaiG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 11, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chaodaiG, khalludi

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2021
@k8s-ci-robot k8s-ci-robot merged commit 28fa43e into kubernetes:master Nov 11, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Nov 11, 2021
@k8s-ci-robot
Copy link
Contributor

@khalludi: Updated the job-config configmap in namespace default at cluster test-infra-trusted using the following files:

  • key k8s-staging-test-infra.yaml using file config/jobs/image-pushing/k8s-staging-test-infra.yaml

In response to this:

Separates Docker test image code from PR #24034 . This allows us to test that the Docker test image is being built before it is used in the referenced PR.

This PR also partially takes care of the root issue #23830.

(@chaodaiG, please review at your convenience)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/images area/metrics cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants