Skip to content

ci: use flakybot with matrix workflows #3112

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

Merged
merged 23 commits into from
Apr 15, 2023
Merged

ci: use flakybot with matrix workflows #3112

merged 23 commits into from
Apr 15, 2023

Conversation

kweinmeister
Copy link
Collaborator

@kweinmeister kweinmeister commented Apr 7, 2023

Refactored the 5 functions workflows that currently use a matrix strategy, to use a common workflow template that includes FlakyBot 1.2+.

Considerations:

  • Using the matrix strategy has a slightly different syntax. It did not look possible to integrate these workflows into the standard template using the tools available in GH Actions today.
  • Also, these workflows require manually specifying subfolders within the matrix. So, it is safer to handle these workflows separately when regenerating workflows.

Changes:

  • Workflow generation
    • Creation of a new "matrix" workflow template to handle this unique structure: ci-matrix.yaml.njk
    • A workflows-matrix.json array of workflows using a matrix strategy was created. These workflows require the workflow developer to manually specify the subdirectories that need to be tested within them. So, they shouldn't be included along with all of the other workflows that can be safely automatically generated.
    • CLI option in generate.js to specify the matrix template.
  • Workflow updates
    • All existing matrix workflows were updated to use the standardized workflow.
  • Sample updates
    • functions/concepts samples are small gists that do not have tests. To enable using the reusable test.yaml, a no-op npm test script was added.

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: workflows Issues related to the Workflows API. labels Apr 7, 2023
@kweinmeister kweinmeister marked this pull request as ready for review April 7, 2023 22:02
@kweinmeister kweinmeister requested review from a team as code owners April 7, 2023 22:02
@kweinmeister
Copy link
Collaborator Author

FYI @averikitsch @pattishin, in case you can take a look. This rolls out #3079 to an initial set of samples, which were using a matrix strategy to parallelize testing across the samples' subfolders. Thanks!

@kweinmeister kweinmeister added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2023
Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few recommendations.

@kweinmeister
Copy link
Collaborator Author

Left a few recommendations.

Thanks for the very helpful suggestions!

@kweinmeister kweinmeister merged commit 2ae85f1 into main Apr 15, 2023
@kweinmeister kweinmeister deleted the flakybot-matrix branch April 15, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: workflows Issues related to the Workflows API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants