Skip to content

chore: Refactor to build into single artifact #74

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 13 commits into from
Mar 28, 2023
Merged

chore: Refactor to build into single artifact #74

merged 13 commits into from
Mar 28, 2023

Conversation

lavaleri
Copy link
Contributor

@lavaleri lavaleri commented Mar 27, 2023

Refactor contains the following major changes:

  • Updated all namespaces to move under DynamoDbEncryption and updated Makefile to handle building multiple namespaces
  • Moved local service containing the transforms to a new namespace dynamoDbEncryption.transforms
  • Move the DynamoDbItemEncryptor to a new namespace dynamoDbEncryption.itemEncryptor.
  • Created new empty DynamoDbEncryption local service
  • Moved "common" structures such as AttributeActions and LegacyPolicy to DynamoDbEncryption service
  • Updated custom Java tests to use TestNG
  • remove polymorph submodule
  • move Dafny ESDK submodule to submodules/MaterialProviders

Manual smithy change added:

  • Had to update the DynamoDbEncryptionTransforms Types file because it was not importing it's config file correctly.

Manual smithy changes preserved:

  • DynamoDbItemEncryptor Types still manually defines some Modifies ensures, as otherwise our resource count is exceeded.
  • DynamoDbEncryption ToNative still manually updated to make the LegacyEncryptor work correctly.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:24 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:24 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:24 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:24 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:24 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:24 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 16:24 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 17:55 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 17:55 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 17:55 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 17:55 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 17:55 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 17:55 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 17:55 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 19:21 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 19:21 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 19:21 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 19:21 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 19:21 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 27, 2023 19:21 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:22 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 06:32 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
@lavaleri lavaleri temporarily deployed to ESDK CI March 28, 2023 07:41 — with GitHub Actions Inactive
Copy link
Contributor

@seebees seebees left a comment

Choose a reason for hiding this comment

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

Small comment otherwise looks pretty good

Comment on lines +1 to +7
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

# These make targets that are shared
# between all the projects in this repo.
# They will only function if executed inside a project directory.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have this include the root one and then modify it accordingly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could, but just duplicating it here was easier. I would prefer to backfill the one in MPL to match the one here.

Realistically, it's only for convenience/to avoid duplication that the SharedMakefile belongs to MPL. The way I think of this is a bit similar to gradle, where each smithy-dafny project would come with some canonical SharedMakefile that gives you most of the goodness you are already looking for. And this "SharedMakefile" exists in multiple places just because each project needs access to it, and shoudn't have to dig into it's dependencies to do so.

run: |
# This works because `node` is installed by default on GHA runners
CORES=$(node -e 'console.log(os.cpus().length)')
make verify CORES=$CORES
make verify_namespace CORES=$CORES SMITHY_NAMESPACE=${{ matrix.namespace }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a new target because you need to break it up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, otherwise it takes >30min for CI to turn green. I figure once we launch and aren't doing as much development on it, we could switch back to the single target to be extra sure we aren't missing any files.

@lavaleri lavaleri marked this pull request as ready for review March 28, 2023 18:44
@lavaleri lavaleri merged commit e4f3dfe into main Mar 28, 2023
@lavaleri lavaleri deleted the refactor branch March 28, 2023 18:45
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.

3 participants