Skip to content
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

[ci][postmerge/3] actually trigger gap builds #44660

Merged
merged 3 commits into from
Apr 16, 2024
Merged

[ci][postmerge/3] actually trigger gap builds #44660

merged 3 commits into from
Apr 16, 2024

Conversation

can-anyscale
Copy link
Collaborator

Implement the function to trigger a blocked build on postmerge

  • Also cache the _get_builds function which is used repeatedly and quite expensive

Test:

  • CI

self.buildkite_organization,
self.buildkite_pipeline,
build["number"],
build["jobs"][0]["id"], # first job is the blocked job
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to check some thing that is more reliable? like the label or the step?

@can-anyscale
Copy link
Collaborator Author

unblock a step with a special label

@@ -29,7 +30,7 @@ def __init__(
self.repo_checkout = repo_checkout
self.days_ago = days_ago

def run(self) -> List[str]:
def run(self) -> List[Optional[str]]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this returning a list of optional string?

can we just convert None to empty string and drop the Optional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me change it to a commit --> build_id; the build_id can be optional in case the build for that commit somehow doesn't exist

pass
def _find_blocked_build_and_job(
self, commit: str
) -> Tuple[Optional[Dict], Optional[Dict]]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a comment on what the return values are? or maybe create a simple class/TypedDict for the return value?

why is the build number a dict? and job id a dict too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this should be str not dict; i keep changing the content of this function

@@ -29,14 +30,14 @@ def __init__(
self.repo_checkout = repo_checkout
self.days_ago = days_ago

def run(self) -> List[str]:
def run(self) -> Dict[str, Optional[str]]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the doc comment?

if not build or not job:
return None

self.buildkite.jobs().unblock_job(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is always returning None?

@can-anyscale can-anyscale merged commit 37b695d into can-pm02 Apr 16, 2024
3 of 5 checks passed
@can-anyscale can-anyscale deleted the can-pm03 branch April 16, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants