turbot / pipe-fittings

Shared components for use across pipe projects.
https://github.com/turbot
GNU Affero General Public License v3.0
12 stars 4 forks source link

Improve error message if variables are defined incorrectly #356

Closed cbruno10 closed 6 months ago

cbruno10 commented 6 months ago

Describe the bug If I have a flowpipe.fpvars:

test = abc

When I try to run a pipeline or start a server, I get an unhelpful error:

cbruno@M1P trello % flowpipe pipeline run get_list --arg list_id=abc
Error: Variables not allowed: Variables may not be used here.

Flowpipe version (flowpipe -v) v0.3.0

To reproduce Create the file above and run flowpipe server in any mod

Expected behavior The error message should tell me where the offending line is

Additional context Add any other context about the problem here.

vhadianto commented 6 months ago

Should be fixed in the upcoming v0.3.1.

New error message will include the filename and line number.

Error: Variables not allowed: Variables may not be used here.
(internal/es/estest/single_pipeline/flowpipe.fpvars:3,7)
Variables not allowed: Variables may not be used here.
(internal/es/estest/single_pipeline/flowpipe.fpvars:1,8)