[core] Init DashboardHeadModules with a Config. #49479
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today we create
DashboardHeadModule
s with aDashboardHead
. In preparation to support Actor-based Heads, we need to use something serializable to create Heads.Introducing a DashboardHeadModuleConfig class to keep all strings and ints a Head needs to start up. Lazily creates these non-serializable objects in the DashboardHeadModule base class:
gcs_client
,gcs_aio_client
aiogrpc_gcs_channel
http_session
Note that
gcs_client
,gcs_aio_client
will no longer be needed as well after we always doray.init()
in dashboard start up.One exception is made for
metrics
, which is not serializable. Now we pass the metrics from DashboardHead to the Config and it's used only in MetricsHead. We can:DashboardMetricsAddress
to be multiple values, and let each Head to export their own ports, ORcore_worker
butdashboard.