-
Notifications
You must be signed in to change notification settings - Fork 12
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: dotnet examples #482
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
4cfdd09
feat: dotnet examples
ajewellamz db119f6
m
ajewellamz bea77c7
use new SDK features
ajewellamz 31cfb7a
repair example numbering
ajewellamz 7b8c56a
finish interceptor
ajewellamz 0400242
searchable encryption example
ajewellamz 6a229de
cleanup
ajewellamz 9a997a9
allow empty in addition to None
ajewellamz 2dc68e4
one more example
ajewellamz 2048e56
another example, rerun polymorph
ajewellamz 795c704
one more example, hack Scan for dotnet
ajewellamz 1709850
more examples
ajewellamz 090b5e4
more examples
ajewellamz 1fb2704
new example
ajewellamz 5d51f63
new example
ajewellamz adaa29c
test
ajewellamz 1095a6d
more examples
ajewellamz cfd49a5
another example
ajewellamz 8a8063f
complex example
ajewellamz c1f659a
cleanup
ajewellamz f66d4fe
cleanup
ajewellamz 5ccb76b
final
ajewellamz 070705e
m
ajewellamz 43208e5
Merge branch 'main' into dotnet-example
ajewellamz 829c067
Merge branch 'main' into dotnet-example
ajewellamz 5b3e127
m
ajewellamz 6280106
final
ajewellamz b2fd47f
add all appropriate constructors
ajewellamz 001fb98
multi
ajewellamz 5466816
m
ajewellamz 274ca4e
add codebuild/net
ajewellamz d64aa85
Merge branch 'main' into dotnet-example
ajewellamz eb087fb
test vectors
ajewellamz e4dd117
enable dotnet test vectors
ajewellamz aee52e1
m
ajewellamz 275e111
m
ajewellamz 9b22219
m
ajewellamz 6b5f25b
m
ajewellamz 731b4e3
update polymorph, remove hacks
ajewellamz 2a1c9f6
m
ajewellamz 7cd49a7
Merge branch 'main' into dotnet-example
ajewellamz ae051c0
NoMap hack for dotnet
ajewellamz 577e37d
PackageReference
ajewellamz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# This workflow performs tests in .NET. | ||
name: dotnet examples | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
dotNetExamples: | ||
# Don't run the nightly build on forks | ||
if: (github.repository_owner == 'aws') | ||
strategy: | ||
matrix: | ||
library: [ | ||
DynamoDbEncryption, | ||
] | ||
dotnet-version: [ '6.0.x' ] | ||
os: [ | ||
# TODO windows-latest, | ||
# ubuntu-latest, | ||
macos-latest, | ||
] | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
id-token: write | ||
contents: read | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_NOLOGO: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
|
||
- name: Setup Dafny | ||
uses: dafny-lang/[email protected] | ||
with: | ||
dafny-version: ${{ '4.2.0' }} | ||
|
||
- name: Download Dependencies | ||
working-directory: ./${{ matrix.library }} | ||
run: make setup_net | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2 | ||
role-session-name: DDBEC-Dafny-Net-Tests | ||
|
||
- name: Compile ${{ matrix.library }} implementation | ||
shell: bash | ||
working-directory: ./${{ matrix.library }} | ||
run: | | ||
# This works because `node` is installed by default on GHA runners | ||
CORES=$(node -e 'console.log(os.cpus().length)') | ||
make transpile_net CORES=$CORES | ||
- name: Run Examples | ||
working-directory: ./Examples/runtimes/net | ||
shell: bash | ||
run: | | ||
dotnet run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# This workflow performs test vectors in DotNet. | ||
name: Library DotNet Test Vectors | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
testDotNet: | ||
strategy: | ||
matrix: | ||
dotnet-version: [ '6.0.x' ] | ||
os: [ | ||
# Run on ubuntu image that comes pre-configured with docker | ||
ubuntu-latest | ||
] | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- name: Setup DynamoDB Local | ||
uses: rrainn/[email protected] | ||
with: | ||
port: 8000 | ||
cors: '*' | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2 | ||
role-session-name: DDBEC-Dafny-DotNet-Tests | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Dafny | ||
uses: dafny-lang/[email protected] | ||
with: | ||
dafny-version: '4.2.0' | ||
|
||
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
|
||
- name: Build TestVectors implementation | ||
shell: bash | ||
working-directory: ./TestVectors | ||
run: | | ||
# This works because `node` is installed by default on GHA runners | ||
make transpile_net | ||
|
||
- name: Test TestVectors | ||
working-directory: ./TestVectors/runtimes/net | ||
run: | | ||
cp ../java/*.json . | ||
# dotnet run | ||
echo can't build until we make type conversions public | ||
echo can't run until we update MPL/ComAmazonawsDynamodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Wow. If this is all that is needed to handle empty, we should change Java.
(But treat DDB's AttributeValue specially)
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.
For an optional map or list, the dotnet AWS SDK can't distinguish empty from None (since it hides the IsSet method).
This should be safe for java, since the smithy says "Optional non-empty".
I don't understand what you mean by "we should change java" -- as far as I can tell, Java is right and dotnet is wrong.