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

[apm] Return 200 instead of 404 when agent configuration does not exist. #113273

Merged
merged 2 commits into from
Sep 29, 2021

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Sep 28, 2021

Summary

Implements #113272 to return a 200 with an empty body instead of a 404 when an agent configuration is not found.

Checklist

  • The change has been tested with a current version of APM Server, and is confirmed to not introdue any apm-agent facing breaking change, therefore is backwards compatible.

Steps to reproduce:

  1. Start Kibana from this branch
  2. Start APM Server
  3. Send request to APM Server for fetching a non-existing agent config, observe that apm-server response is the same as before the Kibana change.
curl -i -k "http://localhost:8200/config/v1/agents?service.name=xyz"

Response:

HTTP/1.1 200 OK
Access-Control-Expose-Headers: Etag
Cache-Control: max-age=30, must-revalidate
Content-Type: application/json
Etag: "-"
X-Content-Type-Options: nosniff
Date: Tue, 28 Sep 2021 14:02:18 GMT
Content-Length: 3

{}

fixes #113272

cc @elastic/apm-server

@simitt simitt requested a review from sorenlouv September 28, 2021 14:23
@simitt simitt requested a review from a team as a code owner September 28, 2021 14:23
@botelastic botelastic bot added the Team:APM - DEPRECATED Use Team:obs-ux-infra_services. label Sep 28, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@simitt
Copy link
Contributor Author

simitt commented Sep 29, 2021

/test

@sorenlouv
Copy link
Member

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@simitt simitt added the auto-backport Deprecated - use backport:version if exact versions are needed label Sep 29, 2021
@simitt
Copy link
Contributor Author

simitt commented Sep 29, 2021

@sqren is auto-backport the right label to set for backporting this to 7.15.1 and are you ok with releasing as a patch fix or should it go to 7.16?

@sorenlouv
Copy link
Member

sorenlouv commented Sep 29, 2021

@sqren is auto-backport the right label to set for backporting this to 7.15.1 and are you ok with releasing as a patch fix or should it go to 7.16?

Yes, that's the right label. And backporting to 7.15.1 sounds ok. I'm honestly not sure what the policy is on changing the API like this but I think it can be seen as a bug fix.

@simitt simitt merged commit 2ce47f8 into elastic:master Sep 29, 2021
@kibanamachine
Copy link
Contributor

The following labels were identified as gaps in your version labels and will be added automatically:

  • v7.16.0

If any of these should not be on your pull request, please manually remove them.

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x
7.15

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Sep 29, 2021
…st. (#113273) (#113411)

fixes #113272

Co-authored-by: Silvia Mitter <silvia.mitter@elastic.co>
kibanamachine added a commit that referenced this pull request Sep 29, 2021
…st. (#113273) (#113410)

fixes #113272

Co-authored-by: Silvia Mitter <silvia.mitter@elastic.co>
@sorenlouv sorenlouv added v7.3.0 v7.4.0 v7.5.0 v7.6.0 v7.7.0 v7.8.0 v7.9.0 v5.1.2 auto-backport Deprecated - use backport:version if exact versions are needed and removed auto-backport Deprecated - use backport:version if exact versions are needed labels Oct 7, 2021
@kibanamachine
Copy link
Contributor

The following labels were identified as gaps in your version labels and will be added automatically:

  • v7.1.0

If any of these should not be on your pull request, please manually remove them.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
5.0 Commit could not be cherrypicked due to conflicts
6.0 Commit could not be cherrypicked due to conflicts
5.2 Commit could not be cherrypicked due to conflicts
5.1 Commit could not be cherrypicked due to conflicts
5.3 Commit could not be cherrypicked due to conflicts
5.4 Commit could not be cherrypicked due to conflicts
5.5 Commit could not be cherrypicked due to conflicts
6.1 Commit could not be cherrypicked due to conflicts
5.6 Commit could not be cherrypicked due to conflicts
7.0 Commit could not be cherrypicked due to conflicts
6.2 Commit could not be cherrypicked due to conflicts
6.3 Commit could not be cherrypicked due to conflicts
6.4 Commit could not be cherrypicked due to conflicts
6.5 Commit could not be cherrypicked due to conflicts
6.6 Commit could not be cherrypicked due to conflicts
6.7 Commit could not be cherrypicked due to conflicts
7.2 Commit could not be cherrypicked due to conflicts
6.8 Commit could not be cherrypicked due to conflicts
7.1 Commit could not be cherrypicked due to conflicts
7.3 Commit could not be cherrypicked due to conflicts
7.4 Commit could not be cherrypicked due to conflicts
7.5 Commit could not be cherrypicked due to conflicts
7.7
7.6 Commit could not be cherrypicked due to conflicts
7.10
7.8
7.9
7.11
7.12
7.14
7.13

Successful backport PRs will be merged automatically after passing CI.

To backport manually run:
node scripts/backport --pr 113273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment