Skip to content

Commit f027f78

Browse files
merge
2 parents 512f13b + ea0fe50 commit f027f78

File tree

129 files changed

+14410
-3935
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+14410
-3935
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# This local action sets up code dependencies
3+
# to run Smithy-Dafny CI in GitHub Actions workflows.
4+
#
5+
6+
name: "Install Smithy-Dafny codegen dependencies"
7+
description: "Install Java package dependencies required to run Smithy-Dafny codegen"
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Install smithy-dafny-codegen Rust dependencies locally
12+
uses: gradle/gradle-build-action@v2
13+
with:
14+
arguments: :codegen-client:pTML :codegen-core:pTML :rust-runtime:pTML
15+
build-root-directory: smithy-dafny/smithy-dafny-codegen-modules/smithy-rs
16+
17+
- name: Install smithy-dafny-codegen Python dependencies locally
18+
uses: gradle/gradle-build-action@v2
19+
with:
20+
arguments: :smithy-python-codegen:pTML
21+
build-root-directory: smithy-dafny/codegen/smithy-dafny-codegen-modules/smithy-python/codegen

.github/workflows/library_codegen.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
# The specification submodule is private so we don't have access, but we don't need
4343
# it to verify the Dafny code. Instead we manually pull the submodules we DO need.
4444
- run: git submodule update --init libraries
45-
- run: git submodule update --init smithy-dafny
45+
- run: git submodule update --init --recursive smithy-dafny
4646

4747
# Only used to format generated code
4848
# and to translate version strings such as "nightly-latest"
@@ -57,6 +57,15 @@ jobs:
5757
with:
5858
dotnet-version: ${{ matrix.dotnet-version }}
5959

60+
- name: Setup Java 17 for codegen
61+
uses: actions/setup-java@v3
62+
with:
63+
distribution: "corretto"
64+
java-version: "17"
65+
66+
- name: Install Smithy-Dafny codegen dependencies
67+
uses: ./.github/actions/install_smithy_dafny_codegen_dependencies
68+
6069
- uses: ./.github/actions/polymorph_codegen
6170
with:
6271
dafny: ${{ env.DAFNY_VERSION }}

.github/workflows/pull.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,20 @@ jobs:
3939
uses: ./.github/workflows/library_interop_tests.yml
4040
with:
4141
dafny: ${{needs.getVersion.outputs.version}}
42+
pr-ci-all-required:
43+
if: always()
44+
needs:
45+
- getVersion
46+
- getVerifyVersion
47+
- pr-ci-format
48+
- pr-ci-codegen
49+
- pr-ci-verification
50+
- pr-ci-java
51+
- pr-ci-net
52+
- pr-interop-test
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Verify all required jobs passed
56+
uses: re-actors/alls-green@release/v1
57+
with:
58+
jobs: ${{ toJSON(needs) }}

.github/workflows/smithy-diff.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
name: Check Smithy Files
44

55
on:
6-
pull_request:
6+
pull_request_review:
7+
types: [submitted]
78

89
jobs:
910
require-approvals:
@@ -19,20 +20,22 @@ jobs:
1920
- name: Get Files changed
2021
id: file-changes
2122
shell: bash
23+
env:
24+
GITHUB_HEAD: ${{github.event.pull_request.head.ref}}
2225
run:
2326
# Checks to see if any of the smithy Models are being updated.
2427
# Doing this check allows us to catch things like, missing @javadoc trait documentation or bug in smithy dafny that has not be resolved.
25-
echo "FILES=$(git diff --name-only origin/main origin/${GITHUB_HEAD_REF} | grep '\.smithy$' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
28+
echo "FILES=$(git diff --name-only origin/main origin/${GITHUB_HEAD} | grep '\.smithy$' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
2629

2730
- name: Check if FILES is not empty
2831
id: comment
2932
env:
30-
PR_NUMBER: ${{ github.event.number }}
33+
PR_NUMBER: ${{ github.event.pull_request.number }}
3134
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3235
FILES: ${{ steps.file-changes.outputs.FILES }}
3336
if: ${{env.FILES != ''}}
3437
run: |
3538
# TODO: If https://github.com/smithy-lang/smithy-dafny/issues/491 is resolved, remove comment about this issue.
36-
COMMENT="@${{github.actor}}, I noticed you are updating the smithy model files.\nDoes this update need new or updated javadoc trait documentation?\n Are you adding constraints inside list, map or union? Do you know about this issue: https://github.com/smithy-lang/smithy-dafny/issues/491?"
39+
COMMENT="@${{github.event.pull_request.user.login}} and @${{github.actor}}, I noticed you are updating the smithy model files.\nDoes this update need new or updated user documentation?\n Are you adding constraints inside list, map or union? Do you know about this issue: https://github.com/smithy-lang/smithy-dafny/issues/491?"
3740
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
3841
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"

