Closed valorcz closed 8 months ago
@valorcz I think you need to replace credentials
in your args with cred
?
See the pipeline docs here for an example - https://hub.flowpipe.io/mods/turbot/jira/pipelines/jira.pipeline.list_issues#use
Having said that, I believe this error is too hard to understand. @vhadianto can we detect that an incorrect / invalid arg has been passed through and error at that point with a better help message?
I apologize, I made a mistake while sanitizing my files for this Issue. I do use creds
in my args, but that's when I can see the problem reported.
With credentials
, the error is quite explanatory:
[first_pipeline] Bad Request: unknown parameter specified 'credentials'
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Apology I missed this issue when it was raised. I believe the parameter is validated correctly with the correct error message as @valorcz shown above. I've tested this myself and I can see the following error message when I passed an incorrect parameter:
[parent_invalid_param] Bad Request: unknown parameter specified 'credentials'
[parent_invalid_param] Failed 39ms
I think the error here is actually getting the issues from JIRA?
@cbruno10
Hey @valorcz, I have tried to reproduce the above issue but failed to do so, below are the steps I have followed - reference doc - https://hub.flowpipe.io/mods/turbot/jira Flowpipe version - v0.4.0
vi ~/.flowpipe/config/jira.fpc
credential "jira" "jira_cred" { base_url = "https://turbot.atlassian.net/" api_token = "ATATT3xFfGF0PQiGFiLjR3ndDlSzpyTJlwmKKhVa_idyF" username = "sourav@turbot.com" }
- Initialize and install the mod
mkdir my_mod cd my_mod flowpipe mod init flowpipe mod install github.com/turbot/flowpipe-mod-jira
- Create a sample pipeline
vi my_pipeline.fp
pipeline "my_pipeline" {
step "pipeline" "list_issues" { pipeline = jira.pipeline.list_issues args = { project_key = "SBT" cred = "jira_cred" } } }
- Run the pipeline
➜ my_mod flowpipe pipeline run my_pipeline
[flowpipe] Execution ID: exec_cnpfgu4o47mn0fm71mrg
[my_pipeline] Starting pipeline
[my_pipeline.list_issues] Starting pipeline
[list_issues] Starting pipeline
[list_issues.list_issues[0]] Starting http: GET https://turbot.atlassian.net//rest/api/2/search?jql=project=SBT
[list_issues.list_issues[0]] Complete: 200 1s
[list_issues] Output issues = {
"issues": [
{
"expand": "operations,versionedRepresentations,editmeta,changelog,customfield_10010.requestTypePractice,renderedFields",
"fields": {
"aggregateprogress": {
"progress": 0,
"total": 0
},
"aggregatetimeestimate": null,
"aggregatetimeoriginalestimate": null,
"aggregatetimespent": null,
"assignee": null,
"components": [],
"created": "2023-12-13T09:46:08.478+0300",
Please let me know if I missed anything also could you please try from your end as well to check if the issue persists?
Hi @bigdatasourav,
I have updated the mods and tested the pipeline again, and now all seems to work just fine!
Thank you very much for looking into this. Not sure what exactly fixed it, but that's not important :) I can proceed with testing how can Flowpipe make my life easier.
Thanks again!
Describe the bug While trying the initial JIRA sample code, I am getting an error which I am not able to fix.
Flowpipe version (
flowpipe -v
) v0.1.0To reproduce Steps to reproduce the behavior (please include relevant code and/or commands).
This is the code I am using, modified a bit to get the right credentials:
Then running:
Without the
--verbose
flag, I can see this:Expected behavior
Expected behavior is to get the list of all tickets open for a given project, without any error.
Additional context
With the
--verbose
flag, I can see the data returned from JIRA, and the status supports it: