Remove legacy Artemis service snapshot serving.#1237
Open
floitsch wants to merge 6 commits into
Open
Conversation
The cache-key-service-image helper was leftover from when the Artemis CLI fetched service images from the Artemis server. It hasn't been used since the local-build switch and the only remaining import was dead. The .utils import in sdk-downloader.toit was likewise unused.
The Artemis service is now built locally from source, so the tools that uploaded service snapshots to the Artemis server and downloaded them back are no longer needed. Removes: - tools/service_image_uploader/ (already empty; not tracked here). - tools/service_image_downloader/downloader.toit (Supabase-based service snapshot downloader). - tools/service_image_downloader/client.toit (UploadClient abstraction). - tools/service_image_downloader/utils.toit (only used by the above). Keeps tools/service_image_downloader/sdk-downloader.toit, which is a Toit-SDK and envelope fetcher used by 'make download-sdk'. The CMakeLists no longer builds a downloader binary; sdk-downloader is invoked via 'toit run'.
These handlers backed the legacy Artemis-server flow where the CLI uploaded service snapshots to and downloaded them from the Artemis server. With local Artemis builds the flow is gone, and the test server's matching code is unused. Removes the sdk-service-versions and image-binaries fields, the list-sdk-service-versions / upload-service-image / download-service-image methods, and their dispatch branches. The deprecated command constants themselves are still defined; they are removed in a follow-up commit.
LIST-SDK-SERVICE-VERSIONS_, DOWNLOAD-SERVICE-IMAGE_, and UPLOAD-SERVICE-IMAGE_ were already marked deprecated and have now lost their last users (the CLI sender side and the HTTP test server handlers were removed in earlier commits). The CLI's http/base.toit no longer needs the special-case for the binary download response shape either.
Both implementations populated the now-deleted service-image storage (HTTP test server's sdk-service-versions/image-binaries fields and the Supabase project's service_images table). No external callers.
Removes the admin section that exercised the sdks, artemis_services and service_images tables, plus the service-images / service-snapshots / cli-snapshots storage buckets. With the legacy snapshot flow gone the new CLI never touches any of these, and they are slated for removal from the Supabase schema in the follow-up phase that drops is_artemis_admin and the global-admin concept.
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.
With the Artemis service now built locally from source, the old flow
where the CLI uploaded a pre-built service snapshot to the Artemis
server and devices downloaded it back is dead. This PR removes its
remnants from the CLI, the HTTP test server, and the test infrastructure.
Changes
cache-key-service-imageand its import are gone;sdk-downloader.toitno longer carries a staleimport .utils.tools/service_image_uploader/and thedownloader.toit/client.toit/utils.toitfiles undertools/service_image_downloader/are deleted. The CMake target thatproduced the
downloaderbinary goes too.sdk-downloader.toit(theToit-SDK fetcher used by
make download-sdk) stays.upload-service-image,download-service-image, andlist-sdk-service-versionshandlers,their dispatch branches, and the
sdk-service-versions/image-binariesstate are removed.COMMAND-*-SERVICE-IMAGE_/COMMAND-LIST-SDK-SERVICE-VERSIONS_constants no longer have any sender or receiver, so they come out of
src/shared/constants.toit. The CLI's HTTP base also drops itsspecial-case for the binary download response shape.
install-service-imagesand its twoimplementations come out of
tests/artemis-server.toit; theadmin / snapshot-bucket section of
tests/supabase-policies-test.toit(~200 lines) goes too — it was exercising tables and buckets that no
longer matter to the new CLI.
Compatibility
The Supabase production schema is untouched: migrations and the
squashed schema in
supabase_artemis/are left as-is, so existing CLIsin the field that still talk to the production Supabase server keep
working. The
adminstable,is_artemis_admin(), and thesnapshot-storage buckets are slated for removal in the follow-up that
strips the global-admin concept.