Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when a task depends on another task that cannot be resolved #207

Open
NiklasRosenstein opened this issue Feb 27, 2024 · 0 comments
Labels
only: kraken-core This issue affects only kraken-core. type: enhancement New feature or request

Comments

@NiklasRosenstein
Copy link
Contributor

Example:

from kraken.std.cargo import cargo_publish, cargo_login, cargo_registry, cargo_sync_config

cargo_registry("local", "http://localhost:35504/", read_credentials=("username", "password"), publish_token="xxx")
# cargo_sync_config()
cargo_login()
cargo_publish(registry="local")

Because cargo_login() hardcodes a dependency on :cargoSyncConfig, running kraken in this project results in:

$ kraken query tree --all -v
[02/27/24 13:23:18] ERROR    No task matched the selector ':cargoSyncConfig'. Not finding what you're looking for? You can use the 'kraken query tree --all' command to list every available task.                       main.py:588
Exit code: 1 (status: FAILED)

For one, we don't enrich the error with additional contextual information (e.g. which task was requiring this task?) and we also drop the exception traceback in kraken.core.cli.main.on_exception() (under the assumption that we'd only get this error when passing a bad task name via the CLI in which case the error message is not-so-not-obvious).

@NiklasRosenstein NiklasRosenstein added type: enhancement New feature or request only: kraken-core This issue affects only kraken-core. labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
only: kraken-core This issue affects only kraken-core. type: enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant