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

Update Dockerfile and requirements.txt for python 3.7 #469

Merged
merged 5 commits into from Dec 6, 2019

Conversation

@puerco
Copy link
Contributor

puerco commented Nov 14, 2019

Hi Everyone,
I'm updating the octodns-docker image and the requirements.txt file to run under Python 3.7.

octodns 0.9.9 was released and now supports Python 3.7

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 14, 2019

Welcome @puerco!

It looks like this is your first PR to kubernetes/k8s.io 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/k8s.io has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 14, 2019

Hi @puerco. 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.

@cblecker

This comment has been minimized.

Copy link
Member

cblecker commented Nov 14, 2019

/ok-to-test
/assign

Copy link
Member

cblecker left a comment

Is there any changes required to dns/octodns-docker/check-zone.py?

# python:2-alpine as of July 11th, 2019
ARG BASE_IMAGE=python@sha256:9a2db929c9e4c65118cb1da9ddb1d64f3ba8e4a722f07f3f2d34b58b1e8556b1
FROM ${BASE_IMAGE}
# python:3.7.5-alpine3.10 as of November 14th, 2019

This comment has been minimized.

Copy link
@cblecker

cblecker Nov 14, 2019

Member

What's the reason for selecting this tag, as opposed to python:3-alpine?

This comment has been minimized.

Copy link
@puerco

puerco Nov 14, 2019

Author Contributor

I tried to mimic the way the last image was selected, the latest image and then frozen with the digest.
It seems that no changes are needed to check-zone.py but io can only test it so far

This comment has been minimized.

Copy link
@cblecker

cblecker Nov 14, 2019

Member

Yes, but the tag the digest was based off of was python:2-alpine, as noted in the comment. Could we not use python:3-alpine to select the new digest, instead of python:3.7.5-alpine3.10?

This comment has been minimized.

Copy link
@puerco

puerco Nov 14, 2019

Author Contributor

OK, I've added a new commit with the new image digest for 3-alpine which currently corresponds to 3.8.0-alpine3.10.

puerco added 2 commits Nov 14, 2019
@BenTheElder

This comment has been minimized.

Copy link
Member

BenTheElder commented Nov 15, 2019

@cblecker I guess we don't have CI for this ... manual testing then?

@@ -12,9 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# python:2-alpine as of July 11th, 2019
ARG BASE_IMAGE=python@sha256:9a2db929c9e4c65118cb1da9ddb1d64f3ba8e4a722f07f3f2d34b58b1e8556b1
FROM ${BASE_IMAGE}

This comment has been minimized.

Copy link
@cblecker

cblecker Nov 15, 2019

Member

Why was this abstraction removed?

This comment has been minimized.

Copy link
@puerco

puerco Nov 15, 2019

Author Contributor

No reason in particular, I think I removed it when I was trying out the image digests.

This comment has been minimized.

Copy link
@cblecker

cblecker Nov 15, 2019

Member

It's helpful to have this there, because you can then test by passing in a --build_arg for BASE IMAGE

This comment has been minimized.

Copy link
@puerco

puerco Nov 15, 2019

Author Contributor

OK, I've added the abstraction back.

pycountry==19.8.18
pycountry-convert==0.7.2
pyparsing==2.4.5
pytest==5.2.2

This comment has been minimized.

Copy link
@cblecker

cblecker Nov 15, 2019

Member

Looks like there's some unneeded test dependencies.

Try starting up a new python:3-alpine container, running a pip install octodns==0.9.9, and then a pip freeze and copy the output into this file

This comment has been minimized.

Copy link
@puerco

puerco Nov 15, 2019

Author Contributor

Ready, I added the google-cloud-dns dependecy as well.

@BenTheElder

This comment has been minimized.

Copy link
Member

BenTheElder commented Nov 27, 2019

I'm not sure how we manage this utility to make sure the changes are safe. Lots of dependency upgrades...

@puerco

This comment has been minimized.

Copy link
Contributor Author

puerco commented Nov 27, 2019

I've been testing the script under python3 on a different zone on GCP and it seems to run fine, although I'm not sure if it does what it is supposed to:

What it currently does is read the dns zones from Cloud DNS and compare them to what the resolvers are answering. In other words it is just testing if gcp is doing its job.

From what I gather from @cblecker 's comment, it should compare the zones from the YAML configuration against the actual dns responses from the resolvers. Am I wrong? I have a patch ready if this is the intended behavior.

@dims

This comment has been minimized.

Copy link
Member

dims commented Dec 6, 2019

i just tried this patch and it seems to be working. @puerco please do file a follow up with the patch you mentioned

/approve
/lgtm

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 6, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims

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 merged commit b4ed70f into kubernetes:master Dec 6, 2019
1 of 2 checks passed
1 of 2 checks passed
tide Not mergeable.
Details
cla/linuxfoundation puerco authorized
Details
@puerco

This comment has been minimized.

Copy link
Contributor Author

puerco commented Dec 7, 2019

Thanks @dims i will send the patch in the morning. BTW, this resolves issue #415

@BenTheElder

This comment has been minimized.

Copy link
Member

BenTheElder commented Dec 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.