-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Generation support for 1.11 - build dev 1.10 pr16 #2060
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
Conversation
All cmake modules in cmake were moved to cmake_legacy. Most of the main CMakeLists.txt was moved to cmake_legacy/legacy_main.cmake Option for disabling LEGACY_BUILD was created. But, no implementation yet.
New src directory contains core and core unit tests New test directory contains integration tests for selected autogenerated service clients New tools directory contains tools for code generation, special builds, documentation generation, etc... prefetch_crt script removed, it will not longer be needed at 1.10 Some scripts moved to tools will be later consolidated in the build-system This commit is a breaking change but it is too noisy, so making it back to healthy in next commit by only submitting the real changes to keep things together as before.
Build fails from mixed use of types from CRT and SDK that was fixed after the creation of this branch. The rebase is going to be huge, so breaking the push in 2 steps befor continuing.
Introduced generated exported visibility header. Added all core-tests to the build for ctest. All tests build, not all pass, fixes coming up next.
Build and export header changes to use as reference for the required code-generation changes in following commits.
Moved Testing-Resources target to be a library since we use it in all the tests, integ and unit. Fixed missed inclussion in platform testing that prevented symbols to be accessible for the consumers of the library. Added generated Testing-Resources export. Added build of DynamoDB integration tests.
c447f4f
to
1204dc7
Compare
if(metadata.getSignatureVersion().equals("v4") || metadata.getSignatureVersion().equals("s3v4")) { | ||
return true; | ||
} | ||
return operations.values().parallelStream().anyMatch(operation -> operation.getSignerName().equals("Aws::Auth::SIGV4_SIGNER")); |
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.
parallel steams are generally advised against in the java world because they use the common fork-join pool, meaning they share an executor pool with the rest of the world. I would either use sequential streams which is often faster. or alternatively it can have its own executor pool.
if(retryableErrors.contains(error.getName())) { | ||
error.setRetryable(true); | ||
} | ||
for (Error error : serviceModel.getServiceErrors()) { |
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.
could be simplified to
error.setRetryable(serviceModel.getServiceErrors()
.findAny(error -> retryableErrors.contains(error.getName())))
VelocityContext context = createContext(serviceModel); | ||
|
||
List<String> files = new ArrayList<>(); | ||
for (int i = 0; i < fileList.size(); i++) { |
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.
could be simplified using streams to
fileList.stream()
.filter(Objects::nonNull)
.map(File:: getPathRelativeToRoot)
.filter(filePath -> filePath.endsWith("cpp") && filePath.contains("/model/")
.map(filePath -> Paths.get(filePath).getFileName().toString())
.collect(Collectors.toList())
@@ -123,6 +125,11 @@ public SdkFileEntry[] generateSourceFiles(ServiceModel serviceModel) throws Exce | |||
replicationStatus.getEnumValues().set(indexOfComplete, "COMPLETED"); | |||
} | |||
|
|||
// Some S3 operations have embedded errors, and we need to search for errors in the response. |
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.
i recognize this code 🙂
tools/scripts/generate_sdks.py
Outdated
@@ -1,152 +1,190 @@ | |||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
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.
this is a wrong script to modify.
You could just delete it.
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.
I'm going to do a clean up of all no longer scripts in this directory and merge this back to the right place.
Moving to draft in the mean time.
ea22a72
to
2420fad
Compare
Description of changes:
This change doesn't include regeneration of all clients, only DDB, neither the inclussion of all of them at the generated directory level. Holding that for follow up PR since will create a lot of noise here.
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.