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

Data plane reconciler handles failed reconciliation. #568

Merged

Conversation

pierDipi
Copy link
Member

We were caching resources that failed to reconcile.
This leads to not retrying to reconcile such resources.

This PR handle failed reconciled resources by avoiding
caching them, simplify our reconciler code, and add
logging.

Proposed Changes

  • Data plane reconciler handles failed reconciliation

Release Note

Data plane reconciler handles failed reconciliation.

Docs

/kind bug

@knative-prow-robot knative-prow-robot added kind/bug Categorizes issue or PR as related to a bug. area/data-plane labels Jan 28, 2021
@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jan 28, 2021
@knative-prow-robot knative-prow-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 28, 2021
@codecov
Copy link

codecov bot commented Jan 28, 2021

Codecov Report

Merging #568 (a58cb30) into master (3a19f2d) will increase coverage by 0.43%.
The diff coverage is 88.35%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #568      +/-   ##
============================================
+ Coverage     71.79%   72.22%   +0.43%     
- Complexity      367      391      +24     
============================================
  Files            72       72              
  Lines          2581     2657      +76     
  Branches        121      112       -9     
============================================
+ Hits           1853     1919      +66     
- Misses          584      596      +12     
+ Partials        144      142       -2     
Flag Coverage Δ Complexity Δ
java-unittests 79.37% <88.35%> (+0.41%) 0.00 <55.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
.../kafka/broker/core/eventbus/ContractPublisher.java 80.00% <ø> (ø) 3.00 <0.00> (ø)
...enting/kafka/broker/receiver/ReceiverVerticle.java 92.85% <ø> (-0.25%) 3.00 <0.00> (ø)
...ka/broker/dispatcher/ConsumerDeployerVerticle.java 69.09% <34.78%> (-13.14%) 9.00 <3.00> (ø)
.../eventing/kafka/broker/receiver/RequestMapper.java 87.90% <76.00%> (-4.07%) 18.00 <5.00> (+1.00) ⬇️
...nciler/impl/ResourcesReconcilerMessageHandler.java 96.15% <95.45%> (+4.48%) 10.00 <9.00> (+5.00)
...e/eventing/kafka/broker/core/file/FileWatcher.java 83.33% <100.00%> (-0.39%) 8.00 <0.00> (+1.00) ⬇️
.../core/reconciler/impl/ResourcesReconcilerImpl.java 93.79% <100.00%> (+7.58%) 58.00 <38.00> (+17.00)
...ting/kafka/broker/core/utils/CollectionsUtils.java 100.00% <100.00%> (ø) 1.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a19f2d...3517362. Read the comment docs.

@pierDipi
Copy link
Member Author

/test pull-knative-sandbox-eventing-kafka-broker-integration-tests

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

Minor comments

@pierDipi
Copy link
Member Author

Failed to create v1 broker "broker": Internal error occurred: failed calling webhook "webhook.eventing.knative.dev": Post https://eventing-webhook.knative-eventing.svc:443/defaulting?timeout=2s: no endpoints available for service "eventing-webhook"

@pierDipi
Copy link
Member Author

I guess HPA gets in the way with chaosduck.

@pierDipi pierDipi force-pushed the refactor-reconciler branch from b4e5c97 to 97bb560 Compare January 28, 2021 11:21
@pierDipi
Copy link
Member Author

/test pull-knative-sandbox-eventing-kafka-broker-integration-tests

@knative-prow-robot knative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 28, 2021
@pierDipi pierDipi force-pushed the refactor-reconciler branch from ed6cb91 to d6c6418 Compare January 28, 2021 15:06
@pierDipi pierDipi force-pushed the refactor-reconciler branch from c985d70 to 28e2454 Compare January 28, 2021 15:28
@pierDipi
Copy link
Member Author

/retest

1 similar comment
@slinkydeveloper
Copy link
Contributor

/retest

@pierDipi
Copy link
Member Author

/retest
/hold

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 29, 2021
@pierDipi
Copy link
Member Author

/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 29, 2021
@pierDipi
Copy link
Member Author

Worked, retesting
/test pull-knative-sandbox-eventing-kafka-broker-integration-tests

@pierDipi
Copy link
Member Author

/retest

@pierDipi
Copy link
Member Author

Worked, retesting
/test pull-knative-sandbox-eventing-kafka-broker-integration-tests

@pierDipi
Copy link
Member Author

/test pull-knative-sandbox-eventing-kafka-broker-integration-tests

@pierDipi
Copy link
Member Author

pierDipi commented Feb 8, 2021

/test pull-knative-sandbox-eventing-kafka-broker-unit-tests

@pierDipi
Copy link
Member Author

pierDipi commented Feb 8, 2021

/retest

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

Small nit, otherwise sounds good to me

@pierDipi
Copy link
Member Author

pierDipi commented Feb 8, 2021

/retest

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
@slinkydeveloper
Copy link
Contributor

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pierDipi, slinkydeveloper

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:
  • OWNERS [pierDipi,slinkydeveloper]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pierDipi
Copy link
Member Author

pierDipi commented Feb 8, 2021

/retest

@pierDipi
Copy link
Member Author

pierDipi commented Feb 8, 2021

/test pull-knative-sandbox-eventing-kafka-broker-integration-tests

@knative-prow-robot knative-prow-robot merged commit 44707db into knative-extensions:master Feb 8, 2021
pierDipi added a commit to pierDipi/eventing-kafka-broker that referenced this pull request Feb 27, 2021
…ons#568)

* Update go.mod

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Reconciler handles failed verticles deploy

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Add more logging

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Logging: egress -> ingress

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Use CompositeFuture.join for egress reconciler

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Use computeIfAbsent

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Check Exception on delete egress

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Check only generation + explanation

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* There could be concurrent reconciliation using the event bus (?)

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* all -> join

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Refactor reconcile

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Move set new contract to help reasoning

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

* Delete benchmarks
@pierDipi pierDipi deleted the refactor-reconciler branch April 14, 2021 21:23
matzew pushed a commit to matzew/eventing-kafka-broker that referenced this pull request Jan 26, 2023
…e-extensions#568)

* Re-add limits

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

* Update remove_source_limits.patch

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

* Revert unrelated formatting

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

* Generate release artifacts

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
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. area/data-plane cla: yes Indicates the PR's author has signed the CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants