Required task inputs fail at runtime instead of validation (Build.dockerfile/tags, Stop.containerId)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Inspect src/main/java/io/kestra/plugin/docker/cli/Build.java around the dockerfile and tags fields and their use in run(), then inspect Stop.java around containerId and its run() method. Confirm that missing or empty required inputs fail validation and that containerId appears in the main group instead of connection.
Written by the indexing model from the issue text.
Description
Describe the issue
plugin-docker
Build: dockerfile and tags can fail at runtime instead of validation
Summary
Build derives required inputs without null/empty validation, so bad input throws a raw exception at execution time rather than failing flow validation up front.
Location — src/main/java/io/kestra/plugin/docker/cli/Build.java
dockerfilefield (~L157) has no@NotNull, butrun()callsrunContext.render(this.dockerfile)...orElseThrow()(~L258).tagsis@NotNull(guards null, not empty), andrun()callstags.iterator().next()(~L251) to derive the registry.
Impact
- Omitting
dockerfilepasses validation, then throwsNoSuchElementException/orElseThrowat runtime. - An empty
tags: []passes@NotNull, then throwsNoSuchElementException.
Suggested fix
Add @NotNull to dockerfile (or validate before use) and @NotEmpty/@Size(min = 1) to tags.
Stop: containerId lacks @NotNull and is mis-grouped
Summary
containerId is the required primary input but is neither validated nor grouped as such.
Location — src/main/java/io/kestra/plugin/docker/cli/Stop.java
containerId(~L59-64) is@PluginProperty(group = "connection")with no@NotNull.run()calls...containerId...orElseThrow()(~L88-94).
Impact
Omitting containerId throws a raw NoSuchElementException at runtime instead of failing validation; the property also renders under "connection" instead of "main" in the UI.
Suggested fix
Add @NotNull and move it to group = "main".
Environment
- Kestra Version: rc10
- Latest plugin version
- Dominant language
- Java
- Stars
- 4
- Forks
- 7
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kestra-io/plugin-docker
-
area/plugin good first issue
Difficulty 4/5 3-5 days Newbie friendliness 35/100
kestra-io/plugin-docker#72 · 3 comments ·
-
area/plugin good first issue
Difficulty 3/5 1-2 days Newbie friendliness 45/100
kestra-io/plugin-docker#40 ·
All issues in kestra-io/plugin-docker
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100