Skip to content

Add the matrix strategy to workflow to make integration tests faster #137

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 5 commits into from
Apr 28, 2021

Conversation

maxday
Copy link
Contributor

@maxday maxday commented Apr 28, 2021

What does this PR do?

This PR makes the integration testing step faster by using the matrix strategy, it will run tests in parallel.

Current average workflow time for the integration tests step : around 10 minutes
With this PR, the new time is about 4minutes

Motivation

Increase productivity by reducing waiting time

Testing Guidelines

Codebase was not change but a refactoring for integration testing has been made. This should not break the integration tests and should be fully backward compatible

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@maxday maxday requested a review from a team as a code owner April 28, 2021 17:41
run_id=$(xxd -l 4 -c 4 -p < /dev/random)

# Always remove the stack before exiting, no matter what
# Always remove the stacks before exiting, no matter what
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I see you changed stack -> stacks here, was that intentional? Isn't this still going to deploy one stack at a time?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it should now be stack(s)

Copy link
Contributor Author

Choose a reason for hiding this comment

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


strategy:
matrix:
runtime-param: [27, 36, 37, 38]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can we use strings with decimals, i.e. "2.7" and "3.6", for these params? I always do a double take when I read "Python 37". Also, that will be more consistent with our unit test task. If it's not possible then no big deal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@nhinsch nhinsch left a comment

Choose a reason for hiding this comment

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

Looks great! 🚀 Just a couple of tiny nits.

PARAMETERS_SETS=(python${RUNTIME_PARAM})
BUILD_LAYER_VERSION=python$RUNTIME_PARAM[1]
RUNTIME_PARAM_NO_DOT=$(echo $RUNTIME_PARAM | sed 's/\.//')
echo "Python version is specified: $RUNTIME_PARAM_NO_DOT"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think we would probably want to log the version number with the dot here, right? Python version is specified: 3.7 rather than Python version is specified: 37

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maxday maxday merged commit 922a956 into main Apr 28, 2021
@maxday maxday deleted the maxime.david/make-integration-test-run-faster branch April 28, 2021 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants