Skip to content
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

chore(Test Vector): Add interop test for Go #1071

Open
wants to merge 37 commits into
base: Golang/dev
Choose a base branch
from

Conversation

rishav-karanjit
Copy link
Member

@rishav-karanjit rishav-karanjit commented Dec 2, 2024

Issue #, if available:

Description of changes:

  • Adds/Updates makefile, externs and go.mod file to run test vectors.
  • Bump smithy-dafny HEAD to latest commit of Golang/dev

Call-outs:

  • This PR adds github.com/dafny-lang/DafnyRuntimeGo/v4 v4.9.1 instead of v4.9.0 because of the performance issue found in v4.9.0
  • Update: I added this commands to the makefile itself. So, these commands runs with polymorph and transpile. Also added a TODO there.
  • Use this script on TestVectorsAwsCryptographicMaterialProviders directory before running the generated code to fix the known issues with Go:
#!/bin/bash

find .. -name "shim.go" | xargs sed -i "" 's/(_static \*CompanionStruct_Default___)//g'

rm -rf runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated \
      runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes \
      runtimes/go/ImplementationFromDafny-go/WrappedAwsCryptographyMaterialProvidersService \
      runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated \
      runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygeneratedtypes \
      runtimes/go/TestsFromDafny-go/WrappedAwsCryptographyMaterialProvidersService

sed -i '' 's/_out0 = m_TestWrappedMaterialProvidersMain.GetTestVectorExecutionDirectory()/_out0 = GetTestVectorExecutionDirectory()/g' ./runtimes/go/TestsFromDafny-go/TestWrappedMaterialProvidersMain/TestWrappedMaterialProvidersMain.go

How to test this?

  • There are two ways to test it. Use either (i) or (ii).

    1. Run make test_go
    2. Run following commands:
      • make test_generate_vectors_go
      • make test_encrypt_vectors_go
      • make test_decrypt_encrypt_vectors_go

Squash/merge commit message, if applicable:

chore(Test Vector): Add interop test for Go

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rishav-karanjit rishav-karanjit changed the title Test test vector feat(Test Vector): Add go support for test vectors Dec 2, 2024
@rishav-karanjit rishav-karanjit changed the title feat(Test Vector): Add go support for test vectors feat(Test Vector): Add interop test for Go Dec 2, 2024
@rishav-karanjit rishav-karanjit marked this pull request as ready for review December 2, 2024 19:12
@rishav-karanjit rishav-karanjit requested a review from a team as a code owner December 2, 2024 19:12
@rishav-karanjit rishav-karanjit changed the title feat(Test Vector): Add interop test for Go chore(Test Vector): Add interop test for Go Dec 2, 2024
Copy link

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

Detected changes to the release files or to the check-files action

Copy link

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

Detected changes to the release files or to the check-files action

Copy link

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

Detected changes to the release files or to the check-files action

Copy link

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

Detected changes to the release files or to the check-files action

Copy link

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link

Detected changes to the release files or to the check-files action

Copy link

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link
Contributor

@ShubhamChaturvedi7 ShubhamChaturvedi7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are so many CIs failing?

# TODO: Remove these commands once smithy-dafny is fixed
# SED parameter is set on SmithyDafnySedMakefile.mk in smithy-dafny
polymorph_go:
find .. -name "shim.go" | xargs sed -i $(SED_PARAMETER) 's/(_static \*CompanionStruct_Default___)//g'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a link to the broken windows CI sim.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in this PR: #1157 because I had to make PR to main

Copy link

@rishav-karanjit and @ShubhamChaturvedi7, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

@rishav-karanjit rishav-karanjit changed the base branch from Golang/dev to main December 16, 2024 23:47
@rishav-karanjit rishav-karanjit changed the base branch from main to Golang/mpl December 16, 2024 23:47
@rishav-karanjit rishav-karanjit changed the base branch from Golang/mpl to Golang/dev December 16, 2024 23:48
Copy link

@rishav-karanjit and @rishav-karanjit, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants