apache / apache/paimon-cpp

[Bug] CI build script accepts flags as values for required options

Open
#293 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
65
Forks
25
Avg merge
2d 12h
Merged PRs (30d)
80

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/paimon-cpp/issues) and found nothing similar.

### Paimon-cpp version

### Paimon version

Current `main` branch.

### Minimal reproduce step

Run one of the following commands:

```bash
ci/scripts/build_paimon.sh --source_dir --enable_asan

ci/scripts/build_paimon.sh \
--source_dir . \
--build_type --enable_asan

ci/scripts/build_paimon.sh \
--source_dir . \
--lint_git_target_commit --enable_asan
```

The script treats the following option as the value of the preceding option and continues until a later command fails or CMake is invoked with an invalid value.

The script also accepts unsupported build types:

```
ci/scripts/build_paimon.sh \
--source_dir . \
--build_type Profile
```

### What doesn't meet your expectations?

Options that require a value should reject an empty value or another `--option` with a clear error message.

The `--build_type` option should only accept the standard CMake build types used by the project:
- `Debug`
- `Release`
- `RelWithDebInfo`
- `MinSizeRel`
Invalid arguments should be rejected before creating build directories or invoking CMake.

The argument validation behavior is currently not covered by dedicated script-level tests.

### Anything else?

_No response_

### Are you willing to submit a PR?

- [x] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start with ci/scripts/build_paimon.sh and reproduce the listed commands to trace how required option values and --build_type are validated. Add script-level coverage for missing or option-like values and unsupported build types; done means invalid arguments fail before build directories or CMake are invoked, while the four listed CMake build types remain accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, shell
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.