influxdata / influxdata/kapacitor
The "currentField" property of the "ec2Autoscale" does not populate the given field
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Running Kapacitor `1.5.2`.
The `ec2Autoscale` node has a property called `currentField` that takes a string which is used to name a field containing the current amount of instances in the targeted ec2 autoscale group.
This field does not seem to get populated.
```
|ec2Autoscale()
.groupName(asg_name)
.cluster(ec2_region)
.min(min_instances)
.max(max_instances)
.decreaseCooldown(decrease_cooldown)
.increaseCooldown(increase_cooldown)
.currentField('replicas')
.replicas(lambda: "replicas" + 1)
```
This configuration fails with the following error, most likely due to the "replicas" field being empty.
`err="failed to evaluate the replicas expression: Failed to handle 1 argument: left value is invalid value type"`
Contributor guide
Research direction
Start by locating the ec2Autoscale implementation and the handling of its currentField property, then reproduce the configuration shown with Kapacitor 1.5.2. Done means the configured field is populated with the current instance count and the replicas expression evaluates without the invalid-value error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100