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

fix: change receiver model pointer to value #3338

Merged
merged 2 commits into from Apr 28, 2023

Conversation

fgouteroux
Copy link
Contributor

Hello,

There is a bug when calling /api/v2/receivers, it return the same receiver name multiple times.

Expected:

curl http://localhost:9093/api/v2/receivers
[{"name":"web.hook"},{"name":"web.hook2"}]

Got:

$ curl http://localhost:9093/api/v2/receivers
[{"name":"web.hook2"},{"name":"web.hook2"}]

I think it was related to this change #3209.

@fgouteroux fgouteroux force-pushed the fix-api-v2-receivers branch 3 times, most recently from 9e28e3d to d14eb77 Compare April 25, 2023 10:13
Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

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

Thanks! Please see my comment.

api/v2/api.go Show resolved Hide resolved
@gotjosh gotjosh added the waiting-for-user-input The Pull Request or Issue is waiting for input from the user that reported it or created it. label Apr 28, 2023
@fgouteroux fgouteroux force-pushed the fix-api-v2-receivers branch 2 times, most recently from e739162 to 59fcf78 Compare April 28, 2023 13:39
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
@fgouteroux fgouteroux requested a review from gotjosh April 28, 2023 13:49
Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

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

LGTM

I just have one small nit, can you please address it really quickly? 😄

api/v2/api_test.go Outdated Show resolved Hide resolved
Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
@gotjosh
Copy link
Member

gotjosh commented Apr 28, 2023

Thank you very much for your contribution!

@gotjosh gotjosh merged commit 29ed858 into prometheus:main Apr 28, 2023
5 checks passed
@fgouteroux
Copy link
Contributor Author

Thanks for your review ! Happy to make my 1rst contribution !

gotjosh pushed a commit that referenced this pull request Aug 7, 2023
* fix: change receiver pointer to value and add test

Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
---------

Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
radek-ryckowski pushed a commit to goldmansachs/alertmanager that referenced this pull request Nov 6, 2023
* fix: change receiver pointer to value and add test

Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
---------

Signed-off-by: François Gouteroux <francois.gouteroux@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-user-input The Pull Request or Issue is waiting for input from the user that reported it or created it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants