Add probot Stale integration#16
Closed
agocs wants to merge 1 commit into
Closed
Conversation
duncanpharvey
added a commit
that referenced
this pull request
Jul 18, 2025
…cript (#748) Currently the .NET install script for Serverless-Init makes unauthenticated requests to the Github API, sometimes resulting in rate limiting. This PR adds a `GITHUB_TOKEN` to be passed as a [Docker secret](https://docs.docker.com/build/building/secrets/) to the .NET install script to allow for an increased rate limit. If no `GITHUB_TOKEN` is passed then requests will be unauthenticated as they were before this change. ## Motivation #734 ## Additional Notes - Check if a `GITHUB_TOKEN` environment variable is set. If it is, pass it in the `Authorization` header with `Bearer` - Add a `status_code` attribute to the response json and print it for troubleshooting - Use `jq` to parse the response json * Note that control characters needed to be stripped from the Github responses in order to be successfully parsed - If the tracer version is not parsed from the response json, presumably due to rate limiting or some other issue on Github's end, exit the script Github token provided -> success ``` #16 6.759 Github token provided #16 7.243 Status code of version request: 200 #16 7.291 Downloading version 3.21.0 of the .NET tracer into /tmp/datadog-dotnet-apm.tar.gz #16 7.291 Github token provided #16 10.08 Status code of download request: 200 ``` No Github token provided -> success ``` #16 7.664 Github token not provided #16 7.967 Status code of version request: 200 #16 8.018 Downloading version 3.21.0 of the .NET tracer into /tmp/datadog-dotnet-apm.tar.gz #16 8.019 Github token not provided #16 11.10 Status code of download request: 200 ``` No Github token provided -> rate limited ``` 6.518 Github token not provided 6.780 Status code of version request: 403 6.828 Error: Could not determine the tracer version. Exiting. ``` ### Usage - Pass value in `GITHUB_TOKEN` environment variable to the Docker secret `github-token`. ``` docker build -t <image> --secret id=github-token,env=GITHUB_TOKEN . ``` - In the Dockerfile, read the value of the `github-token` secret into the `GITHUB_TOKEN` environment variable so it can be passed in the authentication header of the Github API request. ``` RUN --mount=type=secret,id=github-token,env=GITHUB_TOKEN \ chmod +x /app/dotnet.sh && /app/dotnet.sh ``` Relevant documentation to update following this change: - https://docs.datadoghq.com/serverless/guide/gcr_serverless_init/?tab=dotnet - https://docs.datadoghq.com/serverless/guide/aca_serverless_init/?tab=dotnet - https://docs.datadoghq.com/serverless/guide/azure_app_service_linux_containers_serverless_init/?tab=dotnet
litianningdatadog
pushed a commit
that referenced
this pull request
Dec 1, 2025
* update `ReportMetrics` to be an enum to allow `Elevator` metrics allows us to have a diff to check in the other components * set metrics for lifecycle given the type of report * only send log for `OnDemand` metrics * send correct enhanced metrics given the type of report * add doc coments * fmt
duncanpharvey
added a commit
that referenced
this pull request
Dec 1, 2025
…#949) ## Overview Fixes below error: https://github.com/DataDog/datadog-lambda-extension/actions/runs/19829559230/job/56812757592 ``` #16 [compresser 3/10] RUN apt-get install -y zip binutils #16 0.095 Reading package lists... #16 1.033 Building dependency tree... #16 1.217 Reading state information... #16 1.357 The following additional packages will be installed: #16 1.358 binutils-common binutils-x86-64-linux-gnu libbinutils libctf-nobfd0 libctf0 #16 1.358 unzip #16 1.359 Suggested packages: #16 1.359 binutils-doc #16 1.392 The following NEW packages will be installed: #16 1.392 binutils binutils-common binutils-x86-64-linux-gnu libbinutils libctf-nobfd0 #16 1.393 libctf0 unzip zip #16 1.648 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. #16 1.648 Need to get 3769 kB of archives. #16 1.648 After this operation, 15.7 MB of additional disk space will be used. #16 1.648 Err:1 http://security.ubuntu.com/ubuntu jammy-security/main amd64 binutils-common amd64 2.38-4ubuntu2.11 #16 1.648 404 Not Found [IP: 91.189.91.82 80] #16 1.727 Err:2 http://security.ubuntu.com/ubuntu jammy-security/main amd64 libbinutils amd64 2.38-4ubuntu2.11 #16 1.727 404 Not Found [IP: 91.189.91.82 80] #16 1.727 Err:3 http://security.ubuntu.com/ubuntu jammy-security/main amd64 libctf-nobfd0 amd64 2.38-4ubuntu2.11 #16 1.727 404 Not Found [IP: 91.189.91.82 80] #16 1.727 Err:4 http://security.ubuntu.com/ubuntu jammy-security/main amd64 libctf0 amd64 2.38-4ubuntu2.11 #16 1.727 404 Not Found [IP: 91.189.91.82 80] #16 1.727 Err:5 http://security.ubuntu.com/ubuntu jammy-security/main amd64 binutils-x86-64-linux-gnu amd64 2.38-4ubuntu2.11 #16 1.727 404 Not Found [IP: 91.189.91.82 80] #16 1.727 Err:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 binutils amd64 2.38-4ubuntu2.11 #16 1.727 404 Not Found [IP: 91.189.91.82 80] #16 1.838 Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 unzip amd64 6.0-26ubuntu3.2 [175 kB] #16 2.515 Get:8 http://archive.ubuntu.com/ubuntu jammy/main amd64 zip amd64 3.0-12build2 [176 kB] #16 2.625 Fetched 350 kB in 1s (287 kB/s) #16 2.625 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-common_2.38-4ubuntu2.11_amd64.deb 404 Not Found [IP: 91.189.91.82 80] #16 2.625 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/libbinutils_2.38-4ubuntu2.11_amd64.deb 404 Not Found [IP: 91.189.91.82 80] #16 2.625 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/libctf-nobfd0_2.38-4ubuntu2.11_amd64.deb 404 Not Found [IP: 91.189.91.82 80] #16 2.625 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/libctf0_2.38-4ubuntu2.11_amd64.deb 404 Not Found [IP: 91.189.91.82 80] #16 2.625 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-x86-64-linux-gnu_2.38-4ubuntu2.11_amd64.deb 404 Not Found [IP: 91.189.91.82 80] #16 2.625 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.38-4ubuntu2.11_amd64.deb 404 Not Found [IP: 91.189.91.82 80] #16 2.625 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? #16 ERROR: process "/bin/sh -c apt-get install -y zip binutils" did not complete successfully: exit code: 100 ``` ## Testing
This file contains hidden or 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
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.
No description provided.