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

rule: Added ability to specify multiple remote write targets. #4927

Merged
merged 1 commit into from
Dec 8, 2021
Merged

Conversation

bwplotka
Copy link
Member

@bwplotka bwplotka commented Dec 6, 2021

This is mainly for non surprising remote write YAML format, but also for ability
to add more targets, similar to agent supported model.

Signed-off-by: Bartlomiej Plotka bwplotka@gmail.com

@bwplotka bwplotka requested a review from yeya24 December 6, 2021 20:20
URL: &common_cfg.URL{URL: rwURL},
Name: "thanos-receiver",
})
}})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a test case for multiple remote write targets?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. maybe not, since it's the Agent logic? We don't want to test Agent really

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whatever, let's do it ;p

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

This is mainly for non surprising remote write YAML format, but also for ability
to add more targets, similar to agent supported model.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka
Copy link
Member Author

bwplotka commented Dec 7, 2021

PTAL @yeya24

@bwplotka bwplotka requested a review from hanjm December 8, 2021 12:14
@bwplotka
Copy link
Member Author

bwplotka commented Dec 8, 2021

@hanjm wanna help in review/approve? Your reviews counts! (:

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!
LGTM

@yeya24 yeya24 merged commit 19e97b7 into main Dec 8, 2021
jordy1024 pushed a commit to jordy1024/thanos that referenced this pull request Dec 12, 2021
…-io#4927)

This is mainly for non surprising remote write YAML format, but also for ability
to add more targets, similar to agent supported model.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
jordy1024 pushed a commit to jordy1024/thanos that referenced this pull request Dec 12, 2021
…-io#4927)

This is mainly for non surprising remote write YAML format, but also for ability
to add more targets, similar to agent supported model.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: wenmaoba <wenmaoba@tencent.com>
@ahurtaud
Copy link
Contributor

ahurtaud commented Mar 9, 2022

Hello,

Wasn't this change a BREAKING change instead of ADDED feature ?

I will confirm after fixing tomorrow my rule component on my side, but after upgrading from v0.24 to v0.25:
Because my remote_write config was not an array, it was not taken into account, and I had no error neither. At least my k8s pod was not crashing, so liveness probe was ok, but not remote writing anything :)

I have downgraded to v0.24 before switching to array, but I think changelog can be improved if that's the case.

EDIT: I was wrong, it errored correctly, still a breaking change though:

err="yaml: unmarshal errors:\n  line 2: cannot unmarshal !!seq into struct

@ahurtaud
Copy link
Contributor

EDIT2 ^^': I was right, and here is the diff:
on 0.24 a valid remote write config was:

url: http://e2e_test_rule_remote_write-receive-1:8081/api/v1/receive
name: thanos-receiver
follow_redirects: false

on 0.25, a valid one is:

remote_write:
- url: http://e2e_test_rule_remote_write-receive-1:8081/api/v1/receive
  name: thanos-receiver
  follow_redirects: false

Which means that version 0.25 with a config for 0.24 is not making the ruler crash but not taking the remote_write config,
because the yaml key remote_write did not exist

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 this pull request may close these issues.

3 participants