Skip to content
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

[serverless] Update integration tests for sls v3, tiered compilation #11383

Merged
merged 4 commits into from
Mar 22, 2022

Conversation

nhinsch
Copy link
Contributor

@nhinsch nhinsch commented Mar 21, 2022

What does this PR do?

  • Update integration tests to use Serverless Framework 3
  • Update the tests to incorporate the tiered compilation optimization for Java
  • Fix a bug in the integration test script that caused us to build the extension for both architectures even when we were only testing a single architecture

Additional Notes

This PR should not be merged until the corresponding datadog-lambda-extension PR is merged.

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.

@nhinsch nhinsch added changelog/no-changelog [deprecated] qa/skip-qa - use other qa/ labels [DEPRECATED] Please use qa/done or qa/no-code-change to skip creating a QA card team/serverless labels Mar 21, 2022
@nhinsch nhinsch added this to the Triage milestone Mar 21, 2022
@nhinsch nhinsch requested a review from a team as a code owner March 21, 2022 15:05
@@ -167,7 +167,7 @@ functions_to_skip=(
echo "Invoking functions for the first time..."
set +e # Don't exit this script if an invocation fails or there's a diff
for function_name in "${all_functions[@]}"; do
serverless invoke --stage "${stage}" -f "${function_name}" >/dev/null &
serverless invoke --stage "${stage}" -f "${function_name}" &>/dev/null &
Copy link
Contributor

Choose a reason for hiding this comment

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

is this required? maybe it's better to not silent all errors?

Copy link
Contributor Author

@nhinsch nhinsch Mar 21, 2022

Choose a reason for hiding this comment

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

I added this because the Serverless Framework v3 seems to log some stuff to STDERR even when it successfully invokes functions, creating a bunch of noise. I'll look into this more and see if there is some way I can resolve it without silencing legitimate errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I investigated this more -- I think we do want to hide the output here, because errors are normal when invoking these test functions. Some of the test functions are designed to intentionally throw errors or time out. If we don't hide the output here, it's quite confusing because it looks like something is going badly wrong with the tests when in fact everything is fine. With Serverless v3, we do need to suppress STDERR in addition to STDOUT to achieve this effect.

@maxday maxday self-requested a review March 21, 2022 23:28
@nhinsch nhinsch merged commit 98bb498 into main Mar 22, 2022
@nhinsch nhinsch deleted the ngh/new-wrapper-path branch March 22, 2022 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog [deprecated] qa/skip-qa - use other qa/ labels [DEPRECATED] Please use qa/done or qa/no-code-change to skip creating a QA card team/serverless
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants