Comments (15)
Or can this be somehow handled gracefully in code itself
Yes, I will make it log a warning but not fail like it currently does.
from publish-unit-test-result-action.
The action seems to request {GITHUB_API_URL}/graphql
, which resolves in your setup to https://<our.fqdn.here>/api/v3/graphql
, which I think is wrong.
Can you remove the GITHUB_API_URL: https://<our.fqdn.here>/api/v3/
line from your action config and try again?
Can you please also check what the default value of GITHUB_API_URL
and GITHUB_GRAPHQL_URL
is in your setup? I suspect it is {GITHUB_API_URL}/graphql
. Simply add this step to wour workflow to see all environment variabls provided by the action runner:
- name: Debug Action
uses: hmarr/[email protected]
To be honest, the action should use GITHUB_GRAPHQL_URL
, which I am going to fix.
from publish-unit-test-result-action.
The GITHUB_API_URL
env var should work as expected. Others have used the action in Enterprise environments, see #56. I think you do not need to add it via the env
section in your config as the action runner provide this env var for you.
Anyway, it looks like the action can create a check run and the PR comment. This means, it is talking to the right URL. After creating the comment it checks for existing comments to hide older ones. For this it connects to the GraphQL API of your GitHub Enterprise server. Looks like that does not exist. You can disable hiding comments by adding hide_comments: off
to your config.
Can you also try to add log_level: DEBUG
to your settings to get some more output. Please obfuscate the output where needed.
from publish-unit-test-result-action.
More feedback
When config property comment_on_pr: false
is provided build does NOT fail.
As of now I cannot provide details regarding GraphQL API - no having permissions in my company GHE.
Debug logs:
/usr/bin/docker run --name b1cbc5d7d54bce36914832bd99e412289d72e3_e4df2b --label b1cbc5 --workdir /github/workspace --rm -e JAVA_HOME_11.0.10_x64 -e JAVA_HOME -e JAVA_HOME_11_0_10_X64 -e INPUT_FILES -e INPUT_LOG_LEVEL -e INPUT_GITHUB_TOKEN -e INPUT_COMMIT -e INPUT_CHECK_NAME -e INPUT_COMMENT_TITLE -e INPUT_REPORT_INDIVIDUAL_RUNS -e INPUT_DEDUPLICATE_CLASSES_BY_FILE_NAME -e INPUT_HIDE_COMMENTS -e INPUT_COMMENT_ON_PR -e INPUT_PULL_REQUEST_BUILD -e INPUT_TEST_CHANGES_LIMIT -e INPUT_CHECK_RUN_ANNOTATIONS -e INPUT_CHECK_RUN_ANNOTATIONS_BRANCH -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_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_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/_work/_temp/_github_home":"/github/home" -v "/home/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/_work/<repo-name-here>/<repo-name-here>":"/github/workspace" b1cbc5:d7d54bce36914832bd99e412289d72e3
2021-03-15 08:47:11 +0000 - publish-unit-test-results - DEBUG - action triggered by 'pull_request' event
2021-03-15 08:47:11 +0000 - publish-unit-test-results - INFO - reading target/surefire-reports/**/*.xml
2021-03-15 08:47:11 +0000 - publish-unit-test-results - DEBUG - reading ['target/surefire-reports/TEST-<redacted>.xml']
2021-03-15 08:47:11 +0000 - publish.publisher - INFO - publishing success results for commit 2d820bc13c209a89bef356fb396a5e33e1d637b4
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - comparing against before=c69534e0b5a1c1ce448a35511e318f1eb6cd4e49
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - found 3 check runs for commit c69534e0b5a1c1ce448a35511e318f1eb6cd4e49
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - found 1 check runs for commit c69534e0b5a1c1ce448a35511e318f1eb6cd4e49 with title Unit Test Results
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - summary: 1 filesβ Β±0ββ1 suitesβ Β±0βββ9s :stopwatch: -16s
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - summary: 3 tests Β±0ββ3 :heavy_check_mark: Β±0ββ0 :zzz: Β±0ββ0 :x: Β±0β
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - summary:
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - summary: Results for commit c69534e0.βΒ± Comparison against earlier commit 421157be.
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - summary:
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - summary: [test-results]:data:application/gzip;base64,H4sIANL1SWAC/1WMyw6DIBBFf8Ww7sIJYKQ/0+A4JJOqNDxWjf9etNXi7p5zk/MWjieK4t7ArRExczphzMEm9ktBU7AcabvksR8xI17Fk19FtKdwlqeLoBB8+JmQl6O3zTr35X9t5yq2c91CP8+cCgjsjJaK2kFbQEBSqrdSawCS0DugocNRkTJi/QDc4hQw+wAAAA==
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - digest: H4sIANL1SWAC/1WMyw6DIBBFf8Ww7sIJYKQ/0+A4JJOqNDxWjf9etNXi7p5zk/MWjieK4t7ArRExczphzMEm9ktBU7AcabvksR8xI17Fk19FtKdwlqeLoBB8+JmQl6O3zTr35X9t5yq2c91CP8+cCgjsjJaK2kFbQEBSqrdSawCS0DugocNRkTJi/QDc4hQw+wAAAA==
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - stats: UnitTestRunResults(files=1, errors=[], suites=1, duration=9, tests=3, tests_succ=3, tests_skip=0, tests_fail=0, tests_error=0, runs=3, runs_succ=3, runs_skip=0, runs_fail=0, runs_error=0, commit='c69534e0b5a1c1ce448a35511e318f1eb6cd4e49')
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - stats with delta: UnitTestRunDeltaResults(files={'number': 1, 'delta': 0}, errors=[], suites={'number': 1, 'delta': 0}, duration={'duration': 10, 'delta': 1}, tests={'number': 3, 'delta': 0}, tests_succ={'number': 3, 'delta': 0}, tests_skip={'number': 0, 'delta': 0}, tests_fail={'number': 0, 'delta': 0}, tests_error={'number': 0, 'delta': 0}, runs={'number': 3, 'delta': 0}, runs_succ={'number': 3, 'delta': 0}, runs_skip={'number': 0, 'delta': 0}, runs_fail={'number': 0, 'delta': 0}, runs_error={'number': 0, 'delta': 0}, commit='2d820bc13c209a89bef356fb396a5e33e1d637b4', reference_type='earlier', reference_commit='c69534e0b5a1c1ce448a35511e318f1eb6cd4e49')
2021-03-15 08:47:11 +0000 - publish.publisher - INFO - creating check
2021-03-15 08:47:11 +0000 - publish.publisher - DEBUG - created check CheckRun(id=490, conclusion="success")
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - found 1 pull requests in repo dds/<repo-name-here> for commit 2d820bc13c209a89bef356fb396a5e33e1d637b4
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - PullRequest(title="SRE-1376 Basic GitHub Action workflow", number=14)
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - {'url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls/14', 'id': 12215, 'node_id': 'MDExOlB1bGxSZXF1ZXN0MTIyMTU=', 'html_url': 'https://<our.fqdn.here>/dds/<repo-name-here>/pull/14', 'diff_url': 'https://<our.fqdn.here>/dds/<repo-name-here>/pull/14.diff', 'patch_url': 'https://<our.fqdn.here>/dds/<repo-name-here>/pull/14.patch', 'issue_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues/14', 'number': 14, 'state': 'open', 'locked': False, 'title': 'SRE-1376 Basic GitHub Action workflow', 'user': {'login': 'lukasz-usowicz', 'id': 1475, 'node_id': 'MDQ6VXNlcjE0NzU=', 'avatar_url': 'https://avatars.git.evry.cloud/u/1475?', 'gravatar_id': '', 'url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz', 'html_url': 'https://<our.fqdn.here>/lukasz-usowicz', 'followers_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/followers', 'following_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/following{/other_user}', 'gists_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/gists{/gist_id}', 'starred_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/starred{/owner}{/repo}', 'subscriptions_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/subscriptions', 'organizations_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/orgs', 'repos_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/repos', 'events_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/events{/privacy}', 'received_events_url': 'https://<our.fqdn.here>/api/v3/users/lukasz-usowicz/received_events', 'type': 'User', 'site_admin': False}, 'body': '', 'created_at': '2021-02-26T11:00:42Z', 'updated_at': '2021-03-15T08:45:16Z', 'closed_at': None, 'merged_at': None, 'merge_commit_sha': 'd8a8fc390c826160388c950493fed17637ae2368', 'assignee': None, 'assignees': [], 'requested_reviewers': [{'login': 'kjetil-floisand', 'id': 1210, 'node_id': 'MDQ6VXNlcjEyMTA=', 'avatar_url': 'https://avatars.git.evry.cloud/u/1210?', 'gravatar_id': '', 'url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand', 'html_url': 'https://<our.fqdn.here>/kjetil-floisand', 'followers_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/followers', 'following_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/following{/other_user}', 'gists_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/gists{/gist_id}', 'starred_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/starred{/owner}{/repo}', 'subscriptions_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/subscriptions', 'organizations_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/orgs', 'repos_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/repos', 'events_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/events{/privacy}', 'received_events_url': 'https://<our.fqdn.here>/api/v3/users/kjetil-floisand/received_events', 'type': 'User', 'site_admin': False}], 'requested_teams': [{'name': '<team.name.here>', 'id': 112, 'node_id': 'MDQ6VGVhbTExMg==', 'slug': '<team.code.here>', 'description': '<desc.here>', 'privacy': 'closed', 'url': 'https://<our.fqdn.here>/api/v3/organizations/###/team/###', 'html_url': 'https://<our.fqdn.here>/orgs/dds/teams/<team.name.here>', 'members_url': 'https://<our.fqdn.here>/api/v3/organizations/###/team/###/members{/member}', 'repositories_url': 'https://<our.fqdn.here>/api/v3/organizations/###/team/###/repos', 'permission': 'pull', 'parent': {'name': 'Developers', 'id': ##, 'node_id': 'MDQ6VGVhbTYw', 'slug': 'developers', 'description': '', 'privacy': 'closed', 'url': 'https://<our.fqdn.here>/api/v3/organizations/###/team/##', 'html_url': 'https://<our.fqdn.here>/orgs/dds/teams/developers', 'members_url': 'https://<our.fqdn.here>/api/v3/organizations/###/team/##/members{/member}', 'repositories_url': 'https://<our.fqdn.here>/api/v3/organizations/###/team/##/repos', 'permission': 'pull'}}], 'labels': [], 'milestone': None, 'draft': False, 'commits_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls/14/commits', 'review_comments_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls/14/comments', 'review_comment_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls/comments{/number}', 'comments_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues/14/comments', 'statuses_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/statuses/2d820bc13c209a89bef356fb396a5e33e1d637b4', 'head': {'label': 'dds:feature/SRE-1376-basic-gh-action-workflow', 'ref': 'feature/SRE-1376-basic-gh-action-workflow', 'sha': '2d820bc13c209a89bef356fb396a5e33e1d637b4', 'user': {'login': 'dds', 'id': ###, 'node_id': 'MDEyOk9yZ2FuaXphdGlvbjEzMw==', 'avatar_url': 'https://avatars.git.evry.cloud/u/###?', 'gravatar_id': '', 'url': 'https://<our.fqdn.here>/api/v3/users/dds', 'html_url': 'https://<our.fqdn.here>/dds', 'followers_url': 'https://<our.fqdn.here>/api/v3/users/dds/followers', 'following_url': 'https://<our.fqdn.here>/api/v3/users/dds/following{/other_user}', 'gists_url': 'https://<our.fqdn.here>/api/v3/users/dds/gists{/gist_id}', 'starred_url': 'https://<our.fqdn.here>/api/v3/users/dds/starred{/owner}{/repo}', 'subscriptions_url': 'https://<our.fqdn.here>/api/v3/users/dds/subscriptions', 'organizations_url': 'https://<our.fqdn.here>/api/v3/users/dds/orgs', 'repos_url': 'https://<our.fqdn.here>/api/v3/users/dds/repos', 'events_url': 'https://<our.fqdn.here>/api/v3/users/dds/events{/privacy}', 'received_events_url': 'https://<our.fqdn.here>/api/v3/users/dds/received_events', 'type': 'Organization', 'site_admin': False}, 'repo': {'id': 2762, 'node_id': 'MDEwOlJlcG9zaXRvcnkyNzYy', 'name': '<repo-name-here>', 'full_name': 'dds/<repo-name-here>', 'private': True, 'owner': {'login': 'dds', 'id': ###, 'node_id': 'MDEyOk9yZ2FuaXphdGlvbjEzMw==', 'avatar_url': 'https://avatars.git.evry.cloud/u/###?', 'gravatar_id': '', 'url': 'https://<our.fqdn.here>/api/v3/users/dds', 'html_url': 'https://<our.fqdn.here>/dds', 'followers_url': 'https://<our.fqdn.here>/api/v3/users/dds/followers', 'following_url': 'https://<our.fqdn.here>/api/v3/users/dds/following{/other_user}', 'gists_url': 'https://<our.fqdn.here>/api/v3/users/dds/gists{/gist_id}', 'starred_url': 'https://<our.fqdn.here>/api/v3/users/dds/starred{/owner}{/repo}', 'subscriptions_url': 'https://<our.fqdn.here>/api/v3/users/dds/subscriptions', 'organizations_url': 'https://<our.fqdn.here>/api/v3/users/dds/orgs', 'repos_url': 'https://<our.fqdn.here>/api/v3/users/dds/repos', 'events_url': 'https://<our.fqdn.here>/api/v3/users/dds/events{/privacy}', 'received_events_url': 'https://<our.fqdn.here>/api/v3/users/dds/received_events', 'type': 'Organization', 'site_admin': False}, 'html_url': 'https://<our.fqdn.here>/dds/<repo-name-here>', 'description': None, 'fork': False, 'url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>', 'forks_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/forks', 'keys_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/keys{/key_id}', 'collaborators_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/collaborators{/collaborator}', 'teams_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/teams', 'hooks_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/hooks', 'issue_events_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues/events{/number}', 'events_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/events', 'assignees_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/assignees{/user}', 'branches_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/branches{/branch}', 'tags_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/tags', 'blobs_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/blobs{/sha}', 'git_tags_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/tags{/sha}', 'git_refs_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/refs{/sha}', 'trees_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/trees{/sha}', 'statuses_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/statuses/{sha}', 'languages_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/languages', 'stargazers_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/stargazers', 'contributors_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/contributors', 'subscribers_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/subscribers', 'subscription_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/subscription', 'commits_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/commits{/sha}', 'git_commits_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/commits{/sha}', 'comments_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/comments{/number}', 'issue_comment_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues/comments{/number}', 'contents_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/contents/{+path}', 'compare_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/compare/{base}...{head}', 'merges_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/merges', 'archive_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/{archive_format}{/ref}', 'downloads_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/downloads', 'issues_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues{/number}', 'pulls_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls{/number}', 'milestones_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/milestones{/number}', 'notifications_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/notifications{?since,all,participating}', 'labels_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/labels{/name}', 'releases_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/releases{/id}', 'deployments_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/deployments', 'created_at': '2020-07-21T06:05:06Z', 'updated_at': '2021-02-25T12:11:24Z', 'pushed_at': '2021-03-15T08:45:16Z', 'git_url': 'git://<our.fqdn.here>/dds/<repo-name-here>.git', 'ssh_url': '[email protected]:dds/<repo-name-here>.git', 'clone_url': 'https://<our.fqdn.here>/dds/<repo-name-here>.git', 'svn_url': 'https://<our.fqdn.here>/dds/<repo-name-here>', 'homepage': None, 'size': 87, 'stargazers_count': 0, 'watchers_count': 0, 'language': 'Groovy', 'has_issues': True, 'has_projects': True, 'has_downloads': True, 'has_wiki': True, 'has_pages': False, 'forks_count': 0, 'mirror_url': None, 'archived': False, 'disabled': False, 'open_issues_count': 1, 'license': None, 'forks': 0, 'open_issues': 1, 'watchers': 0, 'default_branch': 'master', 'anonymous_access_enabled': False}}, 'base': {'label': 'dds:master', 'ref': 'master', 'sha': 'a1909c66a00fcdf6c6ed1ac3bd42af19c03d2f3f', 'user': {'login': 'dds', 'id': ###, 'node_id': 'MDEyOk9yZ2FuaXphdGlvbjEzMw==', 'avatar_url': 'https://avatars.git.evry.cloud/u/###?', 'gravatar_id': '', 'url': 'https://<our.fqdn.here>/api/v3/users/dds', 'html_url': 'https://<our.fqdn.here>/dds', 'followers_url': 'https://<our.fqdn.here>/api/v3/users/dds/followers', 'following_url': 'https://<our.fqdn.here>/api/v3/users/dds/following{/other_user}', 'gists_url': 'https://<our.fqdn.here>/api/v3/users/dds/gists{/gist_id}', 'starred_url': 'https://<our.fqdn.here>/api/v3/users/dds/starred{/owner}{/repo}', 'subscriptions_url': 'https://<our.fqdn.here>/api/v3/users/dds/subscriptions', 'organizations_url': 'https://<our.fqdn.here>/api/v3/users/dds/orgs', 'repos_url': 'https://<our.fqdn.here>/api/v3/users/dds/repos', 'events_url': 'https://<our.fqdn.here>/api/v3/users/dds/events{/privacy}', 'received_events_url': 'https://<our.fqdn.here>/api/v3/users/dds/received_events', 'type': 'Organization', 'site_admin': False}, 'repo': {'id': 2762, 'node_id': 'MDEwOlJlcG9zaXRvcnkyNzYy', 'name': '<repo-name-here>', 'full_name': 'dds/<repo-name-here>', 'private': True, 'owner': {'login': 'dds', 'id': ###, 'node_id': 'MDEyOk9yZ2FuaXphdGlvbjEzMw==', 'avatar_url': 'https://avatars.git.evry.cloud/u/###?', 'gravatar_id': '', 'url': 'https://<our.fqdn.here>/api/v3/users/dds', 'html_url': 'https://<our.fqdn.here>/dds', 'followers_url': 'https://<our.fqdn.here>/api/v3/users/dds/followers', 'following_url': 'https://<our.fqdn.here>/api/v3/users/dds/following{/other_user}', 'gists_url': 'https://<our.fqdn.here>/api/v3/users/dds/gists{/gist_id}', 'starred_url': 'https://<our.fqdn.here>/api/v3/users/dds/starred{/owner}{/repo}', 'subscriptions_url': 'https://<our.fqdn.here>/api/v3/users/dds/subscriptions', 'organizations_url': 'https://<our.fqdn.here>/api/v3/users/dds/orgs', 'repos_url': 'https://<our.fqdn.here>/api/v3/users/dds/repos', 'events_url': 'https://<our.fqdn.here>/api/v3/users/dds/events{/privacy}', 'received_events_url': 'https://<our.fqdn.here>/api/v3/users/dds/received_events', 'type': 'Organization', 'site_admin': False}, 'html_url': 'https://<our.fqdn.here>/dds/<repo-name-here>', 'description': None, 'fork': False, 'url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>', 'forks_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/forks', 'keys_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/keys{/key_id}', 'collaborators_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/collaborators{/collaborator}', 'teams_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/teams', 'hooks_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/hooks', 'issue_events_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues/events{/number}', 'events_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/events', 'assignees_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/assignees{/user}', 'branches_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/branches{/branch}', 'tags_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/tags', 'blobs_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/blobs{/sha}', 'git_tags_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/tags{/sha}', 'git_refs_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/refs{/sha}', 'trees_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/trees{/sha}', 'statuses_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/statuses/{sha}', 'languages_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/languages', 'stargazers_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/stargazers', 'contributors_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/contributors', 'subscribers_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/subscribers', 'subscription_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/subscription', 'commits_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/commits{/sha}', 'git_commits_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/git/commits{/sha}', 'comments_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/comments{/number}', 'issue_comment_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues/comments{/number}', 'contents_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/contents/{+path}', 'compare_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/compare/{base}...{head}', 'merges_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/merges', 'archive_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/{archive_format}{/ref}', 'downloads_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/downloads', 'issues_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues{/number}', 'pulls_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls{/number}', 'milestones_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/milestones{/number}', 'notifications_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/notifications{?since,all,participating}', 'labels_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/labels{/name}', 'releases_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/releases{/id}', 'deployments_url': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/deployments', 'created_at': '2020-07-21T06:05:06Z', 'updated_at': '2021-02-25T12:11:24Z', 'pushed_at': '2021-03-15T08:45:16Z', 'git_url': 'git://<our.fqdn.here>/dds/<repo-name-here>.git', 'ssh_url': '[email protected]:dds/<repo-name-here>.git', 'clone_url': 'https://<our.fqdn.here>/dds/<repo-name-here>.git', 'svn_url': 'https://<our.fqdn.here>/dds/<repo-name-here>', 'homepage': None, 'size': 87, 'stargazers_count': 0, 'watchers_count': 0, 'language': 'Groovy', 'has_issues': True, 'has_projects': True, 'has_downloads': True, 'has_wiki': True, 'has_pages': False, 'forks_count': 0, 'mirror_url': None, 'archived': False, 'disabled': False, 'open_issues_count': 1, 'license': None, 'forks': 0, 'open_issues': 1, 'watchers': 0, 'default_branch': 'master', 'anonymous_access_enabled': False}}, '_links': {'self': {'href': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls/14'}, 'html': {'href': 'https://<our.fqdn.here>/dds/<repo-name-here>/pull/14'}, 'issue': {'href': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues/14'}, 'comments': {'href': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/issues/14/comments'}, 'review_comments': {'href': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls/14/comments'}, 'review_comment': {'href': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls/comments{/number}'}, 'commits': {'href': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/pulls/14/commits'}, 'statuses': {'href': 'https://<our.fqdn.here>/api/v3/repos/dds/<repo-name-here>/statuses/2d820bc13c209a89bef356fb396a5e33e1d637b4'}}, 'author_association': 'COLLABORATOR', 'active_lock_reason': None, 'merged': False, 'mergeable': True, 'rebaseable': True, 'mergeable_state': 'blocked', 'merged_by': None, 'comments': 4, 'review_comments': 0, 'maintainer_can_modify': False, 'commits': 5, 'additions': 45, 'deletions': 0, 'changed_files': 1}
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - PR https://<our.fqdn.here>/dds/<repo-name-here>/pull/14: dds/<repo-name-here> -> dds/<repo-name-here>
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - found pull request #14 for commit 2d820bc13c209a89bef356fb396a5e33e1d637b4
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - comparing against base=a1909c66a00fcdf6c6ed1ac3bd42af19c03d2f3f
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - found 0 check runs for commit a1909c66a00fcdf6c6ed1ac3bd42af19c03d2f3f
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - found 0 check runs for commit a1909c66a00fcdf6c6ed1ac3bd42af19c03d2f3f with title Unit Test Results
2021-03-15 08:47:12 +0000 - publish.publisher - DEBUG - stats with delta: UnitTestRunResults(files=1, errors=[], suites=1, duration=10, tests=3, tests_succ=3, tests_skip=0, tests_fail=0, tests_error=0, runs=3, runs_succ=3, runs_skip=0, runs_fail=0, runs_error=0, commit='2d820bc13c209a89bef356fb396a5e33e1d637b4')
2021-03-15 08:47:12 +0000 - publish.publisher - INFO - creating comment
Traceback (most recent call last):
File "/action/publish_unit_test_results.py", line 181, in <module>
main(settings)
File "/action/publish_unit_test_results.py", line 67, in main
Publisher(settings, gh, gha).publish(stats, results.case_results, conclusion)
File "/action/publish/publisher.py", line 56, in publish
self.hide_all_but_latest_comments(pull)
File "/action/publish/publisher.py", line 354, in hide_all_but_latest_comments
comments = self.get_pull_request_comments(pull)
File "/action/publish/publisher.py", line 284, in get_pull_request_comments
"POST", f'{self._settings.api_url}/graphql', input=query
File "/usr/local/lib/python3.6/site-packages/github/Requester.py", line 317, in requestJsonAndCheck
verb, url, parameters, headers, input, self.__customConnection(url)
File "/usr/local/lib/python3.6/site-packages/github/Requester.py", line 340, in __check
raise self.__createException(status, responseHeaders, output)
github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/enterprise/3.0/rest"}
from publish-unit-test-result-action.
When config property
comment_on_pr: false
is provided build does NOT fail.
Yes, because then no PR comments are created and no comments are attempted to be hidden. Have you tried hide_comments: off
with comment_on_pr: true
? Then you would get comments but no hiding is attempted.
So as before, my assumption is that your GitHub Enterprise does not support the GraphQL API. You either need this get working or disable hide_comments
. The only way to hide comments supported by GitHub is via GraphQL.
from publish-unit-test-result-action.
hide_comments: off
with comment_on_pr: true
works.
I'm contacting GHE owner about GraphQL API. Once I get some feedback on it will revert to you.
If we can confirm that in particular setups with inaccessible GraphQL API action may fail maybe we could cover this in some kind of TROUBLESHOOTING.md
or similar.
Or can this be somehow handled gracefully in code itself i.e. if request to GraphQL API fails just catch it and make a warning in build that comments cannot be hidden due to API limitation.
To be evaluated once I can confirm GHE GQL API state :)
from publish-unit-test-result-action.
No GHE owner answer as of now but...
I did trivial test
curl -X GET --location "https://<our.fqdn.here>/api/graphql" \
-H "Accept: application/json" \
-H "Authorization: Bearer <dedicate.personal.access.token>"
and it returns huge JSON.
So I assume this API is accessible.
If I can help more I need guidance as details of call from Actoin and GraphQL API responses is too much for me to "chase the root cause" by myself.
from publish-unit-test-result-action.
With log_level: DEBUG
you should see some lines from urllib3
, they might provide some URLs that are used.
This is what the action calls (as curl equivalent):
curl -H "Authorization: bearer ..." -X POST -d '{"query": "query FindIssueID { repository(owner:\"...\", name:\"...\") { pullRequest(number:...) { id, title, url, comments(last: 10) { nodes { id, url, author { login }, createdAt, body, isMinimized }, totalCount } } } }" }' https://api.github.com/graphql
You need to set the repository owner
and name
, and pull request number
in the body.
It then tries to minimize comments by calling:
curl -H "Authorization: bearer ..." -X POST -d '{"query": "mutation MinimizeComment { minimizeComment(input: { subjectId: \"...\", classifier: OUTDATED } ) { clientMutationId, minimizedComment { isMinimized, minimizedReason, viewerCanMinimize } } }" }' https://api.github.com/graphql
where subjectId
comes from the response of the first call.
Note: https://api.github.com/graphql
is the public GitHub API, replace it with your GHE URL.
from publish-unit-test-result-action.
Two things:
- Initially I've used endpoint
https://<our.fqdn.here>/api/graphql
which contains/api
comparing to yours sample queries where you refer/graphql
only. - I'm not longer configuring
GITHUB_API_URL
at all. So beside initial description all comments are referring to action configuration without it.
Regarding graphql
curl
queries:
- if I call
/graphql
(without/api
in front) I getHTTP 200
with SAML Login page as a response - thus assuming you've made a typo. - if I call
/api/graphql
I get a nice JSON response
Did also debugging action, GraphQL one seems to be configured correctly, same with default API:
GITHUB_GRAPHQL_URL=https://<our.fqdn.here>/api/graphql
GITHUB_API_URL=https://<our.fqdn.here>/api/v3
Do I understand your comment correctly that this line in publisher.py
call incorrect endpoint?
from publish-unit-test-result-action.
You could try GITHUB_API_URL: https://<our.fqdn.here>/api
.
Do I understand your comment correctly that this line in
publisher.py
call incorrect endpoint?
Yes.
from publish-unit-test-result-action.
Setting GITHUB_API_URL: https://<our.fqdn.here>/api
did not helped.
I was looking at Action code previously and this particular one seems not to be overwritten by env
section of action.
Any way I can help with providing support for GITHUB_GRAPHQL_URL
in Action?
from publish-unit-test-result-action.
Yes, try the action from this branch:
uses: EnricoMi/publish-unit-test-result-action@branch-graphql-url
from publish-unit-test-result-action.
Works as expected π β
Looking forward for next Action release π.
BTW: Please look if my comment on regular API is relevant.
from publish-unit-test-result-action.
This has been released. If you are using @v1
, it should be picked up on the next run, otherwise upgrade to @v1.10
or @v1
.
from publish-unit-test-result-action.
Thx for update.
from publish-unit-test-result-action.
Related Issues (20)
- Action fails if comment made by user whose account has been deleted prior to merge HOT 2
- Test Results are not shown in workflow run job list HOT 15
- action_fail_on_inconclusive passed with just a warning annotation HOT 11
- Remove symbols links HOT 2
- Support Maven Surefire Plugin rerunning flaky tests HOT 7
- Add support for TRX StdOut-Element HOT 3
- Option "check_run" not recognized HOT 3
- Unhandled error that crashes GitHub Actions - .NET with coverlet.cobertura HOT 11
- Publishing json file doesn't work if check_run is set to false HOT 2
- bug: action fails to setup due to `--user` in embedded python for windows HOT 5
- androidTest / Could not find any files for test-results/**/*.xml HOT 7
- `-m: command not found` during `Install Python dependencies` HOT 9
- Windows requirements.txt fail HOT 2
- ERROR: Could not open requirements file: [Errno 2] No such file or directory: '.GITHUB_ACTION_PATH\\..\\python\\requirements.txt' HOT 4
- Add support for python 3.12 HOT 4
- 2.16.0 syntax error HOT 4
- Support per file `test_file_prefix` HOT 1
- Spectral junit report has wrong paths to OpenAPI spec file HOT 3
- Annotations are reported at line 0 and therefore are not display correctly. HOT 3
- Support for forked repositories is compliacted and does not work for me HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from publish-unit-test-result-action.