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

[jjo] fix panic from acmedns.go constructor failure #858

Merged

Conversation

jjo
Copy link
Contributor

@jjo jjo commented Aug 27, 2018

What this PR does / why we need it:
Fixes cert-manager panic.

Which issue this PR fixes : #857

Special notes for your reviewer:
FYI tested on my live install, instead of panic-ing now properly getting error instantiating acmedns challenge solver: invalid character '{' from logs.

The key fix is that last err != nil check in acme/dns/dns.go switch/case entry
for AcmeDNS, to avoid following thru and wrongly returning impl, nil (with a nil impl pointer).

Release note:

fix panic from acmedns.go constructor failure

Signed-off-by: JuanJo Ciarlante <juanjosec@gmail.com>
@jetstack-bot jetstack-bot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 27, 2018
@jjo
Copy link
Contributor Author

jjo commented Aug 27, 2018

/cc @Queuecumber

@jetstack-bot
Copy link
Contributor

@jjo: GitHub didn't allow me to request PR reviews from the following users: Queuecumber.

Note that only jetstack members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @Queuecumber

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.

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 27, 2018
@Queuecumber
Copy link
Contributor

Odd that this passed all the auto testing, I'll take a look ASAP and see if I can get a PR put together

@Queuecumber
Copy link
Contributor

Nevermind this is a PR, probably shouldn't look at these on my phone.

@Queuecumber
Copy link
Contributor

@kragniz @munnerz Probably want to make this one a priority guys, @jjo kindly fixing my carelessness

@munnerz
Copy link
Member

munnerz commented Aug 28, 2018

Thanks for this change @jjo!

@Queuecumber or @jjo, would you be able to add some relevant unit test cases that cover the various different scenarios/states that the config can be in? i.e. a 'valid configuration', invalid, invalid data, missing, etc? You can see some previous examples of this for other DNS providers here: https://github.com/jetstack/cert-manager/blob/master/pkg/issuer/acme/dns/dns_test.go#L73

/ok-to-test

@jetstack-bot jetstack-bot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 28, 2018
@Queuecumber
Copy link
Contributor

Yeah I was thinking last night that this should have been part of the original PR. @jjo I can take care of this if you want

@jjo
Copy link
Contributor Author

jjo commented Aug 28, 2018

Yeah I was thinking last night that this should have been part of the original PR. @jjo I can take care of this if you want

@Queuecumber thanks!, I'd like to take a shot at it, actually tho :)

@jetstack-bot jetstack-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 29, 2018
@jjo jjo force-pushed the jjo-fix-acmedns-constructor-panic branch from d8bb77d to 5e30168 Compare August 29, 2018 01:19
Signed-off-by: JuanJo Ciarlante <juanjosec@gmail.com>
@jjo jjo force-pushed the jjo-fix-acmedns-constructor-panic branch from 5e30168 to 225a37c Compare August 29, 2018 01:20
@jjo
Copy link
Contributor Author

jjo commented Aug 29, 2018

@Queuecumber @munnerz: added some acmedns unittesting, PTAL thanks !

Signed-off-by: JuanJo Ciarlante <juanjosec@gmail.com>
@jjo jjo force-pushed the jjo-fix-acmedns-constructor-panic branch from 557176d to 1266f41 Compare August 29, 2018 01:24
@Queuecumber
Copy link
Contributor

Looks fine to me and the tests all pass, but my opinion counts for basically nothing around here so hopefully a team member can merge this soon

@munnerz
Copy link
Member

munnerz commented Sep 5, 2018

/lgtm
/approve

@jetstack-bot jetstack-bot added lgtm Indicates that a PR is ready to be merged. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Sep 5, 2018
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: munnerz

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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2018
@munnerz
Copy link
Member

munnerz commented Sep 5, 2018

Ignore the test failures - something has been changed in our testing infra 😬

@munnerz
Copy link
Member

munnerz commented Sep 5, 2018

/test chart-verify
/test verify

@munnerz
Copy link
Member

munnerz commented Sep 5, 2018

/test chart-verify

@jetstack-bot jetstack-bot merged commit 163d0e9 into cert-manager:master Sep 5, 2018
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. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants