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 policy validators to inherit an interface for future policies #277

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

Will-Lo
Copy link
Collaborator

@Will-Lo Will-Lo commented Jan 10, 2025

Summary

Issue] Briefly discuss the summary of the changes made in this
pull request in 2-3 lines.

As Openhouse begins to support more policies, it becomes beneficial to have all the validators follow a common interface, defined by PolicySpecValidator. It takes in the entire request sent for the Create/Update table request since some policies may be dependent on other properties of the table.

This PR performs a small refactor to have these classes share the same base class, and future policy definitions to follow this pattern.

Changes

  • Client-facing API Changes
  • Internal API Changes
  • Bug Fixes
  • New Features
  • Performance Improvements
  • Code Style
  • Refactoring
  • Documentation
  • Tests

For all the boxes checked, please include additional details of the changes made in this pull request.

Testing Done

  • Manually Tested on local docker setup. Please include commands ran, and their output.
  • Added new tests for the changes made.
  • Updated existing tests to reflect the changes made.
  • No tests added or updated. Please explain why. If unsure, please feel free to ask for help.
  • Some other form of testing like staging or soak time in production. Please explain.

For all the boxes checked, include a detailed description of the testing done for the changes made in this pull request.

Additional Information

  • Breaking Changes
  • Deprecations
  • Large PR broken into smaller PRs, and PR plan linked in the description.

For all the boxes checked, include additional details of the changes made in this pull request.

Copy link
Collaborator

@chenselena chenselena left a comment

Choose a reason for hiding this comment

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

mostly looks good, just 2 small suggestions. thanks for the refactor William!

Copy link
Collaborator

@chenselena chenselena left a comment

Choose a reason for hiding this comment

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

lgtm!

@Will-Lo Will-Lo merged commit 020722b into linkedin:main Jan 21, 2025
1 check passed
@Will-Lo Will-Lo deleted the refactor-table-policies branch January 21, 2025 19:52
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