-
Notifications
You must be signed in to change notification settings - Fork 267
[ci] Resolve slow github polling and hook handling errors #15493
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
Open
cjllanwarne
wants to merge
11
commits into
hail-is:main
Choose a base branch
from
cjllanwarne:cjl_ci_github_broken
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3550022
bundle CI PR status polls
cjllanwarne fb4e012
fix none management in broken github hook handler
cjllanwarne 1069220
accept none check conclusions
cjllanwarne ba1f3d3
fix mock leak risk
cjllanwarne 9eea584
chunk PR fetch and allow 30s per 100-pr chunk (up from 5s per PR)
cjllanwarne df5dc3b
move request timeout change to the right place
cjllanwarne 9550851
reduce logging noise, metrics and one log for graphql fetch
cjllanwarne f8e82f4
more CI loop timing logs and metrics
cjllanwarne 5e93b28
log reviewer assignment timing
cjllanwarne a8ca77d
dont make review assignee calls with no new assignees
cjllanwarne be71edc
simplify logging and metrics into a single value
cjllanwarne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| """Configure the unit-test environment before any ci.* modules are imported. | ||
|
|
||
| In CI these values come from the real deployment environment (env vars + /global-config volume | ||
| mount). Locally they don't exist, so we set safe defaults and mock the config reader. | ||
| """ | ||
|
|
||
| import atexit | ||
| import json | ||
| import os | ||
| import unittest.mock | ||
|
|
||
| # Env vars read at module-import time by gear.profiling and ci.environment. | ||
| # setdefault leaves real CI values in place. | ||
| os.environ.setdefault('HAIL_SHA', 'test-sha') | ||
| os.environ.setdefault('HAIL_DEFAULT_NAMESPACE', 'default') | ||
| os.environ.setdefault('CLOUD', 'gcp') | ||
| os.environ.setdefault('HAIL_CI_UTILS_IMAGE', 'gcr.io/hail-vdc/ci-utils:test') | ||
| os.environ.setdefault('HAIL_BUILDKIT_IMAGE', 'gcr.io/hail-vdc/buildkit:test') | ||
| os.environ.setdefault('HAIL_CI_STORAGE_URI', 'gs://hail-ci-test/build') | ||
| os.environ.setdefault('HAIL_CI_GITHUB_CONTEXT', 'ci-test') | ||
|
|
||
| if not os.path.exists('/global-config'): | ||
| # Patch gear.cloud_config.read_config_secret so that ci.environment's module-level | ||
| # get_global_config() call (and the subsequent get_gcp_config() call) succeed locally. | ||
| _fake_global_config = { | ||
| 'cloud': 'gcp', | ||
| 'docker_prefix': 'gcr.io/hail-vdc', | ||
| 'docker_root_image': 'ubuntu:22.04', | ||
| 'domain': 'hail.is', | ||
| 'kubernetes_server_url': 'https://k8s.example.com', | ||
| 'default_namespace': 'default', | ||
| # Fields required by GCPConfig.from_global_config | ||
| 'batch_gcp_regions': json.dumps(['us-central1']), | ||
| 'gcp_region': 'us-central1', | ||
| 'gcp_project': 'hail-vdc', | ||
| 'gcp_zone': 'us-central1-a', | ||
| } | ||
| _patcher = unittest.mock.patch('gear.cloud_config.read_config_secret', return_value=_fake_global_config) | ||
| _patcher.start() | ||
| atexit.register(_patcher.stop) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [pytest] | ||
| asyncio_mode = auto |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.