Skip to content

Conversation

@alpreu
Copy link
Contributor

@alpreu alpreu commented Mar 1, 2023

PIP: #19123

Motivation

We want to expose PulsarAdmin in the connector context's just as we do for the functions context.

Modifications

Moved the method out of the functions Context into the BaseContext interface.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as (please describe tests).

ContextImplTest

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: alpreu#8

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 1, 2023
* @return The instance of pulsar admin client
*/
default PulsarAdmin getPulsarAdmin() {
throw new UnsupportedOperationException("not implemented");
Copy link
Contributor

Choose a reason for hiding this comment

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

what about "Not available in this context" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to keep it consistent with the messages for e.g. getPulsarClient but I'm open to changing too

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

what about adding some unit tests ? in order to verify that we don't break compatibility in the future ?

@alpreu
Copy link
Contributor Author

alpreu commented Mar 1, 2023

what about adding some unit tests ? in order to verify that we don't break compatibility in the future ?

@eolivelli To clarify, with unit tests you mean a test that e.g. calls getPulsarAdmin on an instance of SourceContext ?

@alpreu
Copy link
Contributor Author

alpreu commented Mar 6, 2023

@eolivelli Let's get this merged :)

@Technoboy- Technoboy- added this to the 3.0.0 milestone Mar 12, 2023
@Technoboy- Technoboy- closed this Mar 12, 2023
@Technoboy- Technoboy- reopened this Mar 12, 2023
@cbornet cbornet modified the milestones: 3.0.0, 3.1.0 Apr 11, 2023
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label May 12, 2023
@Technoboy- Technoboy- closed this Jun 9, 2023
@Technoboy- Technoboy- reopened this Jun 9, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2023

Codecov Report

Merging #19679 (278b013) into master (69fb3c2) will increase coverage by 42.82%.
The diff coverage is 57.27%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #19679       +/-   ##
=============================================
+ Coverage     25.24%   68.07%   +42.82%     
- Complexity      205    10261    +10056     
=============================================
  Files          1668     1880      +212     
  Lines        126201   162952    +36751     
  Branches      13776    21088     +7312     
=============================================
+ Hits          31858   110922    +79064     
+ Misses        89386    42676    -46710     
- Partials       4957     9354     +4397     
Flag Coverage Δ
inttests 26.52% <6.36%> (?)
systests 27.66% <6.36%> (+2.42%) ⬆️
unittests 72.23% <83.56%> (?)

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

Impacted Files Coverage Δ
...a/org/apache/pulsar/functions/api/BaseContext.java 0.00% <0.00%> (ø)
.../pulsar/broker/delayed/bucket/ImmutableBucket.java 61.14% <37.50%> (+61.14%) ⬆️
...r/delayed/bucket/BucketDelayedDeliveryTracker.java 64.57% <48.64%> (+64.57%) ⬆️
...r/delayed/BucketDelayedDeliveryTrackerFactory.java 67.44% <50.00%> (+67.44%) ⬆️
...xtensions/channel/ServiceUnitStateChannelImpl.java 63.82% <62.50%> (+63.26%) ⬆️
...lance/extensions/channel/ServiceUnitStateData.java 75.86% <66.66%> (+75.86%) ⬆️
...ns/channel/ServiceUnitStateCompactionStrategy.java 55.93% <71.42%> (+44.50%) ⬆️
...lsar/broker/loadbalance/impl/ThresholdShedder.java 71.87% <75.00%> (+44.82%) ⬆️
...ulsar/broker/loadbalance/LoadSheddingStrategy.java 100.00% <100.00%> (ø)
...roker/loadbalance/impl/ModularLoadManagerImpl.java 76.78% <100.00%> (+19.85%) ⬆️

... and 1533 files with indirect coverage changes

@github-actions github-actions bot removed the Stale label Jun 10, 2023
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Jul 10, 2023
@Technoboy- Technoboy- modified the milestones: 3.1.0, 3.2.0 Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
@lhotari lhotari modified the milestones: 4.0.0, 4.1.0 Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants