Rename ArtemisServerCli to AuthProvider; delete debug-only notify-created.#1238
Open
floitsch wants to merge 2 commits into
Open
Conversation
The CLI-side interface previously called "Artemis server CLI" is really an identity / auth provider abstraction. Renaming it to AuthProvider matches its responsibility and unblocks the upcoming work where each service (broker, pod-store, fleet-store) optionally references its own named auth provider. Pure rename, no behavior change. - src/cli/artemis_servers/ -> src/cli/auth_providers/ - artemis-server.toit -> auth-provider.toit - ArtemisServerCli -> AuthProvider - ArtemisServerCliSupabase -> AuthProviderSupabase - ArtemisServerCliHttpToit -> AuthProviderHttpToit - with-server -> with-auth-provider - Artemis.artemis-server_ -> auth-provider_ - Artemis.connected-artemis-server_ -> connected-auth-provider_ - tests/artemis-server-test.toit -> tests/auth-provider-test.toit The HTTP test server (tools/http_servers/artemis-server.toit) and the test helper (tests/artemis-server.toit) keep their names; they simulate or talk to the production Artemis server, which keeps that external name.
The AuthProvider-side notify-created was documented as 'mostly for
debugging purposes' and just appended a {'type': 'created'} event row.
Nothing depends on that event, and the lone caller in fleet.toit
already inserts the same kind of state through the broker's own (and
load-bearing) notify-created.
Removes:
- the interface declaration in auth-provider.toit;
- the Supabase and HTTP impls;
- the fleet.toit caller and its 'mostly for testing purposes' comment;
- the HTTP test server dispatch branch;
- the COMMAND-NOTIFY-ARTEMIS-CREATED_ constant and its string mapping;
- the test-notify-created test helper.
The broker's own notify-created (BrokerCli.notify-created) is untouched.
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.
The CLI-side interface previously called
ArtemisServerCliis reallyan identity / auth provider abstraction. Renaming it to
AuthProvidermatches its responsibility and prepares for the upcoming phase where
each service (broker, pod-store, fleet-store) optionally references its
own named auth provider.
Rename
src/cli/artemis_servers/→src/cli/auth_providers/artemis-server.toit→auth-provider.toitArtemisServerCli→AuthProvider(+ the two impls, the helper,internal field/method on
Artemis)tests/artemis-server-test.toit→tests/auth-provider-test.toitThe HTTP test server (
tools/http_servers/artemis-server.toit) and thetest helper (
tests/artemis-server.toit) keep their names — theysimulate or talk to the production Artemis server, which keeps that
external name.
Delete
AuthProvider.notify-createdThe method was documented as "mostly for debugging purposes" and just
appended a
{"type": "created"}event row. Nothing depends on it; thebroker has its own (load-bearing)
notify-created. Removes theinterface declaration, both impls, the lone caller in
fleet.toit, theHTTP test server dispatch branch, and the
COMMAND-NOTIFY-ARTEMIS-CREATED_constant + string mapping.Compatibility
No Supabase schema or RLS changes. Old CLIs in the field that call
notify-createdagainst the Supabase server continue to hit theexisting function (it remains defined in the schema); we just stop
calling it from the new CLI.