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

[#10929] Apply proxy pattern for logs and task queue #11021

Merged
merged 8 commits into from
Mar 13, 2021

Conversation

wkurniawan07
Copy link
Member

This is an extended part of #10929

We have used proxy pattern for third-party services like email and storage, but not yet on logs and task queue. With the proxy pattern we can allow mocking of the said third-party services and therefore unit-testing them in component tests.

  • Applied proxy pattern for logs (new class LogsProcessor) and task queue
    • As a proof that the proxy pattern works, there is now CompileLogsActionTest
    • With this proxy pattern we can also tighten the architecture rules for the GCP-specific classes
  • Standardized the way of how mocks are passed to action objects
    • This frees us from having to store method only used for testing in production code
  • Simplified the implementation of MockFileStorage; in-memory storage of objects suffice and we don't really need actual I/O process

@wkurniawan07 wkurniawan07 added the s.ToReview The PR is waiting for review(s) label Mar 7, 2021
Copy link
Contributor

@t-cheepeng t-cheepeng left a comment

Choose a reason for hiding this comment

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

LGTM 💯

Copy link
Contributor

@rrtheonlyone rrtheonlyone left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@rrtheonlyone rrtheonlyone added s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging and removed s.ToReview The PR is waiting for review(s) labels Mar 13, 2021
@rrtheonlyone rrtheonlyone added this to the V7.12.0 milestone Mar 13, 2021
@rrtheonlyone rrtheonlyone merged commit a1993ac into TEAMMATES:master Mar 13, 2021
@madanalogy madanalogy added the c.Task Other non-user-facing works, e.g. refactoring, adding tests label Mar 14, 2021
@wkurniawan07 wkurniawan07 deleted the proxy-pattern branch March 17, 2021 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c.Task Other non-user-facing works, e.g. refactoring, adding tests s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants