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

Pull misk-web tabs out into own misk-tabs repo #897

Open
adrw opened this Issue Apr 2, 2019 · 0 comments

Comments

Projects
1 participant
@adrw
Copy link
Member

commented Apr 2, 2019

Problem

  • When Misk consumers have Misk checked out along with their service, an attempt to load the Admin Dashboard often fails.
  • The failure is because the dashboard looks for locally built web artifacts (web/tabs/{tab-slug}/lib) in classpath:// and unless the developer has done a web build (and if they're not working on web, they won't have), the web artifacts won't be present.

Approaches

If the web tabs and Admin Dashboard Module (less the bound web actions) are pulled into a separate repo (ie. misk-tabs or misk-admin-dashboard), then anyone hacking on Misk can still access the dashboard because those web artifacts are served from the misk-tabs Jar which isn't checked out.

  1. misk-tabs without the AdminDashboardModule: the repo only has web code wrapped in a jar. It can be depended on by Misk (though as a workaround until Misk has publicly building artifacts, Skim can depend on it).
  2. misk-tabs with the AdminDashboardModule: this repo has the web code and the AdminDashboardModule and therefore depends on Misk. Since intrinsically the Misk dashboard depends on misk-tabs, this leads to an unintuitive circular dependency where the consuming service has to separately include misk and misk-tabs.
  3. Check in built web artifacts into misk repo so they're always present (not ideal, messy git commit history)
  4. Force all people hacking on misk to have correct npm/node versions installed so we can add web builds to the misk jar task (excess additional work on developers / added time to builds)
  5. Bring back building web artifacts in Docker containers (really do not want to do this, carries most of the same problems as 4 wrt added time to builds).

Recommendation

Option 1 provides the most straightforward dependency graph augmentation without any circular dependencies of misk depending on misk-tabs that depends on misk.

Action Plan

  • Create basic misk-tabs repo that has jar building infrastructure (gradle, directory structure...)
  • Move over existing tabs in misk (config, loader, web-actions)
  • Set Skim to depend on misk-tabs
  • Remove tab code from misk
  • Add documentation for why web code lives in a separate repo

Please comment feedback below!

@adrw adrw added the frontend label Apr 2, 2019

@adrw adrw self-assigned this Apr 2, 2019

@adrw adrw added this to To do in adrw via automation Apr 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.