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

GET /kapacitor/v1/tasks does not return task template-id #2619

Closed
sranka opened this issue Sep 3, 2021 · 0 comments · Fixed by #2621
Closed

GET /kapacitor/v1/tasks does not return task template-id #2619

sranka opened this issue Sep 3, 2021 · 0 comments · Fixed by #2621
Assignees

Comments

@sranka
Copy link
Contributor

sranka commented Sep 3, 2021

Actual behavior:

GET /kapacitor/v1/tasks does not return template-id in the returned task list, it is not a supported field per https://github.com/influxdata/kapacitor/blob/v1.6.1/services/task_store/service.go#L487 . template-id is however properly returned when getting a particular task (https://github.com/influxdata/kapacitor/blob/v1.6.1/services/task_store/service.go#L1134).

Expected behavior:

  • template-id is OOTB returned in GET /kapacitor/v1/tasks
  • the kapactior swagger file adds (a read-only) template-id to the Task object, it should be already there since the get task operation returns it.

Rationale:
Tasks that were created from a template must be read-only in chronograf so that the users are not confused with something that cannot be effectively edited (in chronograf), this is already fixed in influxdata/chronograf#5805 . Additionally, templated tasks cannot be ever chronograf rules (their TICKScripts were not created by chronograf). This is already taken into account in the chronograf code, but it does not work prefectly because of the missing template-id in the task list. Chronograf now has to spend useless time with parsing and processing such templated tasks. If the task TICKScript can be parsed as a chronograf rule, the task then appears in the list of chronograf rules and can be clicked as a rule. The user is then however informed that it is not a chronograf rule that could be possibly managed. Fixing this issue would also fix such a weird user experience on the chronograf side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant