Conversation
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
david-perez
left a comment
There was a problem hiding this comment.
Good to go but we should ensure we run the fuzzgen test in fuzzgen/src/test/kotlin/software/amazon/smithy/rust/codegen/fuzz/FuzzHarnessBuildPluginTest.kt in CI.
| "features" to cargoFeatures.toMap(), | ||
| ).deepMergeWith(manifestCustomizations) | ||
|
|
||
| println(cargoToml) |
There was a problem hiding this comment.
Is this intentional or a leftover?
fuzzgen/src/main/kotlin/software/amazon/smithy/rust/codegen/fuzz/FuzzHarnessBuildPlugin.kt
Outdated
Show resolved
Hide resolved
| operations: [SayHello], | ||
| version: "1" | ||
| } | ||
| @optionalAuth |
There was a problem hiding this comment.
Is @optionalAuth relevant here?
| import software.amazon.smithy.rust.codegen.core.util.runCommand | ||
| import software.amazon.smithy.rust.codegen.server.smithy.testutil.serverIntegrationTest | ||
|
|
||
| class FuzzHarnessBuildPluginTest() { |
There was a problem hiding this comment.
I don't think this test will get run by CI? Since this fuzzgen Gradle module is new.
| 3. The fuzz driver can be used on other fuzz targets. | ||
|
|
||
| ### Setup | ||
| First, you'll need to generate the 1 (or more) versions of a smithy-rs server to test against. The best way to do this is by using the smithy CLI. **This process is fully automated with the `aws-smithy-fuzz setup-smithy`. The following docs are in place in case you want to alter the behavior.** |
There was a problem hiding this comment.
| First, you'll need to generate the 1 (or more) versions of a smithy-rs server to test against. The best way to do this is by using the smithy CLI. **This process is fully automated with the `aws-smithy-fuzz setup-smithy`. The following docs are in place in case you want to alter the behavior.** | |
| First, you'll need to generate the 2 (or more) versions of a smithy-rs server to test against. The best way to do this is by using the smithy CLI. **This process is fully automated with the `aws-smithy-fuzz setup-smithy`. The following docs are in place in case you want to alter the behavior.** |
There was a problem hiding this comment.
you can fuzz against 1 — you are then fuzzing for panics instead of fuzzing for comparison
| exec( | ||
| Command::new("rm") | ||
| .arg("-r") | ||
| .arg(format!("{}/.m2", home_dir.display())) |
There was a problem hiding this comment.
Perhaps nuke just ~/.m2/repository/software/amazon/smithy/? Lest we overreach and delete important stuff.
Co-authored-by: david-perez <d@vidp.dev>
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
| @@ -0,0 +1,111 @@ | |||
| /* | |||
There was a problem hiding this comment.
Not a great place to comment so I'm just picking here. This is fine for now but I'd really like to see us refactor our project structure a bit and group codegen all together, something like:
codegen/
smithy-rs-server-codegen/
smithy-rs-client-codegen/
smithy-rs-shared-codegen/
...
Example names but we also need to consider publishing and it's useful if the directory for a maven artifact matches the published name (1) easier to find and (2) that's the default anyway when publishing is to use the project name.
I'd like to do something similar for the runtime.
## Motivation and Context This implements fuzzing for smithy-rs servers ## Description <!--- Describe your changes in detail --> ## Testing <!--- Please describe in detail how you tested your changes --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [ ] For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "client," "server," or both in the `applies_to` key. - [ ] For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "aws-sdk-rust" in the `applies_to` key. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: david-perez <d@vidp.dev>
Motivation and Context
This implements fuzzing for smithy-rs servers
Description
Testing
Checklist
.changelogdirectory, specifying "client," "server," or both in theapplies_tokey..changelogdirectory, specifying "aws-sdk-rust" in theapplies_tokey.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.