-
Notifications
You must be signed in to change notification settings - Fork 101
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
Only check plugin version integrity in deployment workflow if the plugin actually requires to be deployed #1666
base: trunk
Are you sure you want to change the base?
Conversation
…gin actually requires to be deployed.
This reverts commit a58aaf4.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. LGTM. Left one non-blocking feedback.
@@ -101,6 +98,10 @@ jobs: | |||
|
|||
echo "deploy=true" >> $GITHUB_OUTPUT | |||
|
|||
- name: Check plugin version integrity | |||
if: steps.check-deployment.outputs.deploy == 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocker: Instead of adding if: steps.check-deployment.outputs.deploy == 'true'
condition in every steps can we add new step if output is not true the exit and remove condition from all other steps below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how that would work in GitHub Actions. Maybe it's possible, but I'm not sure there's a way to properly exit out of a GitHub workflow. Do you have an idea about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add the below new step after the Check if deployment is needed
step and we can remove the if: steps.check-deployment.outputs.deploy == 'true'
condition from all other steps after adding these step.
- name: Fail early if deployment check is false
if: steps.check-deployment.outputs.deploy != 'true'
run: |
echo "Deployment condition not met. Exiting."
exit 1
I did test in my folk repo - https://github.com/mukeshpanchal27/performance/actions/runs/11926864996/job/33241344801
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swissspidy Curious what's your take on the idea of early returns/exits in GitHub workflows.
Summary
See #1664: This PR attempts to properly fix the underlying issue: We shouldn't check the version integrity of plugins that do not need deployment during the deployment workflow.
Therefore, this PR moves that check after the conditional for whether a deployment is needed. This will still catch problems for any plugins that need to be deployed, but ignore problems from other plugins (which may temporarily exist, and that's okay).
The PR also effectively reverts the short-term fix from #1664, re-including those future changelog entries, as they should no longer be a problem after this.