-
Notifications
You must be signed in to change notification settings - Fork 31
docs: use the 'latest' GH release API for the latest extension or agent release #402
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
Merged
kruskall
merged 1 commit into
elastic:main
from
trentm:trentm/docs-gh-latest-release-sel
Sep 5, 2023
Merged
docs: use the 'latest' GH release API for the latest extension or agent release #402
kruskall
merged 1 commit into
elastic:main
from
trentm:trentm/docs-gh-latest-release-sel
Sep 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nt release The "Monitoring AWS Lambda $lang Functions" doc pages use some in-browser JS to interpolate the ARNs for the latest Lambda extension release and the latest APM agent release. This changes that JS to use the "latest release" GH API https://api.github.com/repos/elastic/${ghRepo}/releases/latest rather than listing all (or the first page of GH releases): https://api.github.com/repos/elastic/${ghRepo}/releases and picking the latest by `release.created_at`. GH releases for a repo have a sense of the "latest" release (see `--latest` flag to https://cli.github.com/manual/gh_release_create) even if it isn't the latest tag or published release in time. The Node.js APM agent will soon have 4.x releases and 3.x maintenance releases. It is possible that a 3.x release is the latest in time, but not marked as the "latest" release. This change ensures that the Lambda doc page will pick the correct (4.x) one.
kruskall
approved these changes
Aug 31, 2023
AlexanderWert
approved these changes
Sep 1, 2023
@kruskall Would you be willing to merge this? I don't have perms to do so. |
Sure thing! Sorry for the delay and thanks for the contribution! |
Thanks. |
bmorelli25
pushed a commit
to bmorelli25/apm-aws-lambda
that referenced
this pull request
Sep 7, 2023
…nt release (elastic#402) The "Monitoring AWS Lambda $lang Functions" doc pages use some in-browser JS to interpolate the ARNs for the latest Lambda extension release and the latest APM agent release. This changes that JS to use the "latest release" GH API https://api.github.com/repos/elastic/${ghRepo}/releases/latest rather than listing all (or the first page of GH releases): https://api.github.com/repos/elastic/${ghRepo}/releases and picking the latest by `release.created_at`. GH releases for a repo have a sense of the "latest" release (see `--latest` flag to https://cli.github.com/manual/gh_release_create) even if it isn't the latest tag or published release in time. The Node.js APM agent will soon have 4.x releases and 3.x maintenance releases. It is possible that a 3.x release is the latest in time, but not marked as the "latest" release. This change ensures that the Lambda doc page will pick the correct (4.x) one. (cherry picked from commit 9899932)
bmorelli25
pushed a commit
to bmorelli25/apm-aws-lambda
that referenced
this pull request
Sep 7, 2023
…nt release (elastic#402) The "Monitoring AWS Lambda $lang Functions" doc pages use some in-browser JS to interpolate the ARNs for the latest Lambda extension release and the latest APM agent release. This changes that JS to use the "latest release" GH API https://api.github.com/repos/elastic/${ghRepo}/releases/latest rather than listing all (or the first page of GH releases): https://api.github.com/repos/elastic/${ghRepo}/releases and picking the latest by `release.created_at`. GH releases for a repo have a sense of the "latest" release (see `--latest` flag to https://cli.github.com/manual/gh_release_create) even if it isn't the latest tag or published release in time. The Node.js APM agent will soon have 4.x releases and 3.x maintenance releases. It is possible that a 3.x release is the latest in time, but not marked as the "latest" release. This change ensures that the Lambda doc page will pick the correct (4.x) one. (cherry picked from commit 9899932)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
bmorelli25
added a commit
that referenced
this pull request
Sep 7, 2023
…nt release (#402) (#407) The "Monitoring AWS Lambda $lang Functions" doc pages use some in-browser JS to interpolate the ARNs for the latest Lambda extension release and the latest APM agent release. This changes that JS to use the "latest release" GH API https://api.github.com/repos/elastic/${ghRepo}/releases/latest rather than listing all (or the first page of GH releases): https://api.github.com/repos/elastic/${ghRepo}/releases and picking the latest by `release.created_at`. GH releases for a repo have a sense of the "latest" release (see `--latest` flag to https://cli.github.com/manual/gh_release_create) even if it isn't the latest tag or published release in time. The Node.js APM agent will soon have 4.x releases and 3.x maintenance releases. It is possible that a 3.x release is the latest in time, but not marked as the "latest" release. This change ensures that the Lambda doc page will pick the correct (4.x) one. (cherry picked from commit 9899932) Co-authored-by: Trent Mick <[email protected]>
bmorelli25
added a commit
that referenced
this pull request
Sep 7, 2023
…nt release (#402) (#408) The "Monitoring AWS Lambda $lang Functions" doc pages use some in-browser JS to interpolate the ARNs for the latest Lambda extension release and the latest APM agent release. This changes that JS to use the "latest release" GH API https://api.github.com/repos/elastic/${ghRepo}/releases/latest rather than listing all (or the first page of GH releases): https://api.github.com/repos/elastic/${ghRepo}/releases and picking the latest by `release.created_at`. GH releases for a repo have a sense of the "latest" release (see `--latest` flag to https://cli.github.com/manual/gh_release_create) even if it isn't the latest tag or published release in time. The Node.js APM agent will soon have 4.x releases and 3.x maintenance releases. It is possible that a 3.x release is the latest in time, but not marked as the "latest" release. This change ensures that the Lambda doc page will pick the correct (4.x) one. (cherry picked from commit 9899932) Co-authored-by: Trent Mick <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The "Monitoring AWS Lambda $lang Functions" doc pages use some
in-browser JS to interpolate the ARNs for the latest Lambda extension
release and the latest APM agent release. This changes that JS to use
the "latest release" GH API
https://api.github.com/repos/elastic/${ghRepo}/releases/latest
rather than listing all (or the first page of GH releases):
https://api.github.com/repos/elastic/${ghRepo}/releases
and picking the latest by
release.created_at
.GH releases for a repo have a sense of the "latest" release
(see
--latest
flag to https://cli.github.com/manual/gh_release_create)even if it isn't the latest tag or published release in time. The
Node.js APM agent will soon have 4.x releases and 3.x maintenance
releases. It is possible that a 3.x release is the latest in time, but
not marked as the "latest" release. This change ensures that the
Lambda doc page will pick the correct (4.x) one.
One of those "Monitoring AWS Lambda ..." docs pages: https://www.elastic.co/guide/en/apm/agent/nodejs/current/lambda.html
Testing notes
I tested this with a local build of the Node.js APM agent docs.
I've confirmed that this
https://api.github.com/repos/elastic/${ghRepo}/releases/latest
API works withthe apm-aws-lambda, apm-agent-python, and apm-agent-java repos -- the only other ones for which this doc JS is run.