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

Fail CI if lint or typecheck fails #7770

Merged
merged 19 commits into from Mar 21, 2024
Merged

Fail CI if lint or typecheck fails #7770

merged 19 commits into from Mar 21, 2024

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented Mar 20, 2024

Turns out that that the way we were calling our bash scripts was the issue:

bash script.sh

bypasses the shebang line because when you tell the shell to use bash explicitly, it no longer no longer needs to read the shebang line. Therefore it ignores that -e flag that would tell the script to terminate with a 1 exit code and fail the CI.

Instead, we need to execute it directly:

./scripts.sh

I've confirmed on a fork that this fixes the issue: https://github.com/abidlabs/gradio/actions/runs/8365477830/job/22903396215

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Mar 20, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/c4e259cd749ae4de48bc96c9b0d877d58a35230d/gradio-4.22.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@c4e259cd749ae4de48bc96c9b0d877d58a35230d#subdirectory=client/python"

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Mar 20, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Fail CI if lint or typecheck fails

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@abidlabs abidlabs changed the title Fail CI if lint fails Fail CI if lint or typecheck fails Mar 20, 2024
@abidlabs
Copy link
Member Author

abidlabs commented Mar 20, 2024

Let me also fix the error in multimodal textbox python file

@abidlabs abidlabs marked this pull request as ready for review March 20, 2024 21:02
@abidlabs
Copy link
Member Author

Ok cleaned up the typing in the multimodaltextbox component as well.

) -> dict[str, str | list] | None:
def _preprocess_file(self, path: str) -> str:
file_name = path
file = tempfile.NamedTemporaryFile(delete=False, dir=self.GRADIO_CACHE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

How come we need this now?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh sorry my bad, we don't need this. Let me remove

@abidlabs abidlabs added the v: patch A change that requires a patch release label Mar 20, 2024
Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

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

thanks for the fix @abidlabs !

@freddyaboulton
Copy link
Collaborator

Gonna get this in to fix the CI - and I'll have another ChatInterface PR open soon

@freddyaboulton freddyaboulton merged commit dd3e363 into main Mar 21, 2024
7 checks passed
@freddyaboulton freddyaboulton deleted the fail branch March 21, 2024 15:34
@pngwn pngwn mentioned this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v: patch A change that requires a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants