-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Smoke Tests Codegen Working #3155
Conversation
…ibeIntegrations and ModifyIntegration APIs to create and manage Amazon Redshift Zero-ETL Integrations. Amazon Q Business now supports embedding the Amazon Q Business web experience on third-party websites. On a channel that you own, you can now replace an ongoing stream with a new stream by streaming up with the priority parameter appended to the stream key. This release adds support for email maximum delivery seconds that allows senders to control the time within which their emails are attempted for delivery. Enable proxy for reserved capacity fleet. Added sourceUrlType field to StartDeployment request Documentation update for AWS CloudFormation API Reference. AWS Resilience Hub now integrates with the myApplications platform, enabling customers to easily assess the resilience of applications defined in myApplications. The new Resiliency widget provides visibility into application resilience and actionable recommendations for improvement. We are expanding support for 40 new locales in AWS Transcribe Streaming.
…eters in the ListBuckets API. For ListBuckets requests that express pagination, Amazon S3 will now return both the bucket names and associated AWS regions in the response.
Updates Amazon RDS documentation for TAZ IAM support Add StartDashboardSnapshotJobSchedule API. RestoreAnalysis now supports restoring analysis to folders. This release adds validation to require specifying a SecurityGroup and Subnets in the Vpc object under PipesSourceSelfManagedKafkaParameters. It also adds support for iso-e, iso-f, and other non-commercial partitions in ARN parameters. This release adds Data Grant support, through which customers can programmatically create data grants to share with other AWS accounts and accept data grants from other AWS accounts. Added the registrations status of REQUIRES_AUTHENTICATION Updated the DomainName pattern for Active Directory Removing support for topK property in PromptModelInferenceConfiguration object, Making PromptTemplateConfiguration property as required, Limiting the maximum PromptVariant to 1
…n a bad state" This reverts commit a8f6c9c.
RequestSpotInstances and RequestSpotFleet feature release. Adding converse support to CMI API's Removing FEDERATED from Create/List/Delete/GetDataCatalog API Adding the following project member designations: PROJECT_CATALOG_VIEWER, PROJECT_CATALOG_CONSUMER and PROJECT_CATALOG_STEWARD in the CreateProjectMembership API and PROJECT_CATALOG_STEWARD designation in the AddPolicyGrant API.
…ibeIntegrations and ModifyIntegration APIs to create and manage Amazon Redshift Zero-ETL Integrations. Amazon Q Business now supports embedding the Amazon Q Business web experience on third-party websites. On a channel that you own, you can now replace an ongoing stream with a new stream by streaming up with the priority parameter appended to the stream key. This release adds support for email maximum delivery seconds that allows senders to control the time within which their emails are attempted for delivery. Enable proxy for reserved capacity fleet. Added sourceUrlType field to StartDeployment request Documentation update for AWS CloudFormation API Reference. AWS Resilience Hub now integrates with the myApplications platform, enabling customers to easily assess the resilience of applications defined in myApplications. The new Resiliency widget provides visibility into application resilience and actionable recommendations for improvement. We are expanding support for 40 new locales in AWS Transcribe Streaming.
cmake/sdks.cmake
Outdated
@@ -162,7 +162,6 @@ if(BUILD_ONLY) | |||
else() | |||
set(SDK_DIR "generated/src/aws-cpp-sdk-${SDK}") | |||
endif() | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still has white space change
...src/main/java/com/amazonaws/util/awsclientsmithygenerator/generators/CppImportContainer.java
Outdated
Show resolved
Hide resolved
"algorithm" | ||
); | ||
|
||
this.unitTestHeaders = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont create a new hash set and add to it, use ImmtuableList.of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, it's a set .So I will just use Set.of()
import software.amazon.smithy.aws.smoketests.model.S3VendorParams; | ||
|
||
public final class ClientConfiguration { | ||
private final AwsVendorParams awsParams; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AwsVendorParams
and S3VendorParams
both extend BaseAwsVendorParams
, this is a anti pattern to access through a boolean "has type" pattern. the member variable should be of BaseAwsVendorParams
, and when you build it assign it a concrete type then just refer to the configuration through the abstract type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack. changed to base class and use instance of.
{ | ||
if(shape == null) | ||
{ | ||
throw new Exception("Invalid shape found"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont throw a Exception, it makes everyone up chain check it, either throw a generic RuntimeException
or create a class that subclasses RuntimeException
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
throw new Exception(String.format("No service trait detected in service shape with name=%s",serviceShape.getId().getName())); | ||
} | ||
|
||
//this.model.getShape(serviceShapeId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still commented out
{ | ||
write("${L|}", | ||
|
||
"#include <aws/testing/AwsCppSdkGTestSuite.h>\n" + // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still here in latest commit, at least the function at least,if its unused, remove it
@Override | ||
public Symbol enumShape(EnumShape shape) { | ||
|
||
// return ShapeVisitor.super.enumShape(shape); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented out code, inconsistent spacing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack. oversight
{ | ||
if(!serviceShape.getTrait(ServiceTrait.class).isPresent()) | ||
{ | ||
throw new Exception(String.format("No service trait detected in service shape with name=%s",serviceShape.getId().getName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont throw exception, everyon up chain has to check it, never throw or check Exception
, subclass or throw a RuntimeException
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is your recommendation how I should handle this? I understand that stack unwinding will happen on exception but what do i return when service trait is missing. I can throw a Runtimeexception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they have a concept of "checked and unchecked exceptions" in java.
additionally, simple regular Exception
is too broad and the exception handling error code must catch it and do it's logic accordingly to the exception string message (vs simply type of the exception).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack. I will switch to runtime exception as it is one of those cases where I have to throw if service trait not found
...n/src/main/java/com/amazonaws/util/awsclientsmithygenerator/generators/SmokeTestsParser.java
Show resolved
Hide resolved
Addressed all the comments that were brought up. If there are some things missed, I will address |
...n/src/main/java/com/amazonaws/util/awsclientsmithygenerator/generators/SmokeTestsParser.java
Outdated
Show resolved
Hide resolved
...n/src/main/java/com/amazonaws/util/awsclientsmithygenerator/generators/SmokeTestsParser.java
Outdated
Show resolved
Hide resolved
public boolean expectSuccess; | ||
public Optional<String> errorShapeId; | ||
//capture auth scheme as that decides the client constructor | ||
String auth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why is this member the only one with a comment and the only one without access modifier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack. missed the specifier, shall add . The comment for this field is because this is a derived field, not parsed directly from the smoke test trait in model since its available in the service trait
} catch (Exception e) { | ||
// Handle the exception | ||
System.err.println("An error occurred while running the smoke tests: " + e.getMessage()); | ||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the generation should fail. whatever invokes the generation in CI, should not fail. making it the callers responsibility to decide.
Issue #, if available:
Description of changes:
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.