Repository navigation
fixed: pass namespace files to cloudquery commands - #190
Conversation
fdelbrayelle
left a comment
There was a problem hiding this comment.
Kestra Plugin Code Review
Business Requirements — met
Issue #188 asks for CloudQueryCLI to pass namespaceFiles to the CommandsWrapper, the same way Sync does. The one-line change does exactly that, with no scope creep: no build, dependency, or CI changes. The PR head compiles (compileJava, compileTestJava).
Kestra Guidelines — 2 findings
- 🟠
CloudQueryCLI.java:109[Guidelines] No regression test for namespace files - 🟢 PR title / commit message [Guidelines] Not in Conventional Commits form:
fixed: pass namespace files ...should befix(cloudquery): pass namespace files to CloudQueryCLI commands(Pull Request & Commit Descriptions). This matters because the title becomes the squash-merge commit.
Security (OWASP Top 10:2025 + KPS) — 0 findings
✅ No issues found
Performance — 0 findings
✅ No issues found
Confidence: 59% (100 - 15 Request Changes - 1 Nit = 84, capped at 59 for REQUEST CHANGES)
Verdict: REQUEST CHANGES; recommendation only, posted as COMMENT, a maintainer decides.
df26dd9 to
63aac81
Compare
fdelbrayelle
left a comment
There was a problem hiding this comment.
Kestra Plugin Code Review
Business Requirements: met
Issue #188 asks CloudQueryCLI to pass namespaceFiles to the CommandsWrapper. The fix does that, and the new commit adds a regression test. No build, dependency or CI changes.
Previous Review Follow-up: 1 of 2 addressed
Baseline: 70679df8 (force-pushed; new head 63aac81d is a single commit on the same base 29e37f90, compared against the old head content directly).
- ✅
CloudQueryCLI.java:109[Guidelines] No regression test for namespace files:CloudQueryCLITest#namespaceFiles(lines 61-85) storesconfig.ymlin the namespace and runstest -f config.yml. Ran locally on63aac81d: 2/2 tests pass. With.withNamespaceFiles(namespaceFiles)removed, the test fails withCommand failed with exit code 1, so it guards #188. The thread was already resolved. - 🟡 PR title / commit message [Guidelines] Conventional Commits: the commit is now
fix(cloudquery): pass namespace files to CloudQueryCLI commands, but the PR title is stillfixed: pass namespace files to cloudquery commands. On squash-merge the title becomes the commit, so please rename it too (or the maintainer can edit it when merging).
Kestra Guidelines: 1 finding
- 🟢
CloudQueryCLITest.java:64[Guidelines] Usevarfor locals in the new test
Security (OWASP Top 10:2025 + KPS): 0 findings
✅ No issues found
Performance: 0 findings
✅ No issues found
Verdict: APPROVE; recommendation only, posted as COMMENT, a maintainer decides.
Confidence: 98% (100 - 1 Nit - 1 Nit still open from the previous review)
|
|
||
| @Test | ||
| void namespaceFiles() throws Exception { | ||
| CloudQueryCLI execute = CloudQueryCLI.builder() |
There was a problem hiding this comment.
🟢 [Guidelines] Use var for locals in the new test
Problem: The new namespaceFiles test declares CloudQueryCLI execute, RunContext runContext and ScriptOutput runOutput with explicit types, while the Java Style & Local Variables section asks for var on all local variables where it is legal.
Fix: Write var execute = CloudQueryCLI.builder()..., var runContext = TestsUtils.mockRunContext(...) and var runOutput = execute.run(runContext). Optional.
There was a problem hiding this comment.
Ok will cross check and fix it
QA reportCommit: 63aac81 Result: PASS. The one-line fix works: Setup: PR head JAR built with
Flow 1: cq_namespace_files (SUCCESS)Flow YAMLid: cq_namespace_files
namespace: qa.cloudquery
tasks:
- id: cli
type: io.kestra.plugin.cloudquery.CloudQueryCLI
namespaceFiles:
enabled: true
commands:
- cloudquery --version
- cat config.ymlGantt (screenshot)
Logs synthesis (screenshot) Outputs synthesis: Main baseline (screenshot): same flow on the Flow 2: cq_input_files (SUCCESS)Flow YAMLid: cq_input_files
namespace: qa.cloudquery
tasks:
- id: cli
type: io.kestra.plugin.cloudquery.CloudQueryCLI
inputFiles:
extra.yml: "kind: destination"
namespaceFiles:
enabled: true
commands:
- cat config.yml extra.ymlGantt
Logs synthesis (screenshot) Flow 3: cq_no_namespace_files (SUCCESS, non-regression)Flow YAMLid: cq_no_namespace_files
namespace: qa.cloudquery
tasks:
- id: cli
type: io.kestra.plugin.cloudquery.CloudQueryCLI
commands:
- cloudquery --version
- test ! -f config.ymlGantt (screenshot)
Logs synthesis: Notes
|
What changes are being made and why?
This PR fixes the handling of
namespaceFilesin theCloudQueryCLItask.The
namespaceFileswere rendered but were not being passed to the underlyingCommandsWrapper, so the files were unavailable when executing the CloudQuery command.This change passes
namespaceFilestoCommandsWrapper, ensuring they are correctly available during execution.Closes #188
How the changes have been QAed?
The
CloudQueryCLIimplementation was updated to passnamespaceFilestoCommandsWrapper.The relevant CloudQuery CLI tests were executed to verify the change.
Setup Instructions
No additional setup is required.
Contributor Checklist ✅