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

feat(amazonq): allow users to skip tests #5607

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

dhasani23
Copy link
Contributor

Problem

Some users transform projects with long-running tests.

Solution

Allow users to skip tests by prompting them via chat and passing the relevant flag to skip tests through the manifest.json.


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

@dhasani23 dhasani23 requested review from a team as code owners September 17, 2024 01:56
@dhasani23
Copy link
Contributor Author

dhasani23 commented Sep 17, 2024

image
image

@dhasani23
Copy link
Contributor Author

Note: the backend work for this feature is not done yet, so we don't want to merge it yet.

}

// Explicitly set metric as failed since no exception was caught
telemetry.record({ result: MetadataResult.Fail, reason: errorReason })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of the above logic removed (same as below) was entirely just to form the errorReason string. We include all of that info in the IDE logs already, and we can simply put the error code in telemetry to simplify.

// one of these must be true
if (skipTestsSelection === CodeWhispererConstants.skipUnitTestsMessage) {
transformByQState.setCustomBuildCommand(CodeWhispererConstants.skipUnitTestsBuildCommand)
} else if (skipTestsSelection === CodeWhispererConstants.doNotSkipUnitTestsMessage) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth just making this an else and not skipping unit tests by default? What happens if setCustomBuildCommand is never called?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, will fix. Our default should be to not skip tests.

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