Skip to content

Remove legacy Artemis service snapshot serving.#1237

Open
floitsch wants to merge 6 commits into
floitsch/build-artemis-servicefrom
floitsch/build-artemis-service.s-new.020
Open

Remove legacy Artemis service snapshot serving.#1237
floitsch wants to merge 6 commits into
floitsch/build-artemis-servicefrom
floitsch/build-artemis-service.s-new.020

Conversation

@floitsch
Copy link
Copy Markdown
Member

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

  • Dead helperscache-key-service-image and its import are gone;
    sdk-downloader.toit no longer carries a stale import .utils.
  • Legacy toolstools/service_image_uploader/ and the
    downloader.toit / client.toit / utils.toit files under
    tools/service_image_downloader/ are deleted. The CMake target that
    produced the downloader binary goes too. sdk-downloader.toit (the
    Toit-SDK fetcher used by make download-sdk) stays.
  • HTTP test serverupload-service-image,
    download-service-image, and list-sdk-service-versions handlers,
    their dispatch branches, and the sdk-service-versions /
    image-binaries state are removed.
  • Protocol constants — the three deprecated
    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 its
    special-case for the binary download response shape.
  • Test infrastructureinstall-service-images and its two
    implementations come out of tests/artemis-server.toit; the
    admin / 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 CLIs
in the field that still talk to the production Supabase server keep
working. The admins table, is_artemis_admin(), and the
snapshot-storage buckets are slated for removal in the follow-up that
strips the global-admin concept.

floitsch added 6 commits May 17, 2026 19:19
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant