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

bug: fix digital ocean provider not setting TTL #2857

Merged
merged 1 commit into from
Dec 24, 2022

Conversation

Volatus
Copy link
Contributor

@Volatus Volatus commented Jul 5, 2022

Description
This PR should fix the issue where the Digital Ocean provider unnecessarily tries to update records,
due to the TTL comparison that happens here.

func shouldUpdateTTL(desired, current *endpoint.Endpoint) bool {
	if !desired.RecordTTL.IsConfigured() {
		return false
	}
	return desired.RecordTTL != current.RecordTTL
}

The changes makes sure the TTL field is used when creating records.

Fixes #2754

Checklist

  • Unit tests updated
  • End user documentation updated

Signed-off-by: Ismayil Mirzali ismayilmirzeli@gmail.com

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 5, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @Volatus!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. 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-sigs/external-dns 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 k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 5, 2022
@Volatus
Copy link
Contributor Author

Volatus commented Jul 5, 2022

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 5, 2022
@Volatus
Copy link
Contributor Author

Volatus commented Jul 5, 2022

/assign @Raffo

@seanmalloy
Copy link
Member

@Volatus can you write a unit test to cover these code changes?

@Volatus
Copy link
Contributor Author

Volatus commented Jul 9, 2022

@Volatus can you write a unit test to cover these code changes?

@seanmalloy Isn't that already tested here essentially?

r1 := makeDomainEditRequest("example.com", "example.com", endpoint.RecordTypeA,
"1.2.3.4", digitalOceanRecordTTL)
assert.Equal(t, &godo.DomainRecordEditRequest{
Type: endpoint.RecordTypeA,
Name: "@",
Data: "1.2.3.4",
TTL: digitalOceanRecordTTL,
}, r1)

Note: digitalOceanRecordTTL is 300

@Volatus
Copy link
Contributor Author

Volatus commented Jul 10, 2022

/close

@k8s-ci-robot
Copy link
Contributor

@Volatus: Closed this PR.

In response to this:

/close

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.

@Volatus
Copy link
Contributor Author

Volatus commented Jul 10, 2022

/reopen

@k8s-ci-robot k8s-ci-robot reopened this Jul 10, 2022
@k8s-ci-robot
Copy link
Contributor

@Volatus: Reopened this PR.

In response to this:

/reopen

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.

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 10, 2022
@Volatus
Copy link
Contributor Author

Volatus commented Jul 10, 2022

added unit test /cc @seanmalloy

@k8s-ci-robot
Copy link
Contributor

@Volatus: GitHub didn't allow me to request PR reviews from the following users: added, unit, test.

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

In response to this:

/cc @seanmalloy added unit test

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.

@Volatus
Copy link
Contributor Author

Volatus commented Jul 23, 2022

/cc @seanmalloy any updates on this one?

@szuecs
Copy link
Contributor

szuecs commented Jul 30, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 30, 2022
@Volatus
Copy link
Contributor Author

Volatus commented Aug 21, 2022

/shrug

@k8s-ci-robot k8s-ci-robot added the ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯ label Aug 21, 2022
@Volatus
Copy link
Contributor Author

Volatus commented Aug 24, 2022

/retest

@Volatus
Copy link
Contributor Author

Volatus commented Aug 24, 2022

/test

@k8s-ci-robot
Copy link
Contributor

@Volatus: No presubmit jobs available for kubernetes-sigs/external-dns@master

In response to this:

/test

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-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 22, 2022
@Volatus
Copy link
Contributor Author

Volatus commented Dec 6, 2022

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 6, 2022
@Raffo Raffo closed this Dec 24, 2022
@Raffo Raffo reopened this Dec 24, 2022
@Raffo
Copy link
Contributor

Raffo commented Dec 24, 2022

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Raffo, Volatus

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 Dec 24, 2022
@k8s-ci-robot k8s-ci-robot merged commit a68da28 into kubernetes-sigs:master Dec 24, 2022
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. kind/bug Categorizes issue or PR as related to a bug. 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DigitalOcean: Constant updates when TTL annotation is used on ingress
6 participants