Make WordPress Core

Opened 10 months ago

Closed 7 months ago

Last modified 4 months ago

#58867 closed task (blessed) (fixed)

GitHub Actions updates and improvements for 6.4

Reported by: desrosj's profile desrosj Owned by:
Milestone: 6.4 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description

This ticket is for various updates and improvements for Core's GitHub Actions workflows.

Previously:

Change History (23)

#1 @desrosj
9 months ago

In 56388:

Build/Test Tools: Update 3rd-party GitHub Actions.

This updates all 3rd-party GitHub Actions to their latest versions.

See #58867.

#2 @desrosj
9 months ago

In 56402:

Build/Test Tools: Simplify the required prerequisite jobs for the failed-workflow job.

Because slack-notifications job requires all preceding jobs in each workflow to complete, there’s no need to include the same jobs in the needs configuration for the failed-workflow one.

See #58867.

#3 @desrosj
9 months ago

In 56404:

Build/Test Tools: Don’t send a Slack notice when a workflow fails once.

[53947] introduced a callable workflow that allowed a workflow run to be retried automatic. By default all workflows are retried once.

Since a run is not considered “failed” until after the automatic retry, the first Slack message is unnecessary and can cause a lot of noise when there are network hiccups.

This alters the logic to skip a failure notice in Slack until the second failure.

See #58867.

#4 @desrosj
9 months ago

In 56405:

Build/Test Tools: Use the correct variable for checking the previous conclusion.

Follow up to [56404].
See #58867.

#5 @desrosj
9 months ago

In 56406:

Build/Test Tools: Send a failure notice in Slack when a run fails to start.

This adds startup_failure to the list of conclusions that the Slack workflow looks for when determining whether to send a failure notice.

See #58867.

#6 @desrosj
9 months ago

In 56407:

Build/Test Tools: Revert Slack messaging changes.

This reverts [56404], [56405], [56406].

More testing is needed to ensure multiple messages are not sent unintentionally.

Unprops desrosj.
See #58867.

#7 @desrosj
9 months ago

In 56464:

Build/Test Tools: Ensure database containers are prepared for commands.

By default, Docker waits for a container to be started before considering it “ready”. But this does not necessarily mean that it’s ready to receive commands.

This adds a check that ensures the database container is ready to receive commands before proceeding with running commands.

Follow up to [56439], [56440], [56443].

Props rmccue, desrosj.
See #30462, #58867.

#8 @desrosj
9 months ago

I missed this in the commit, but hat tip to @johnbillion for sharing his implementation for inspiration.

#9 @desrosj
9 months ago

In 56537:

Build/Test Tools: Update 3rd-party GitHub Actions.

This updates all 3rd-party GitHub actions to their latest versions. The following actions were updated:

  • actions/cache
  • actions/checkout
  • actions/setup-node
  • codecov/codecov-action
  • shivammathur/setup-php
  • slackapi/slack-github-action

In the latest version of actions/checkout (4.0.0), a new input was introduced to control the output of command progress. This change uses this new show-progress input to turn off displaying progress by default. Progress will be shown when a workflow is run with debug mode enabled, just in case it contains helpful information.

Props johnbillion, desrosj.
See #58867.

#10 @desrosj
9 months ago

In 56538:

Build/Test Tools: Update a few more 3rd-party GitHub Action occurrences.

Follow up to [56537].

See #58867.

#11 @desrosj
8 months ago

In 56660:

Build/Test Tools: Simplify some logic in GitHub Action workflows.

This simplifies the logic within the slack-notifications and failed-workflow steps in GitHub Action workflows to use the contains() function and object filtering.

This makes it simpler to perform the needed checks by removing the need to list out every single dependent job defined in needs.

See #58867.

#12 @desrosj
8 months ago

In 56780:

Build/Test Tools: Don’t send a Slack notice for a workflow’s first failure.

After [53947], all workflows will automatically be restarted once in an attempt to rule out reasons for failures, such as timeouts or network hiccups.

Second attempt at [56404], which was previously reverted in [56407].
See #58867.

#13 @desrosj
7 months ago

In 56827:

Build/Test Tools: Don’t send Slack notification for workflow retries.

[56780] changed Slack failure notifications to not send a failure notification during the first run of a workflow. Because workflows automatically restart once, a failure during the first run can be ignored.

This adjusts the workflow to also not send a “fixed” notification when the second run of a workflow succeeds after a failure. Because the original failure is no longer reported, these notifications are unnecessary.

See #58867.

#14 @desrosj
7 months ago

In 56829:

Build/Test Tools: Increase the number of retries when restarting a workflow.

This increases the number of times to retry restarting a workflow from 2 to 10. Retries use exponential backoff to space out retries.

In most cases, only 2 retries was sufficient. However, there are occasionally scenarios where the original workflow is still running and cannot be restarted, resulting in an error. This typically happens during periods of ongoing service degradation, or workflows with a significant number of jobs (GitHub Actions is sometimes very slow to mark these as finished).

See #58867.

#15 @desrosj
7 months ago

In 56830:

Build/Test Tools: Increase the timeout for the failed workflow.

Following [56829], the previous timeout-minutes value of 5 is insufficient when approaching 10 retries.

See #58867.

#16 @desrosj
7 months ago

In 56955:

Build/Test Tools: Add environment variable for current release.

This adds a global environment variable to the Test old branches workflow to make the supported version more clear and easier to update in the future. This will also make it easier to reference in more places as this workflow grows.

See #58867.

#17 @swissspidy
7 months ago

[56972] references this ticket.

#18 @hellofromTonya
7 months ago

Would be good to backport [56972] to the 6.4 branch.

#19 @swissspidy
7 months ago

@hellofromTonya Not necessary, because branching only happens from trunk, e.g. from trunk -> 6.5

#20 @desrosj
7 months ago

In 57000:

Build/Test Tools: Simplify some logic in GitHub Action workflows.

This simplifies the logic within the slack-notifications and failed-workflow steps in GitHub Action workflows to use the contains() function and object filtering.

This makes it simpler to perform the needed checks by removing the need to list out every single dependent job defined in needs.

Merges [56660] to the 6.4 branch.
See #58867.

#21 @desrosj
7 months ago

In 57052:

Build/Test Tools: Increase the number of retries when restarting a workflow.

This increases the number of times to retry restarting a workflow from 10 to 15, and the timeout-minutes value to 30.

For workflows with complex strategy matrix, the exponential backoff of 10 retries is still not enough to account for the GitHub Actions UI taking a long time to catch up.

Follow up to [56829] and [56830].
See #58867.

#22 @jorbin
7 months ago

  • Resolution set to fixed
  • Status changed from new to closed

Closing in favor of #59805 for 6.5.

#23 @desrosj
4 months ago

#50342 was marked as a duplicate.

Note: See TracTickets for help on using tickets.