kestra-io / kestra-io/plugin-scripts
Task runner plugin docs are loaded too eagerly (replace script plugin docs sometimes)
- Dominant language
- Java
- Stars
- 19
- Forks
- 33
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 9
Description
### Issue description
Nothing major, just a small annoyance that often the task runner plugin docs takes precedence when it shouldn't. To reproduce, try to navigate to any script plugin property defined after task runner -- instead of seeing script plugin docs, you'll see task runner docs.
Demo https://share.descript.com/view/p5dGR4nODx7
reproducer - navigate the cursor to script or commands and open plugin docs. You'll see task runner docs even though you expect to see dbt or python docs:
```yaml
id: dwh_and_analytics
namespace: tutorial
tasks:
- id: dbt
type: io.kestra.plugin.core.flow.WorkingDirectory
tasks:
- id: clone_repository
type: io.kestra.plugin.git.Clone
url: https://github.com/kestra-io/dbt-demo
branch: main
- id: dbt_build
type: io.kestra.plugin.dbt.cli.DbtCLI
taskRunner:
type: io.kestra.plugin.scripts.runner.docker.Docker
containerImage: ghcr.io/kestra-io/dbt-duckdb:latest
commands:
- dbt deps
- dbt build
profiles: |
jaffle_shop:
outputs:
dev:
type: duckdb
path: dbt.duckdb
extensions:
- parquet
fixed_retries: 1
threads: 16
timeout_seconds: 300
target: dev
- id: python
type: io.kestra.plugin.scripts.python.Script
outputFiles:
- "*.csv"
taskRunner:
type: io.kestra.plugin.scripts.runner.docker.Docker
containerImage: ghcr.io/kestra-io/duckdb:latest
script: >
import duckdb
import pandas as pd
conn = duckdb.connect(database='dbt.duckdb', read_only=False)
tables_query = "SELECT table_name FROM information_schema.tables WHERE
table_schema = 'main';"
tables = conn.execute(tables_query).fetchall()
# Export each table to CSV, excluding tables that start with 'raw' or
'stg'
for table_name in tables:
table_name = table_name[0]
# Skip tables with names starting with 'raw' or 'stg'
if not table_name.startswith('raw') and not table_name.startswith('stg'):
query = f"SELECT * FROM {table_name}"
df = conn.execute(query).fetchdf()
df.to_csv(f"{table_name}.csv", index=False)
conn.close()
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the YAML example by navigating to the script or commands properties and opening plugin docs. Trace the documentation resolution and loading order for task runner and script plugins; done means dbt or Python documentation is shown for those properties instead of task runner documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100