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

test: controller run() and successfully shutdown #3639

Merged
merged 2 commits into from
May 3, 2024

Conversation

szuecs
Copy link
Contributor

@szuecs szuecs commented May 26, 2023

test: controller run() should do somthing and successfully shutdown

Signed-off-by: Sandor Szuecs <sandor.szuecs@zalando.de>
@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 26, 2023
@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 26, 2023
@szuecs
Copy link
Contributor Author

szuecs commented May 26, 2023

/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 May 26, 2023
@szuecs
Copy link
Contributor Author

szuecs commented May 26, 2023

/lgtm

@k8s-ci-robot
Copy link
Contributor

@szuecs: you cannot LGTM your own PR.

In response to this:

/lgtm

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.

source := new(testutils.MockSource)
cfg := externaldns.NewConfig()
cfg.ManagedDNSRecordTypes = []string{endpoint.RecordTypeA, endpoint.RecordTypeAAAA, endpoint.RecordTypeCNAME}
source.On("Endpoints").Return([]*endpoint.Endpoint{
Copy link
Contributor

Choose a reason for hiding this comment

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

Possibly extract the setup and validation code that is common between this and TestRunOnce?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@mloiseleur
Copy link
Contributor

@szuecs Wdyt of @johngmyers comments ?

fix: race as suggested

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 5, 2024
@szuecs
Copy link
Contributor Author

szuecs commented Jan 5, 2024

@mloiseleur changed the code to fix all comments by @johngmyers

ctrl.Run(ctx)
close(stopped)
}()
time.Sleep(1500 * time.Millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's often a source of flakyness to introduce time.sleep in a test.
Do you think it's possible to use a readiness-like approach ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

while you are right, it's not really possible to do so.
cancel() starts shutdown (triggers being non-ready) and we want to wait for an iteration of external-dns.
We could of course also create a hook inside external-dns control loop, but that's a bit too much for only testing IMO.

@mloiseleur
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 15, 2024
@mloiseleur
Copy link
Contributor

/assign @Raffo
for final review

@k8s-triage-robot
Copy link

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

This bot triages 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 PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this 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 Apr 14, 2024
@szuecs
Copy link
Contributor Author

szuecs commented Apr 25, 2024

/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 Apr 25, 2024
@mloiseleur
Copy link
Contributor

/retitle test: controller run() and successfully shutdown

@k8s-ci-robot k8s-ci-robot changed the title test: controller run() should do somthing and successfully shutdown test: controller run() and successfully shutdown May 3, 2024
@Raffo
Copy link
Contributor

Raffo commented May 3, 2024

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Raffo

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 3, 2024
@k8s-ci-robot k8s-ci-robot merged commit fa17f9d into master May 3, 2024
16 checks passed
truecharts-admin added a commit to truecharts/charts that referenced this pull request May 17, 2024
…rnal-dns to v0.14.2@3fcad62 by renovate (#22163)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[registry.k8s.io/external-dns/external-dns](https://github.com/kubernetes-sigs/external-dns)
| patch | `v0.14.1` -> `v0.14.2` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>kubernetes-sigs/external-dns
(registry.k8s.io/external-dns/external-dns)</summary>

###
[`v0.14.2`](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.14.2)

[Compare
Source](https://github.com/kubernetes-sigs/external-dns/compare/v0.14.1...v0.14.2)

#### What's Changed

- kustomize-v0.14.1 by [@&#8203;Raffo](https://github.com/Raffo) in
[kubernetes-sigs/external-dns#4331
- replace all links in tutorials for v0.14.1 by
[@&#8203;Raffo](https://github.com/Raffo) in
[kubernetes-sigs/external-dns#4332
- chore: upgrade ExternalDNS to go 1.22 by
[@&#8203;mloiseleur](https://github.com/mloiseleur) in
[kubernetes-sigs/external-dns#4318
- build(deps): bump the dev-dependencies group with 13 updates by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4329
- build(deps): bump the dev-dependencies group with 5 updates by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4334
- build(deps): bump the dev-dependencies group with 9 updates by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4349
- build(deps): bump the dev-dependencies group with 1 update by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4341
- Add `dnsendpoint` CRD to Helm chart by
[@&#8203;onedr0p](https://github.com/onedr0p) in
[kubernetes-sigs/external-dns#4322
- build(deps): bump the dev-dependencies group with 13 updates by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4361
- build(deps): bump GrantBirki/json-yaml-validate from 2.6.1 to 2.6.2 in
the dev-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4364
- chore(chart): Released chart for v0.14.1 by
[@&#8203;stevehipwell](https://github.com/stevehipwell) in
[kubernetes-sigs/external-dns#4357
- chore: alphabetical order on providers by
[@&#8203;mloiseleur](https://github.com/mloiseleur) in
[kubernetes-sigs/external-dns#4350
- doc: advertise current plan on providers by
[@&#8203;mloiseleur](https://github.com/mloiseleur) in
[kubernetes-sigs/external-dns#4365
- Fix(ipv6): support ipv6 shortener and expander equal by
[@&#8203;dongjiang1989](https://github.com/dongjiang1989) in
[kubernetes-sigs/external-dns#4351
- feat(WebhookProvider): Let WebhookProvider return `SoftError` on
response status codes >= 500 by
[@&#8203;SimonKienzler](https://github.com/SimonKienzler) in
[kubernetes-sigs/external-dns#4319
- Webhook provider: Use correct error gauge in `AdjustEndpoints()` func
by [@&#8203;SimonKienzler](https://github.com/SimonKienzler) in
[kubernetes-sigs/external-dns#4374
- build(deps): bump the dev-dependencies group with 18 updates by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4381
- Add exclude domains value in Chart by
[@&#8203;bford-evs](https://github.com/bford-evs) in
[kubernetes-sigs/external-dns#4380
- docs(aws): fix typo and upgrade cleanup flow by
[@&#8203;franzudev](https://github.com/franzudev) in
[kubernetes-sigs/external-dns#4389
- docs(gke): detail how to configure workload identity by
[@&#8203;userbradley](https://github.com/userbradley) in
[kubernetes-sigs/external-dns#4373
- chore(ci): fix failing test by
[@&#8203;mloiseleur](https://github.com/mloiseleur) in
[kubernetes-sigs/external-dns#4397
- chore: Update controller-tools version to v0.14.0 by
[@&#8203;dongjiang1989](https://github.com/dongjiang1989) in
[kubernetes-sigs/external-dns#4400
- chore(ci): update golangci-lint to v1.57.2 by
[@&#8203;dongjiang1989](https://github.com/dongjiang1989) in
[kubernetes-sigs/external-dns#4406
- chore: upgrade ExternalDNS to go 1.22.2 by
[@&#8203;mloiseleur](https://github.com/mloiseleur) in
[kubernetes-sigs/external-dns#4414
- build(deps): bump the dev-dependencies group across 1 directory with 4
updates by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4412
- build(deps): bump the dev-dependencies group across 1 directory with
24 updates by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4416
- custom Azure Active Directory Authority Host by
[@&#8203;Jeremy-Boyle](https://github.com/Jeremy-Boyle) in
[kubernetes-sigs/external-dns#4210
- feat(DNSimple): User API tokens by
[@&#8203;IntegralProgrammer](https://github.com/IntegralProgrammer) in
[kubernetes-sigs/external-dns#4274
- docs: annotation placement for azuredns tutorial by
[@&#8203;jonas-budde](https://github.com/jonas-budde) in
[kubernetes-sigs/external-dns#4415
- feat(azure): add zone name filter for Azure Private DNS by
[@&#8203;khuedoan](https://github.com/khuedoan) in
[kubernetes-sigs/external-dns#4346
- test: detect no change necessary with provider specific config by
[@&#8203;szuecs](https://github.com/szuecs) in
[kubernetes-sigs/external-dns#4189
- docs: add setup example with helm chart on some providers by
[@&#8203;omerap12](https://github.com/omerap12) in
[kubernetes-sigs/external-dns#4405
- test: controller run() and successfully shutdown by
[@&#8203;szuecs](https://github.com/szuecs) in
[kubernetes-sigs/external-dns#3639
- fix syntax on cloudflare externalDNS by
[@&#8203;ilyesAj](https://github.com/ilyesAj) in
[kubernetes-sigs/external-dns#4436
- build(deps): bump the dev-dependencies group across 1 directory with
11 updates by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4440
- chore(chart): Adding extra containers by
[@&#8203;omerap12](https://github.com/omerap12) in
[kubernetes-sigs/external-dns#4432
- aws: add ca-west-1 region by
[@&#8203;jeremy-albuixech](https://github.com/jeremy-albuixech) in
[kubernetes-sigs/external-dns#4444
- fix: duplicated endpoint per hosted zone by
[@&#8203;leonardocaylent](https://github.com/leonardocaylent) in
[kubernetes-sigs/external-dns#4296
- build(deps): bump actions/checkout from 4.1.4 to 4.1.5 in the
dev-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4438
- Add IPv6 AAAA record support to PiHole provider by
[@&#8203;PseudoResonance](https://github.com/PseudoResonance) in
[kubernetes-sigs/external-dns#4324
- fix: soft error on cloudflare rate limits by
[@&#8203;ebachle](https://github.com/ebachle) in
[kubernetes-sigs/external-dns#4437
- Update cloudflare.md by
[@&#8203;mfreeman451](https://github.com/mfreeman451) in
[kubernetes-sigs/external-dns#4449
- Fix headings, whitespace by
[@&#8203;stefanlasiewski](https://github.com/stefanlasiewski) in
[kubernetes-sigs/external-dns#4457
- docs: add reference to anexia webhook provider by
[@&#8203;ProbstenHias](https://github.com/ProbstenHias) in
[kubernetes-sigs/external-dns#4441
- fix logline mentioning plugin api by
[@&#8203;Raffo](https://github.com/Raffo) in
[kubernetes-sigs/external-dns#4459
- docs: lint gke docs + make terraform config more secure by
[@&#8203;DrFaust92](https://github.com/DrFaust92) in
[kubernetes-sigs/external-dns#4456
- build(deps): bump action-stars/install-tool-from-github-release from
0.2.2 to 0.2.3 in the dev-dependencies group by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4464
- changed documentation to include more details description when using
API Tokens by [@&#8203;rhjensen79](https://github.com/rhjensen79) in
[kubernetes-sigs/external-dns#4474
- fix: add clarification to endpoint unit tests by
[@&#8203;leonardocaylent](https://github.com/leonardocaylent) in
[kubernetes-sigs/external-dns#4462
- build(deps): bump the dev-dependencies group across 1 directory with
19 updates by [@&#8203;mloiseleur](https://github.com/mloiseleur) in
[kubernetes-sigs/external-dns#4476
- build(deps): bump the dev-dependencies group across 1 directory with
19 updates by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes-sigs/external-dns#4475

#### New Contributors

- [@&#8203;onedr0p](https://github.com/onedr0p) made their first
contribution in
[kubernetes-sigs/external-dns#4322
- [@&#8203;SimonKienzler](https://github.com/SimonKienzler) made their
first contribution in
[kubernetes-sigs/external-dns#4319
- [@&#8203;bford-evs](https://github.com/bford-evs) made their first
contribution in
[kubernetes-sigs/external-dns#4380
- [@&#8203;franzudev](https://github.com/franzudev) made their first
contribution in
[kubernetes-sigs/external-dns#4389
- [@&#8203;userbradley](https://github.com/userbradley) made their
first contribution in
[kubernetes-sigs/external-dns#4373
- [@&#8203;Jeremy-Boyle](https://github.com/Jeremy-Boyle) made their
first contribution in
[kubernetes-sigs/external-dns#4210
- [@&#8203;IntegralProgrammer](https://github.com/IntegralProgrammer)
made their first contribution in
[kubernetes-sigs/external-dns#4274
- [@&#8203;jonas-budde](https://github.com/jonas-budde) made their
first contribution in
[kubernetes-sigs/external-dns#4415
- [@&#8203;khuedoan](https://github.com/khuedoan) made their first
contribution in
[kubernetes-sigs/external-dns#4346
- [@&#8203;omerap12](https://github.com/omerap12) made their first
contribution in
[kubernetes-sigs/external-dns#4405
- [@&#8203;ilyesAj](https://github.com/ilyesAj) made their first
contribution in
[kubernetes-sigs/external-dns#4436
- [@&#8203;jeremy-albuixech](https://github.com/jeremy-albuixech) made
their first contribution in
[kubernetes-sigs/external-dns#4444
- [@&#8203;leonardocaylent](https://github.com/leonardocaylent) made
their first contribution in
[kubernetes-sigs/external-dns#4296
- [@&#8203;PseudoResonance](https://github.com/PseudoResonance) made
their first contribution in
[kubernetes-sigs/external-dns#4324
- [@&#8203;ebachle](https://github.com/ebachle) made their first
contribution in
[kubernetes-sigs/external-dns#4437
- [@&#8203;mfreeman451](https://github.com/mfreeman451) made their
first contribution in
[kubernetes-sigs/external-dns#4449
- [@&#8203;ProbstenHias](https://github.com/ProbstenHias) made their
first contribution in
[kubernetes-sigs/external-dns#4441
- [@&#8203;DrFaust92](https://github.com/DrFaust92) made their first
contribution in
[kubernetes-sigs/external-dns#4456
- [@&#8203;rhjensen79](https://github.com/rhjensen79) made their first
contribution in
[kubernetes-sigs/external-dns#4474

**Full Changelog**:
kubernetes-sigs/external-dns@v0.14.1...v0.14.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMSIsInVwZGF0ZWRJblZlciI6IjM3LjM2OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImF1dG9tZXJnZSIsInVwZGF0ZS9kb2NrZXIvZ2VuZXJhbC9ub24tbWFqb3IiXX0=-->
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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

6 participants