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

[Automation] CI checks for cross-module dependencies #239

Closed
5 tasks
Olshansk opened this issue Sep 22, 2022 · 2 comments
Closed
5 tasks

[Automation] CI checks for cross-module dependencies #239

Olshansk opened this issue Sep 22, 2022 · 2 comments
Labels
code health Nice to have code improvement tooling tooling to support development, testing et al

Comments

@Olshansk
Copy link
Member

Objective

Use custom CI linter checks to avoid cross-module dependencies.

Origin Document

Even though the Pocket Network V1 implementation is a monolith that will shares artifacts, helpers, interfaces, structures, etc, across different modules, we want to avoid explicit dependency of one module on another and facilitate that communication via the application-specific bus.

In #235, the following conversation came up:

Screen Shot 2022-09-22 at 3 48 57 PM

While we don't want to enable these linters right now, we want to enable them in the future.

Some examples include:

grep --exclude-dir='./persistence' -r "github.com/pokt-network/pocket/persistence"
grep --exclude-dir='./consensus' -r "github.com/pokt-network/pocket/consensus"
...

Goals

  • Enable automated ways of raising warnings on or blocking explicit cross-module (i.e. not via the application-specific bus)

Deliverable

  • Infrastructure that enables general-purpose linters based on the output of a bash command
  • Documentation on how to add additional lintesr to the above

Non-goals / Non-deliverables

  • Enable these linters in mainline today

General issue deliverables

  • Update the appropriate CHANGELOG
  • Update any relevant READMEs (local and/or global)
  • Update any relevant global documentation & references

Creator: @olshansky
Co-Owners: @okdas

@Olshansk Olshansk added code health Nice to have code improvement priority:low tooling tooling to support development, testing et al labels Sep 22, 2022
@Olshansk Olshansk moved this to Backlog in V1 Dashboard Sep 28, 2022
@Olshansk
Copy link
Member Author

Olshansk commented Jan 26, 2023

Adding a few more to the list as our custom linter checks:

  • Using any instead of interface{} -> needs to be changes
  • Check if #XXX issue closed when trying to merge in a PR -> needs to be deleted
  • Avoid using proto directly outside the codec package in favour of coded.GetCodec()
  • Block merge if IN_THIS_COMMIT is present in the code

@Olshansk
Copy link
Member Author

Closing this out as unplanned for the foreseeable future. Ticket can be reopened if/when needed.

@github-project-automation github-project-automation bot moved this from Backlog to Done in V1 Dashboard Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Nice to have code improvement tooling tooling to support development, testing et al
Projects
Status: Done
Development

No branches or pull requests

2 participants