Repository navigation
URGENT: fix console boot, keep extension.js self-contained - #444
Merged
Merged
Conversation
The console's extensions generator copies addon/extension.js verbatim into the host as @fleetbase/console/extensions/<mount>. #442 gave it relative imports (./utils/canvas-shell, ./utils/fleet-ops-pages), which resolve to modules that do not exist in the host, so loading the extensions index threw and the extension-manager service failed to instantiate: the console hung on startup. The backdrop name/routes and the dock page tree now live in extension.js, and the engine's utils re-export them. An ESLint rule forbids relative and engine imports in extension.js so this cannot regress.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/map-canvas #444 +/- ##
======================================================
Coverage 100.00% 100.00%
Complexity 20500 20500
======================================================
Files 787 787
Lines 65151 65151
======================================================
Hits 65151 65151
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes a console boot hang introduced by #442: the console stays on "Starting up…" with
Failed to create an instance of 'service:universe/extension-manager'.Cause. The console's
fleetbase-extensions-generatorcopiesaddon/extension.jsverbatim into the host as@fleetbase/console/extensions/<mount>. #442 added relative imports (./utils/canvas-shell,./utils/fleet-ops-pages). In the host these resolve to@fleetbase/console/extensions/utils/*, which doesn't exist. Loading the extension module throws, which breaksextensions/index, which the extension manager imports. An engine package path wouldn't work either, because engines are lazy and aren't loaded when the host boots.Fix.
LIVE_MAP_BACKDROP,LIVE_MAP_BACKDROP_ROUTESand the dock page tree (FLEET_OPS_PAGE_SECTIONS,buildFleetOpsPagePanels,registerFleetOpsPages, and so on) are now defined inextension.jsitself.addon/utils/canvas-shell.jsandaddon/utils/fleet-ops-pages.jsre-export them, so the engine code and tests are unchanged and there is still one source of truth.extension.jsagain imports only@fleetbase/ember-core/contracts.Regression guard. An
.eslintrc.jsoverride putsno-restricted-importsonaddon/extension.js, blocking./*,../*and@fleetbase/fleetops-engine/*. Ember CI runs lint, so this fails CI. I checked that the rule flags an injectedimport … from './utils/canvas-shell'.