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

Fix #1011 by adding a heuristic to not detect tests as lambda handlers #1689

Merged
merged 14 commits into from
Apr 7, 2020

Conversation

hunterwerlla
Copy link
Contributor

@hunterwerlla hunterwerlla commented Apr 6, 2020

  • Filter out lambda handlers based on if they are in test directories (Python)
  • Filter out lambda handlers based on pytest naming convention (Python)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Related Issue(s)

#1011

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hunterwerlla hunterwerlla requested a review from a team as a code owner April 6, 2020 23:15
@rli
Copy link
Contributor

rli commented Apr 6, 2020

The original issue mentions that trying to run a test results in our "create lambda" handler hijacking the test runner. Should we try to tackle that issue as well?

@hunterwerlla
Copy link
Contributor Author

hunterwerlla commented Apr 7, 2020

The original issue mentions that trying to run a test results in our "create lambda" handler hijacking the test runner. Should we try to tackle that issue as well?

The youtrack issue seems to indicate that it's a JB bug, but if we filter out the test it should no longer do that?

private fun assertHandlerDetermineHandlers(handler: String, shouldBeFound: Boolean) {
runInEdtAndWait {
val elementSet = findHandler(handler)
assertThat(elementSet).hasSize(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Confused a bit on why this will always be found, if shouldBeFound is false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me change the name. It should be found as a valid candidate handler but then be filtered by determineHandler.

@hunterwerlla
Copy link
Contributor Author

hunterwerlla commented Apr 7, 2020

/runIntegrationTests

@aws-toolkit-automation
Copy link
Collaborator

aws-toolkit-automation commented Apr 7, 2020

Beep-boop-bop, I'm the Toolkits' GitHub Bot. Here are your CI Job results.

CI Job Status Logs Artifacts
ci-linux-integration FAILED Link Link

These links will expire in one week.

@hunterwerlla hunterwerlla merged commit dac87eb into master Apr 7, 2020
@hunterwerlla hunterwerlla deleted the werlla/pytestimprovements branch April 7, 2020 18:00
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.

4 participants