.releaserc.cjs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
// We model all the files and the runtimes here in this structure
2121
const Runtimes = {
2222
java: {
23-
"project.properties": {
24-
dependencies: [],
25-
},
2623
"AwsCryptographicMaterialProviders/runtimes/java/build.gradle.kts": {
2724
dependencies: [],
2825
},
@@ -84,13 +81,6 @@ module.exports = {
8481
replacements: [
8582
// Update the version for all Gradle Java projects
8683
// Does not update the dependencies
87-
{
88-
files: Object.keys(Runtimes.java),
89-
from: 'mplVersion=".*"',
90-
to: 'mplVersion="${nextRelease.version}"',
91-
results: Object.keys(Runtimes.java).map(CheckResults),
92-
countMatches: true,
93-
},
9484
{
9585
files: Object.keys(Runtimes.java),
9686
from: 'version = ".*"',

AwsCryptographicMaterialProviders/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
TestResults
22
ImplementationFromDafny.cs
33
TestsFromDafny.cs
4+
ImplementationFromDafny-cs.dtr
5+
TestsFromDafny-cs.dtr
46

57
**/bin
68
**/obj

AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dafny/dafny-4.3.0.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dotnet/dafny-4.2.0.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs
2-
index b10e603c..89561181 100644
2+
index e05ad66e..7b6ad3a7 100644
33
--- b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs
44
+++ a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs
5-
@@ -3436,7 +3436,9 @@ namespace AWS.Cryptography.MaterialProviders
5+
@@ -3872,7 +3872,9 @@ namespace AWS.Cryptography.MaterialProviders
66
dafnyVal._ComAmazonawsDynamodb
77
);
88
case software.amazon.cryptography.materialproviders.internaldafny.types.Error_ComAmazonawsKms dafnyVal:

AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographyKeyStore/dotnet/dafny-4.2.0.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs
2-
index f5ef0458..f846a946 100644
2+
index 95c9eba1..bcd537fb 100644
33
--- b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs
44
+++ a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs
5-
@@ -629,7 +629,9 @@ namespace AWS.Cryptography.KeyStore
5+
@@ -732,7 +732,9 @@ namespace AWS.Cryptography.KeyStore
66
dafnyVal._ComAmazonawsDynamodb
77
);
88
case software.amazon.cryptography.keystore.internaldafny.types.Error_ComAmazonawsKms dafnyVal:
@@ -13,7 +13,7 @@ index f5ef0458..f846a946 100644
1313
dafnyVal._ComAmazonawsKms
1414
);
1515
case software.amazon.cryptography.keystore.internaldafny.types.Error_KeyStoreException dafnyVal:
16-
@@ -652,7 +654,9 @@ namespace AWS.Cryptography.KeyStore
16+
@@ -755,7 +757,9 @@ namespace AWS.Cryptography.KeyStore
1717
{
1818
case "Com.Amazonaws.KMS":
1919
return software.amazon.cryptography.keystore.internaldafny.types.Error.create_ComAmazonawsKms(

AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ module {:extern "software.amazon.cryptography.materialproviders.internaldafny.ty
719719
| SingleThreaded(SingleThreaded: SingleThreadedCache)
720720
| MultiThreaded(MultiThreaded: MultiThreadedCache)
721721
| StormTracking(StormTracking: StormTrackingCache)
722+
| Shared(Shared: ICryptographicMaterialsCache)
722723
class IClientSupplierCallHistory {
723724
ghost constructor() {
724725
GetClient := [];
@@ -823,7 +824,8 @@ module {:extern "software.amazon.cryptography.materialproviders.internaldafny.ty
823824
nameonly branchKeyIdSupplier: Option<IBranchKeyIdSupplier> := Option.None ,
824825
nameonly keyStore: AwsCryptographyKeyStoreTypes.IKeyStoreClient ,
825826
nameonly ttlSeconds: PositiveLong ,
826-
nameonly cache: Option<CacheType> := Option.None
827+
nameonly cache: Option<CacheType> := Option.None ,
828+
nameonly partitionId: Option<string> := Option.None
827829
)
828830
datatype CreateAwsKmsKeyringInput = | CreateAwsKmsKeyringInput (
829831
nameonly kmsKeyId: KmsKeyId ,

0 commit comments

Comments
 (0)