Skip to content

[fix][admin] Keep new inputSpecs when updating sink configs - #19082

Merged
nicoloboschi merged 1 commit into
apache:masterfrom
aymkhalil:update-sink-inputspecs
Jan 2, 2023
Merged

[fix][admin] Keep new inputSpecs when updating sink configs#19082
nicoloboschi merged 1 commit into
apache:masterfrom
aymkhalil:update-sink-inputspecs

Conversation

@aymkhalil

Copy link
Copy Markdown
Contributor

Fixes #18507

Motivation

When a user updates inputSpect of a sink by providing both --inputs and --input-specs, exiting consumerConfig will be wiped out.

Modifications

On the validateUpdate code path, there is a logic that populates the inputSpecs inside the newConfig to empty consumerConfig. This will overwrite the existing specs when later on the methods attempts a merge and will also merge in the hard coded consumer configs ignoring any new values the user might've provided. By only setting the consumerConfig to a default value if such config didn't exit, the behavior is similar to what would happen if the user did the update, without providing the --inputs specs (which is, newConfig consumer config will overwrite exiting ones.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

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: aymkhalil#4

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Dec 27, 2022

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@codecov-commenter

codecov-commenter commented Dec 29, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.44%. Comparing base (492a9c3) to head (2d82081).
⚠️ Report is 3057 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #19082      +/-   ##
============================================
- Coverage     47.46%   47.44%   -0.02%     
+ Complexity    10727    10717      -10     
============================================
  Files           711      711              
  Lines         69456    69459       +3     
  Branches       7452     7453       +1     
============================================
- Hits          32964    32954      -10     
- Misses        32810    32812       +2     
- Partials       3682     3693      +11     
Flag Coverage Δ
unittests 47.44% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 43 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/connector doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Pulsar Admin sink update can potentially wipe out "inputSpecs"

6 participants