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

Upgrade DNSimple client and add support for contexts #1551

Merged
merged 11 commits into from
May 11, 2020
Merged

Upgrade DNSimple client and add support for contexts #1551

merged 11 commits into from
May 11, 2020

Conversation

weppos
Copy link
Contributor

@weppos weppos commented May 3, 2020

This PR upgrades to DNSimple client 0.60.0, and adds support for contexts. The latest client version accepts contexts.

Regarding contexts, I saw that methods connected to Kubernetes API already supplied contexts, so no signature change was required. However, the provider exposed a number of DNSimple-oriented custom methods which I suppose are helpers that are only used directly. I see other providers have similar helpers available. Since these methods were exported (hence could not be considered internal), I decided to not change the signature and add new methods -WithContext.

I would be happy to remove them and update the existing ones to always pass contexts, but I need some guidance whether this type of change is accepted.

Besides this note, I think the changeset is ready for review and all specs PASS.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 3, 2020
@weppos weppos changed the title Upgrade dnsimple client and add support for contexts Upgrade DNSimple client and add support for contexts May 3, 2020
@weppos
Copy link
Contributor Author

weppos commented May 3, 2020

/assign @hjacobs

go.mod Show resolved Hide resolved
}

// dnsimpleZoneServiceInterface is an interface that contains all necessary zone services from dnsimple
// dnsimpleZoneServiceInterface is an interface that contains all necessary zone services from DNSimple
type dnsimpleZoneServiceInterface interface {
ListZones(accountID string, options *dnsimple.ZoneListOptions) (*dnsimple.ZonesResponse, error)
Copy link
Member

Choose a reason for hiding this comment

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

can we drop this same as ListRecords? seems to be the same method as without context
you might also can cleanup the test file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to clarify, do you want me to remove the non-context ListRecords and ListZones methods?

In case, should I actually drop the WithContext versions (ListRecordsWithContext) and simply add the context in the existing method signature?

Copy link
Member

@njuettner njuettner May 7, 2020

Choose a reason for hiding this comment

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

Preferring the second option here and yes this would be perfect 👍 , just use the context in the existing method signature 🙂 .

Copy link
Contributor Author

@weppos weppos May 7, 2020

Choose a reason for hiding this comment

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

Changes made. ✅

Copy link
Member

@njuettner njuettner left a comment

Choose a reason for hiding this comment

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

just one thing, PTAL other than that LGTM

@weppos weppos requested a review from njuettner May 7, 2020 16:29
Copy link
Member

@njuettner njuettner left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njuettner, weppos

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 May 11, 2020
@k8s-ci-robot k8s-ci-robot merged commit 49d3e68 into kubernetes-sigs:master May 11, 2020
@weppos weppos deleted the upgrade-dnsimple-client branch May 11, 2020 08:35
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. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants