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

refactor(KSA-Dafny): break up Mutations and other small refactors #1069

Merged
merged 12 commits into from
Dec 2, 2024

Conversation

texastony
Copy link
Contributor

@texastony texastony commented Nov 30, 2024

Issue #, if available:

Description of changes:

  • Break up the run on module Mutations.dfy into InternalApplyMutation and InternalInitializeMutation.
  • Mutations.dfy still has all the common logic
  • Refactor Tests to clean up all items of a Branch Key
  • In Java, add a test dependency to address log4j class failures

Squash/merge commit message, if applicable:

refactor(KSA-Dafny): break up Mutations and other small refactors

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

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

Comment on lines +522 to +549
:- Need(
&& UTF8.ValidUTF8Seq(commitment.Original),
Types.KeyStoreAdminException(
message := "Mutation Commitment's Original is not a Valid UTF-8 Byte sequence."));
:- Need(
&& UTF8.ValidUTF8Seq(commitment.Terminal),
Types.KeyStoreAdminException(
message := "Mutation Commitment's Terminal is not a Valid UTF-8 Byte sequence."));
:- Need(
&& UTF8.ValidUTF8Seq(commitment.Input),
Types.KeyStoreAdminException(
message := "Mutation Commitment's Input is not a Valid UTF-8 Byte sequence."));
:- Need(
&& 0 < |commitment.Identifier|,
Types.KeyStoreAdminException(
message := "Mutation Commitment's Identifier cannot be empty."));
:- Need(
&& 0 < |commitment.UUID|,
Types.KeyStoreAdminException(
message := "Mutation Commitment's UUID cannot be empty."));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is possible that this could be abstracted into a function...

Copy link

@texastony and @texastony, 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?

@texastony
Copy link
Contributor Author

@texastony and @texastony, 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?

I am not modifying any Smithy Files...
I think this bot is comparing the Branch with main?

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 Author

@texastony texastony left a comment

Choose a reason for hiding this comment

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

Did I fix smithy-diff?

Copy link

github-actions bot commented Dec 1, 2024

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

Copy link

github-actions bot commented Dec 1, 2024

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

Copy link

github-actions bot commented Dec 1, 2024

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

Copy link

github-actions bot commented Dec 1, 2024

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

Copy link

github-actions bot commented Dec 1, 2024

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

Copy link

github-actions bot commented Dec 1, 2024

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

Copy link

github-actions bot commented Dec 1, 2024

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

Copy link

github-actions bot commented Dec 1, 2024

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

@texastony texastony marked this pull request as draft December 1, 2024 20:33
@texastony texastony force-pushed the mutations/refactor-break-up-mutations branch from 15deeda to 03553f3 Compare December 2, 2024 03:42
Copy link

github-actions bot commented Dec 2, 2024

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

Copy link

github-actions bot commented Dec 2, 2024

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

Copy link

github-actions bot commented Dec 2, 2024

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

@texastony texastony force-pushed the mutations/refactor-break-up-mutations branch from 36c9af3 to 3ea920c Compare December 2, 2024 20:41
Copy link

github-actions bot commented Dec 2, 2024

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

Copy link

github-actions bot commented Dec 2, 2024

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

Copy link

github-actions bot commented Dec 2, 2024

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

Copy link

github-actions bot commented Dec 2, 2024

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

Copy link

github-actions bot commented Dec 2, 2024

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

Copy link

github-actions bot commented Dec 2, 2024

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

@texastony
Copy link
Contributor Author

CI is green on b1ac26d
The subsequent commit was just a comment change that will not affect CI in any way.

@texastony texastony merged commit 0eb85e9 into mutations/mutations Dec 2, 2024
115 of 116 checks passed
@texastony texastony deleted the mutations/refactor-break-up-mutations branch December 2, 2024 21:21
texastony added a commit that referenced this pull request Dec 4, 2024
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
texastony added a commit that referenced this pull request Dec 9, 2024
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
texastony added a commit that referenced this pull request Dec 11, 2024
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
texastony added a commit that referenced this pull request Dec 17, 2024
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
texastony added a commit that referenced this pull request Jan 22, 2025
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
texastony added a commit that referenced this pull request Jan 22, 2025
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
texastony added a commit that referenced this pull request Mar 14, 2025
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
josecorella added a commit that referenced this pull request Mar 31, 2025
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
josecorella added a commit that referenced this pull request Mar 31, 2025
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
josecorella added a commit that referenced this pull request Mar 31, 2025
Fixes:
- Wrong assertion for Java Example Test of In-Flight Mutation scanner
- Initialize Mutation, when using Decrypt/Encrypt, must use Decrypt/Encrypt to mutate the Beacon

Tests:
- Explicitly Test Decrypt/Encrypt with different credentials that only can use the relevant KMS Keys
- Refactor Examples to be easier to test across inputs

Other:
- Add Documentation to the Java Examples

Co-authored-by: José Corella <[email protected]>
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