You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current ImgBot workflow, there's an issue that prevents a pull request from being opened or updated in the downstream OpenPrFunction when there's a failure at the CompressImagesFunction, after it creates the ImgBot branch but before it sends an OpenPrMessage. This can happen if the function host encounters an error such as network, software, or hardware issues.
Steps to reproduce:
The bot-controlled ImgBot branch has yet to be created or has been deleted after a successful merge.
A git push to the bot-monitored branch (e.g., main) triggers the CompressImagesFunction through RouterFunction.
CompressImagesFunction compresses the images on the main branch and creates the ImgBot branch as usual.
Before sending a message to invoke the downstream OpenPrFunction, the underlying function host encounters an error. This can be simulated through breakpoints or throwing an exception.
When CompressImagesFunction is retried, the boolean variable branchExists is set to true, because the ImgBot branch was created at the first execution.
This variable makes OpenPrMessage.Update also to true. So later when OpenPrFunction is invoked, it seeks an existing open pull request to update but cannot find any, resulting in an exception.
Expected behavior:
OpenPrFunction should be able to create a new pull request or update an existing one based on the existence of an open pull request, without relying on the branchExists variable passed from upstream.
Actual behavior:
An exception is thrown, causing unsuccessful retries of the OpenPrFunction until the triggering message reaches the max retry count. To resolve this issue, the ImgBot branch must be deleted, and the CompressImagesFunction must be triggered again to start a new workflow withbranchExists = false.
Suggested fix:
Modify OpenPrFunction to determine whether it should create a pull request or update an existing one based on the existence of an open pull request, rather than relying on a variable passed from upstream; CompressImagesFunction should pass the repository information to the downstream OpenPrFunction without dictating whether the operation is an update or create.
The text was updated successfully, but these errors were encountered:
In the current ImgBot workflow, there's an issue that prevents a pull request from being opened or updated in the downstream OpenPrFunction when there's a failure at the CompressImagesFunction, after it creates the ImgBot branch but before it sends an OpenPrMessage. This can happen if the function host encounters an error such as network, software, or hardware issues.
Steps to reproduce:
branchExists
is set totrue
, because the ImgBot branch was created at the first execution.OpenPrMessage.Update
also totrue
. So later when OpenPrFunction is invoked, it seeks an existing open pull request to update but cannot find any, resulting in an exception.Expected behavior:
OpenPrFunction should be able to create a new pull request or update an existing one based on the existence of an open pull request, without relying on the branchExists variable passed from upstream.
Actual behavior:
An exception is thrown, causing unsuccessful retries of the OpenPrFunction until the triggering message reaches the max retry count. To resolve this issue, the ImgBot branch must be deleted, and the CompressImagesFunction must be triggered again to start a new workflow with
branchExists = false
.Suggested fix:
Modify OpenPrFunction to determine whether it should create a pull request or update an existing one based on the existence of an open pull request, rather than relying on a variable passed from upstream; CompressImagesFunction should pass the repository information to the downstream OpenPrFunction without dictating whether the operation is an update or create.
The text was updated successfully, but these errors were encountered: