apache / apache/pulsar

pulsar-admin source create fails and exist 0 with a wrong source type

Open
#12,718 2 comments 0 reactions 0 assignees View on GitHub
lifecycle/stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

**Describe the bug**
The **pulsar-admin source create** fails but exit with 0 when deploying an invalid source type.

**To Reproduce**
```
bin/pulsar-admin source create --source-type xxx
Invalid source type 'xxx' -- Available sources are: [cassandra-source]
...
echo $?
0
```

**Expected behavior**
Failed source deployment should exit with a return code greater than 0

Affected Version: Pulsar 2.8.1

Contributor guide

Open the contributing guide

Research direction

Start with the reproduced bin/pulsar-admin source create --source-type xxx command and trace how the invalid source type result is handled. Locate the source-create entry point and its exit-status path, then verify that the failed deployment returns a nonzero status while successful creation still succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.