bito-code-review[bot] commented on PR #16263:
URL: https://github.com/apache/grails-core/pull/16263#issuecomment-5459720946
<!-- Bito Reply -->
To address the issue where `wait_for_ready_green` misses ERROR events
emitted between the `update-environment` call and the function start, you
should modify the function to accept an optional `start_iso` timestamp. This
allows the caller to capture the timestamp before initiating the deployment and
pass it into the function.
Here is the suggested update for the function definition:
```yaml
wait_for_ready_green() {
local operation="$1"
local expected_version="$2"
local start_iso="${3:-$(date -u +%Y-%m-%dT%H:%M:%SZ)}"
local status health current_version attempt event
for attempt in {1..90};
```
By defaulting `start_iso` to the current time if not provided, you maintain
backward compatibility while enabling the caller to pass a pre-deployment
timestamp to ensure no events are missed.
**.github/workflows/forge-deploy-aws.yml**
```
wait_for_ready_green() {
local operation="$1"
local expected_version="$2"
local start_iso="${3:-$(date -u +%Y-%m-%dT%H:%M:%SZ)}"
local status health current_version attempt event
for attempt in {1..90}; do
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]