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

[OpenXLA-pin-update trigger] Create _openxla_pin_update_weekly.yml #7108

Merged
merged 12 commits into from
Aug 23, 2024

Conversation

ManfeiBai
Copy link
Collaborator

Add Github Action to create workflow enable create OpenXLA-pin update PR weekly Monday 9:00AM automatically

@ManfeiBai ManfeiBai marked this pull request as ready for review May 24, 2024 17:48
@ManfeiBai
Copy link
Collaborator Author

according to https://github.com/orgs/community/discussions/25746, we might be able to test this automatic OpenXLA-pin update trigger after we push this PR to master branch

please correct me if I missed anything

@JackCaoG
Copy link
Collaborator

@will-cromar can you take a look?

Copy link
Collaborator

@will-cromar will-cromar left a comment

Choose a reason for hiding this comment

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

Thanks! This is a neat idea

.github/workflows/_openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
.github/workflows/_openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
.github/workflows/_openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
.github/workflows/_openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
.github/workflows/_openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
.github/workflows/_openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
.github/workflows/openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
.github/workflows/openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
.github/workflows/openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
title: "Weekly Code Update - ${{ env.CURRENT_DATE }}"
body: "This PR contains the weekly OpenXLA-pin update at commit: (HEAD commit: ${{ env.HEAD_COMMIT }}), with libtpu version at ${{ env.CURRENT_DATE }}."

- name: Add TPUCI label
Copy link
Collaborator

Choose a reason for hiding this comment

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

create-pull-request has a labels option: https://github.com/marketplace/actions/create-pull-request#action-inputs

If the label is not on the PR when it is created, the TPU CI will not run.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good suggestion, have we used create-pull-request before? wanna confirm before use

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks, added labels tpuci in current PR, please correct me if I understand wrong

Copy link
Collaborator

Choose a reason for hiding this comment

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

If the tpuci label is not on the PR when it is created, nothing will happen. I haven't use create-pull-request myself before, but I'm just going off of the documentation. Adding labels: tpuci to the step above should work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, updated above with labels: tpuci

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can remove this last step since the PR will be created with that label

.github/workflows/openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@will-cromar will-cromar left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

.github/workflows/openxla_pin_update_weekly.yml Outdated Show resolved Hide resolved

- name: Get JAX version for specified date
run: |
version_line=$(curl -s https://raw.githubusercontent.com/google/jax/main/jax/version.py | sed -n '24p')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hahaha, I like this. I'm okay to merge this so we can see if the workflow works at all, but if the line number where _version is defined ever changes, this will break. Please leave a comment so we know where to look if the JAX version doesn't update.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, good idea, updated with comments

title: "Weekly Code Update - ${{ env.CURRENT_DATE }}"
body: "This PR contains the weekly OpenXLA-pin update at commit: (HEAD commit: ${{ env.HEAD_COMMIT }}), with libtpu version at ${{ env.CURRENT_DATE }}."

- name: Add TPUCI label
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the tpuci label is not on the PR when it is created, nothing will happen. I haven't use create-pull-request myself before, but I'm just going off of the documentation. Adding labels: tpuci to the step above should work.


- name: Update OpenXLA commit in WORKSPACE
run: |
sed -i "s/xla_hash =.*/xla_hash = '${{ env.GITHUB_ENV }}'/" WORKSPACE
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like a typo. env.GITHUB_ENV should be env.HEAD_COMMIT, right? $GITHUB_ENV holds the name of the file where workflow env vars are stored.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, nice catch, updated to env.HEAD_COMMIT

title: "Weekly Code Update - ${{ env.CURRENT_DATE }}"
body: "This PR contains the weekly OpenXLA-pin update at commit: (HEAD commit: ${{ env.HEAD_COMMIT }}), with libtpu version at ${{ env.CURRENT_DATE }}."

- name: Add TPUCI label
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can remove this last step since the PR will be created with that label

@ManfeiBai ManfeiBai merged commit 5f82da9 into master Aug 23, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants