influxdata / influxdata/kapacitor
Support shared variables across TICK files
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
We have a very long tick script that is only a single file because we want to share a bunch of variables (like a POST url, the database to query, etc).
One way to solve this is to use env vars, as suggested in #1454 (which is still not supported).
Another way would be to allow an `import` statement of some kind that allows in-lining other tick scripts into a tick file. This would also help with the load directory feature, as then we could also separate tick files for better code separation, but still define a single template-id in the "task templates".
If using importing, then you need a way for the load directory feature to only load "top-level" tick scripts. For example, you could then start all library file names with an underscore or change the extension or something like that.
Contributor guide
Research direction
The issue names TICK files, the load directory feature, and task templates, but no implementation files or tests. Start by tracing how the load directory and task templates are handled, then review #1454 and clarify whether shared variables or imports are the intended scope. Done should include a defined behavior for nested files and top-level loading.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100