Skip to content

chore: fix TODO CI #1913

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

Merged
merged 4 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions .github/workflows/ci_todos.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# TODO: Uncomment this
# # This workflow prevents TODOs in code
# name: Check TODOs in code
# This workflow prevents TODOs in code
name: Check TODOs in code

# on:
# pull_request:
# push:
# branches:
# - main
on:
pull_request:
push:
branches:
- main

# jobs:
# findTodos:
# runs-on: macos-13
# steps:
# - uses: actions/checkout@v3
jobs:
findTodos:
runs-on: macos-13
steps:
- uses: actions/checkout@v3

# - name: Check TODOs in code
# shell: bash
# # TODOs may be committed as long as the same line contains a link to a Github Issue or refers to a CrypTool SIM.
# run: |
# ALL_TODO_COUNT=$( { grep -r "TODO" . --exclude-dir=./releases --exclude-dir=./TestVectors/runtimes --exclude-dir=./submodules --exclude-dir=./.git --exclude=./.github/workflows/ci_todos.yml || true; } | wc -l)
# GOOD_TODO_COUNT=$( { grep -r "TODO.*\(github.com\/.*issues.*\/[1-9][0-9]*\|CrypTool-[1-9][0-9]*\)" . --exclude-dir=./releases --exclude-dir=./submodules --exclude-dir=./.git --exclude-dir=./TestVectors/runtimes --exclude=./.github/workflows/ci_todos.yml || true; } | wc -l)
# if [ "$ALL_TODO_COUNT" != "$GOOD_TODO_COUNT" ]; then
# exit 1;
# fi
- name: Check TODOs in code
shell: bash
# TODOs may be committed as long as the same line contains a link to a Github Issue or refers to a CrypTool SIM.
run: |
ALL_TODO_COUNT=$( { grep -r "TODO" . --exclude-dir=./releases --exclude-dir=./TestVectors/runtimes --exclude-dir=./submodules --exclude-dir=./.git --exclude=./.github/workflows/ci_todos.yml | grep -v "context\.TODO()" || true; } | wc -l)
GOOD_TODO_COUNT=$( { grep -r "TODO.*\(github.com\/.*issues.*\/[1-9][0-9]*\|CrypTool-[1-9][0-9]*\)" . --exclude-dir=./releases --exclude-dir=./submodules --exclude-dir=./.git --exclude-dir=./TestVectors/runtimes --exclude=./.github/workflows/ci_todos.yml | grep -v "context\.TODO()" || true; } | wc -l)
if [ "$ALL_TODO_COUNT" != "$GOOD_TODO_COUNT" ]; then
exit 1;
fi
2 changes: 1 addition & 1 deletion DynamoDbEncryption/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ SERVICE_DEPS_DynamoDbEncryptionTransforms := \
DynamoDbEncryption/dafny/DynamoDbItemEncryptor

# Go
# TODO: Define the name later
# TODO-Go-ORR: Define the name later https://sim.amazon.com/issues/CrypTool-5444
# This will probably get changes to */releases/go/* but I will bring this to the team later.
GO_MODULE_NAME="github.com/aws/aws-database-encryption-sdk-dynamodb"

Expand Down
15 changes: 1 addition & 14 deletions TestVectors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,6 @@ _sed_types_file_add_extern:

_polymorph_go: purge_polymorph_code

# Smithy-dafny generated shim needs a long term fix.
# TODO: Remove this commands once smithy-dafny is fixed
# This commands does not work on windows
# https://taskei.amazon.dev/tasks/CrypTool-5283
purge_polymorph_code:
find .. -name "shim.go" | xargs sed -i $(SED_PARAMETER) 's/(_static \*CompanionStruct_Default___)//g'
rm -rf runtimes/go/ImplementationFromDafny-go/awscryptographydbencryptionsdkdynamodbsmithygenerated \
runtimes/go/ImplementationFromDafny-go/awscryptographydbencryptionsdkdynamodbsmithygeneratedtypes \
runtimes/go/ImplementationFromDafny-go/WrappedAwsCryptographyDbEncryptionSdkDynamoDbService \
runtimes/go/TestsFromDafny-go/awscryptographydbencryptionsdkdynamodbsmithygenerated \
runtimes/go/TestsFromDafny-go/awscryptographydbencryptionsdkdynamodbsmithygeneratedtypes \
runtimes/go/TestsFromDafny-go/WrappedAwsCryptographyDbEncryptionSdkDynamoDbService

# Go
GO_MODULE_NAME="github.com/aws/aws-database-encryption-sdk-dynamodb/testvectors"

Expand Down Expand Up @@ -213,7 +200,7 @@ _sed_index_file_remove_extern:
_polymorph_go: purge_polymorph_code

# Smithy-dafny generated shim needs a long term fix.
# TODO: Remove this commands once smithy-dafny is fixed
# TODO: Remove this commands once smithy-dafny is fixed https://sim.amazon.com/issues/CrypTool-5445
# This commands does not work on windows
# https://taskei.amazon.dev/tasks/CrypTool-5283
purge_polymorph_code:
Expand Down
Loading