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

Tech Debt PR Including Release Version Bump #42

Merged
merged 12 commits into from Jan 3, 2023
Merged

Tech Debt PR Including Release Version Bump #42

merged 12 commits into from Jan 3, 2023

Conversation

tzaffi
Copy link
Contributor

@tzaffi tzaffi commented Dec 22, 2022

Removing:

Deprecated Mixins Originally Inherited from py-algorand-sdk

image

With cost no longer coming back, and the soon-coming need to support simulate, remove the deprecated dry run mixins. It's not worth continuing to support now that we get this error:

image

Orphaned methods and functions removed in graviton/dryrun.py:

  • _fail()
  • assert_pass()
  • assert_reject()
  • assert_status()
  • assert_global_state_contains()
  • assert_local_state_contains()
  • DryRunHelper.guess()
  • DryRunHelper.format_stack()
  • DryRunHelper.find_delta_value()
  • DryRunHelper.save_dryrun_request()

Invariant.inputs_and_invariants()

This overly-complex method was guilty of causing a test to provide false confidence with never being run for 8 months. It already was slated for removal with a TODO:. So this is a good opportunity to remove.

Refactoring Dry Run Execution Methods

Removing parameters

  • abi_argument_types
  • abi_return_type

Adding parameters

  • abi_method_signature: str
  • omit_method_selector: bool
  • validation: bool

TODO

#40 was NOT tackled here. However, the refactoring work here paves the way to address it and #44 is a child PR which addresses.

@@ -234,62 +234,6 @@ def get_return(f, g):

raise ValueError("Unhanlded PredicateKind {kind} for predicate {predicate}")

@classmethod
def inputs_and_invariants(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removing this confusing/error-prone method

* small typing fix + EncodingType

* type ignores
@tzaffi tzaffi changed the title Tech Debt PR Including Minor Version Bump Tech Debt PR Including Major Version Bump Dec 27, 2022
@tzaffi tzaffi changed the title Tech Debt PR Including Major Version Bump Tech Debt PR Including Release Version Bump Dec 27, 2022
@tzaffi tzaffi marked this pull request as ready for review December 27, 2022 16:53
roundtrip_teal,
args,
abi_method_signature=method_sig,
omit_method_selector=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

@tzaffi Optional - Unless I missed it, I think some combinations of omit_method_selector + validation are untested. Ideally, all paths are exercised.

  • I attached a git patch suggesting a minor change to to parameterize validation:
    diff.txt. Accounting for omit_method_selector requires more thought or possibly designing a different test.
  • If you prefer as is, then feel welcomed to resolve.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will not act on this suggestion but keep it open and link to it in #44. This is because sequencing the diff in this case does feel more complicated given all the upcoming changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a TODO section in #44 :
image

Copy link
Contributor

Choose a reason for hiding this comment

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

@tzaffi Works for me to address in #44 - resolving.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unresolving for easier spotting. Also, this is slated to be addressed in #45

@tzaffi tzaffi mentioned this pull request Jan 3, 2023
1 task
Copy link
Contributor

@michaeldiamant michaeldiamant left a comment

Choose a reason for hiding this comment

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

@tzaffi Looks ready + version bump looks correct.

@tzaffi tzaffi merged commit 5c1eeda into main Jan 3, 2023
@tzaffi tzaffi deleted the api-tightening branch January 3, 2023 22:21
@tzaffi tzaffi mentioned this pull request Jan 3, 2023
1 task
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.

None yet

2 participants