Closed kamil-oberaj closed 10 months ago
You say this first occurred last week, did this ever run before? Can you provide the logs of the last time this worked?
You say this is a private repo, is this hosted at github.com or in an enterprise environment? In the latter case, can you check that environment variable GITHUB_API_URL
is set to your enterprise URL?
The error indicates that the token given to input github_token
is not authenticated for your repo. This is unrelated to the setup that creates the test result files (.Net).
Also strange that the failing action / job kills your self-hosted runner.
Okay, so I've checked and it occurred 2 months ago and it is not fixed till this day.
Valid run logs:
2023-11-19T00:23:54.8411367Z Artifact TestResults has been successfully uploaded!
2023-11-19T00:23:54.8647559Z ##[group]Run EnricoMi/publish-unit-test-result-action@v2
2023-11-19T00:23:54.8647989Z with:
2023-11-19T00:23:54.8648216Z trx_files: TestResults/**/*.trx
2023-11-19T00:23:54.8648799Z github_token: ***
2023-11-19T00:23:54.8649063Z github_token_actor: github-actions
2023-11-19T00:23:54.8649369Z github_retries: 10
2023-11-19T00:23:54.8649617Z check_name: Test Results
2023-11-19T00:23:54.8649881Z comment_mode: always
2023-11-19T00:23:54.8650126Z fail_on: test failures
2023-11-19T00:23:54.8650374Z action_fail: false
2023-11-19T00:23:54.8650632Z action_fail_on_inconclusive: false
2023-11-19T00:23:54.8650924Z time_unit: seconds
2023-11-19T00:23:54.8651161Z report_suite_logs: none
2023-11-19T00:23:54.8651414Z ignore_runs: false
2023-11-19T00:23:54.8651643Z job_summary: true
2023-11-19T00:23:54.8651889Z compare_to_earlier_commit: true
2023-11-19T00:23:54.8652181Z pull_request_build: merge
2023-11-19T00:23:54.8652536Z check_run_annotations: all tests, skipped tests
2023-11-19T00:23:54.8652896Z seconds_between_github_reads: 0.25
2023-11-19T00:23:54.8653204Z seconds_between_github_writes: 2.0
2023-11-19T00:23:54.8653541Z json_thousands_separator:
2023-11-19T00:23:54.8653825Z json_suite_details: false
2023-11-19T00:23:54.8654097Z json_test_case_results: false
2023-11-19T00:23:54.8654386Z search_pull_requests: false
2023-11-19T00:23:54.8654642Z env:
2023-11-19T00:23:54.8654870Z DOTNET_INSTALL_DIR: /tmp/dotnet-install
2023-11-19T00:23:54.8655190Z DOTNET_ROOT: /tmp/dotnet-install
2023-11-19T00:23:54.8655638Z ##[endgroup]
2023-11-19T00:23:54.8879634Z ##[command]/usr/local/bin/docker run --name ghcrioenricomipublishunittestresultactionv2110_2520cc --label ba54c3 --workdir /github/workspace --rm -e "DOTNET_INSTALL_DIR" -e "DOTNET_ROOT" -e "INPUT_TRX_FILES" -e "INPUT_GITHUB_TOKEN" -e "INPUT_GITHUB_TOKEN_ACTOR" -e "INPUT_GITHUB_RETRIES" -e "INPUT_COMMIT" -e "INPUT_CHECK_NAME" -e "INPUT_COMMENT_TITLE" -e "INPUT_COMMENT_MODE" -e "INPUT_FAIL_ON" -e "INPUT_ACTION_FAIL" -e "INPUT_ACTION_FAIL_ON_INCONCLUSIVE" -e "INPUT_FILES" -e "INPUT_JUNIT_FILES" -e "INPUT_NUNIT_FILES" -e "INPUT_XUNIT_FILES" -e "INPUT_TIME_UNIT" -e "INPUT_TEST_FILE_PREFIX" -e "INPUT_REPORT_INDIVIDUAL_RUNS" -e "INPUT_REPORT_SUITE_LOGS" -e "INPUT_DEDUPLICATE_CLASSES_BY_FILE_NAME" -e "INPUT_LARGE_FILES" -e "INPUT_IGNORE_RUNS" -e "INPUT_JOB_SUMMARY" -e "INPUT_COMPARE_TO_EARLIER_COMMIT" -e "INPUT_PULL_REQUEST_BUILD" -e "INPUT_EVENT_FILE" -e "INPUT_EVENT_NAME" -e "INPUT_TEST_CHANGES_LIMIT" -e "INPUT_CHECK_RUN_ANNOTATIONS" -e "INPUT_CHECK_RUN_ANNOTATIONS_BRANCH" -e "INPUT_SECONDS_BETWEEN_GITHUB_READS" -e "INPUT_SECONDS_BETWEEN_GITHUB_WRITES" -e "INPUT_SECONDARY_RATE_LIMIT_WAIT_SECONDS" -e "INPUT_JSON_FILE" -e "INPUT_JSON_THOUSANDS_SEPARATOR" -e "INPUT_JSON_SUITE_DETAILS" -e "INPUT_JSON_TEST_CASE_RESULTS" -e "INPUT_SEARCH_PULL_REQUESTS" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/XXX-XXX-XXX-XXX/XXX-XXX-XXX-XXX":"/github/workspace" ghcr.io/enricomi/publish-unit-test-result-action:v2.11.0
2023-11-19T00:23:55.9016711Z 2023-11-19 00:23:55 +0000 - publish - INFO - Available memory to read files: 28.1 GiB
2023-11-19T00:23:55.9026181Z 2023-11-19 00:23:55 +0000 - publish - INFO - Reading TRX files TestResults/**/*.trx (10 files, 2.0 MiB)
2023-11-19T00:23:55.9665142Z 2023-11-19 00:23:55 +0000 - publish - INFO - Finished reading 10 files in 0.06 seconds
2023-11-19T00:23:56.6588529Z 2023-11-19 00:23:56 +0000 - publish - INFO - Publishing success results for commit c91e616a8bddf643afe2082aa55d084f17578429
2023-11-19T00:23:57.6523162Z 2023-11-19 00:23:57 +0000 - publish - INFO - Created check https://github.com/XXX/XXX-XXX-XXX-XXX/runs/18818040753
2023-11-19T00:23:57.6541535Z 2023-11-19 00:23:57 +0000 - publish - INFO - Created job summary
2023-11-19T00:23:58.9032001Z 2023-11-19 00:23:58 +0000 - publish - INFO - There is no pull request for commit c91e616a8bddf643afe2082aa55d084f17578429
2023-11-19T00:23:59.1327647Z Post job cleanup.
The env var GITHUB_API_URL
is set by the GITHUB runner, try to add this step to see the environment variable:
steps:
- name: env
run: echo $GITHUB_API_URL
shell: bash
Your second log says Created check https://github.com/XXX/XXX-XXX-XXX-XXX/runs/18818040753
, so that was a public / private repo on public github.com
and not an enterprise installation. Did you move to an enterprise environment in within the last to months?
Hey, sorry for the late response - I was away on vacation. I'll provide the answers later today
I saw Github runners crash when disk went full.
Okay, so the steps You've provided shown me this (screen):
So we're not using the GH runners, we use self-hosted runners with quite a large memory available. I am not sure if this is the .NET test runner fault, because the workflow crashes on test process, but the funny thing is that the tests are actually done and we've the tests summary generated
It might be out of memory, I'll ask devops group to confirm that
So the runner crashed on kernel not on OOM error. The OOM error produces other response, not the one presented in this thread.
Edit: I've switched to GitHub Runners and the workflow passed. Interesting
GITHUB_API_URL
points to your enterprise URL, not the public github.com
.GITHUB_API_URL
being set correctly, which is why that bit is working.Please run the publish action with the following option to get more insights into whether the action finishes:
with:
log_level: DEBUG
Okay, thank You so much! I'll ask devops team to fix that. Hope that will work. Anyway now, that we're using Github runners and the issue is solved, I can close the issue.
Please note that all information belongs to private repo and I cannot share anymore private information (I'll do whatever I can to help resolving this issue)
Affected versions (the one in use): 5.1.24 & 5.2.0
First occurrence: Around last week
Action steps:
actions/checkout@3
/tmp/dotnet-install
dotnet restore
--configuration Release --no-restore
-c Release
dotnet test
to run tests using--filter 'FullyQualifiedName!~XXX.Specs' --settings coverage.settings --results-directory "TestResults" --collect:"XPlat Code Coverage" --logger "trx;LogFilePrefix=TestResults.trx" --no-build --configuration Release
danielpalme/ReportGenerator-GitHub-Action@5.1.24
and save it toTestResults
directoryactions/upload-artifact@v3
EnricoMi/publish-unit-test-result-action@v2
withtrx_files: "TestResults/**/*.trx"
The result of broken action is:
Logs