-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
🐛 fix unexpected run of release workflow #9494
🐛 fix unexpected run of release workflow #9494
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
cc @obi1kenobi |
(A little background leading to the discovery: I personally like your project and was referencing the release workflow in my personal development. I noticed that there were times when the if-condition for the PyPI release workflow was not functioning properly.) |
Let me add one more point. Both of the following code would work,
as in this PR,
|
Thanks for the report and for the fix! 🚀 |
We have completed triage and remediation for this issue. TL;DR: This was not exploited. No actions are required for users of LangChain. The misconfiguration identified here allowed the release workflow to be triggered by an unmerged PR, which could have led to the creation of an unintended Having reviewed all runs of the release workflows, we have determined that no inappropriate releases took place. We have already merged the fix as well as some additional hardening of our GitHub Actions that will make similar issues impossible in the future. What went well:
What we're improving for the future:
|
@obi1kenobi Thank you! I was really impressed with how quickly you've put together the |
I have discovered a bug located within
.github/workflows/_release.yml
which is the primary cause of continuous integration (CI) errors. The problem can be solved; therefore, I have constructed a PR to address the issue.The Issue
Access the following link to view the exact errors: Langhain Release Workflow
The instances of these errors take place for each PR that updates
pyproject.toml
, excluding those specifically associated with bumping PRs.See below for the specific error message:
An image of the error can be viewed here:
![Image](https://private-user-images.githubusercontent.com/13769670/261808765-13125f73-9b53-49b7-a83e-653bb01a1da1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDAxMjQwNTMsIm5iZiI6MTc0MDEyMzc1MywicGF0aCI6Ii8xMzc2OTY3MC8yNjE4MDg3NjUtMTMxMjVmNzMtOWI1My00OWI3LWE4M2UtNjUzYmIwMWExZGExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjIxVDA3NDIzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ5OWE3YjhiYzE1MWIzNDAxYjYwODM3OTNiZTVjMTBlOGRkMTRlZWQ0MmI4NGZjZGFhZmIzYTllZmYzN2FiMDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.lIKYD-LJPl7hnHeWHjZ430CKRU1vUyB-8BeUqK3PYGM)
The
_release.yml
document contains the following if-condition:The Root Cause
The above job constantly runs as the
if-condition
is always identified astrue
.The Logic
The
if-condition
can be defined asif: ${{ b1 }} && ${{ b2 }}
, whereb1
andb2
are boolean values. However, in terms of condition evaluation with GitHub Actions,${{ false }}
is identified as a string value, thereby rendering it as truthy as per the official documentation.I have run some tests regarding this behavior within my forked repository. You can consult my debug PR for reference.
Here is the result of the tests:
if: true && ${{ false }}
if: ${{ false }}
if: true && false
if: false
if: ${{ true && false }}
In view of the first and second results, we can infer that
${{ false }}
can only be interpreted astrue
for conditions composed of some expressions.It is consistent that the condition of
if: ${{ inputs.working-directory == 'libs/langchain' }}
works.It is surprised to be skipped for the second case but it seems the spec of GitHub Actions 😓
Anyway, the PR would fix these errors, I believe 👍
Could you review this? @hwchase17 or @shoelsch , who is the author of PR.