chore: complete stem-launcher rename
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# STEM Launcher
|
||||
|
||||
`stemctl` jest hostowym wejściem do kart pracy, Git i trzech źródłowo
|
||||
budowanych kontenerów STEM. Historyczna nazwa zdalnego repo może nadal brzmieć
|
||||
`rv-launcher`; `rvctl` pozostaje ostrzegającym wrapperem zgodności.
|
||||
budowanych kontenerów STEM. Zdalne repo nosi kanoniczną nazwę
|
||||
`edu-tools/stem-launcher`; Gitea przekierowuje historyczny URL `rv-launcher`,
|
||||
a `rvctl` pozostaje cichym wrapperem zgodności.
|
||||
|
||||
Launcher nie pobiera i nie publikuje gotowych obrazów środowiska. Klonuje repo
|
||||
narzędzi zawierające `Dockerfile` i `docker-compose.yml`, a brakujący profil
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Migracja `rv-launcher` do `stem-launcher`
|
||||
|
||||
Status: M1–M3 wdrożone lokalnie; M4 (zmiana nazwy zdalnego repo) celowo
|
||||
odłożone do zakończenia okresu zgodności
|
||||
Status: M1–M4 wdrożone; M5 pozostaje okresem zgodności
|
||||
Data: 2026-07-14
|
||||
|
||||
## Dlaczego zmieniamy nazwę
|
||||
@@ -34,10 +33,10 @@ na serwerze. Odwrotna kolejność zepsułaby bootstrap, token records, remotes,
|
||||
### M1 — alias CLI (wdrożone)
|
||||
|
||||
- dodać wykonywalny `stemctl` wskazujący tę samą implementację;
|
||||
- pozostawić `rvctl` jako wrapper;
|
||||
- pozostawić `rvctl` jako cichy wrapper;
|
||||
- pomoc i nowe materiały pokazują wyłącznie `stemctl`;
|
||||
- `rvctl` drukuje jednorazowe ostrzeżenie o wycofaniu na stderr, ale zachowuje
|
||||
format stdout potrzebny skryptom.
|
||||
- `rvctl` nie dopisuje ostrzeżeń do stderr i zachowuje format stdout/stderr
|
||||
potrzebny istniejącym skryptom.
|
||||
|
||||
### M2 — konfiguracja i ścieżki (wdrożone)
|
||||
|
||||
@@ -59,19 +58,19 @@ nie usuwa starego katalogu przed zweryfikowaniem nowego.
|
||||
- kontenery otrzymują labels z nazwą kanoniczną, nie aliasem;
|
||||
- wyniki zapisują nazwę kanoniczną oraz opcjonalne `requested_alias`.
|
||||
|
||||
### M4 — repo Gitea (odłożone)
|
||||
### M4 — repo Gitea (wdrożone 2026-07-14)
|
||||
|
||||
Po wydaniu kompatybilnego launchera:
|
||||
Po wydaniu kompatybilnego launchera wykonano:
|
||||
|
||||
1. utworzyć lub zmienić nazwę na `edu-tools/stem-launcher`;
|
||||
2. zaktualizować `workspace-info`, bootstrap i token records;
|
||||
3. sprawdzić clone/fetch/push przez nowe URL;
|
||||
4. pozostawić pod `edu-tools/rv-launcher` przekierowanie albo małe repo z
|
||||
komunikatem migracyjnym, zależnie od możliwości Gitea;
|
||||
5. nie usuwać starej nazwy podczas trwającego semestru.
|
||||
1. zmianę nazwy na `edu-tools/stem-launcher` przez API Gitea;
|
||||
2. aktualizację lokalnego `origin`, bootstrapu, dokumentacji i przykładów
|
||||
token records;
|
||||
3. weryfikację clone/fetch/push przez nowy URL;
|
||||
4. weryfikację przekierowania starej nazwy przez Gitea;
|
||||
5. zachowanie wrappera `rvctl` i pozostałych aliasów na okres zgodności.
|
||||
|
||||
Zmiana repo na Gitea jest operacją administracyjną i nie jest wykonywana przez
|
||||
samą aktualizację dokumentacji.
|
||||
Operację administracyjną wykonano po SSH do VPS i przez ograniczony token API;
|
||||
sekret nie znajduje się w repo ani w konfiguracji launchera.
|
||||
|
||||
### M5 — wycofanie kompatybilności
|
||||
|
||||
|
||||
+14
-14
@@ -19,11 +19,11 @@ Workspace służy do klonów roboczych i ćwiczeń:
|
||||
Typowy układ:
|
||||
|
||||
```text
|
||||
~/dev/edu/repos/rv/rv-launcher
|
||||
~/dev/edu/repos/stem/stem-launcher
|
||||
~/dev/edu/repos/rv/rv32i-hazard3-env
|
||||
~/dev/edu/repos/rv/series/<seria>/<karta>
|
||||
~/dev/workspace/rv/meta/workspace-info
|
||||
~/dev/workspace/rv/tools/rv-launcher
|
||||
~/dev/workspace/stem/tools/stem-launcher
|
||||
~/dev/workspace/rv/tools/rv32i-hazard3-env
|
||||
~/dev/workspace/rv/series/<seria>/<karta>
|
||||
```
|
||||
@@ -46,7 +46,7 @@ Komendy launchera pracują na `series_root`, czyli na klonach roboczych.
|
||||
Repo treningowe launchera trzymaj pod:
|
||||
|
||||
```bash
|
||||
~/dev/workspace/rv/tools/rv-launcher
|
||||
~/dev/workspace/stem/tools/stem-launcher
|
||||
```
|
||||
|
||||
Podstawowy bootstrap wygląda tak:
|
||||
@@ -54,8 +54,8 @@ Podstawowy bootstrap wygląda tak:
|
||||
```bash
|
||||
mkdir -p ~/dev/workspace/rv/tools
|
||||
cd ~/dev/workspace/rv/tools
|
||||
git clone http://77.90.8.171:3001/edu-tools/rv-launcher.git
|
||||
cd rv-launcher
|
||||
git clone http://77.90.8.171:3001/edu-tools/stem-launcher.git
|
||||
cd stem-launcher
|
||||
```
|
||||
|
||||
Główne pliki CLI:
|
||||
@@ -89,7 +89,7 @@ tokenem do zdalnego endpointu. Jeśli launcher zobaczy URL w formacie
|
||||
Przykład:
|
||||
|
||||
```bash
|
||||
git remote add r1 http://u1:TOKEN@77.90.8.171:3001/edu-tools/rv-launcher.git
|
||||
git remote add r1 http://u1:TOKEN@77.90.8.171:3001/edu-tools/stem-launcher.git
|
||||
git fetch r1 main
|
||||
git switch --track -c main r1/main
|
||||
```
|
||||
@@ -120,7 +120,7 @@ Minimalny format pliku:
|
||||
},
|
||||
"user": "u1",
|
||||
"org": "edu-tools",
|
||||
"repo": "rv-launcher"
|
||||
"repo": "stem-launcher"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -757,7 +757,7 @@ Typowy wynik:
|
||||
remotes
|
||||
item remote kind server proto host org repo user token result url
|
||||
---- ------ ----------- ------ ----- ------------------ --------- ----------- ---- ------------ -------------- --------------------------------------
|
||||
1 r1 auth gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 e59cc...13be found http://77.90.8.171:3001/edu-tools/...
|
||||
1 r1 auth gitea http 77.90.8.171:3001 edu-tools stem-launcher u1 e59cc...13be found http://77.90.8.171:3001/edu-tools/...
|
||||
```
|
||||
|
||||
Przykład:
|
||||
@@ -784,7 +784,7 @@ Typowy wynik:
|
||||
tokens
|
||||
item server proto host org repo user remote token_ref token valid scope org repo
|
||||
---- ------ ----- ------------------ --------- ----------- ---- ------ --------- ------------ ------------------- aAimnopru oawrc- oawr--
|
||||
1 gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 r1 r1 * e59cc...13be forever wwwwwwwww +++++ ++++
|
||||
1 gitea http 77.90.8.171:3001 edu-tools stem-launcher u1 r1 r1 * e59cc...13be forever wwwwwwwww +++++ ++++
|
||||
```
|
||||
|
||||
`token_ref` jest komórką stałej szerokości: nazwa tokena jest po lewej, a marker
|
||||
@@ -827,8 +827,8 @@ Typowy wynik:
|
||||
tokens
|
||||
item source kind server proto host org repo user remote token valid scope org repo
|
||||
---- ------ ----- ------ ----- ------------------ --------- ----------- ---- ------ ------------ ------------------- aAimnopru oawrc- oawr--
|
||||
1 store auth gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 r1 e59cc...13be forever --------- +++++ ++++
|
||||
2 remote auth gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 r1 e59cc...13be
|
||||
1 store auth gitea http 77.90.8.171:3001 edu-tools stem-launcher u1 r1 e59cc...13be forever --------- +++++ ++++
|
||||
2 remote auth gitea http 77.90.8.171:3001 edu-tools stem-launcher u1 r1 e59cc...13be
|
||||
```
|
||||
|
||||
Przykłady:
|
||||
@@ -866,7 +866,7 @@ Przykłady:
|
||||
|
||||
```bash
|
||||
./rvctl tokens add r1
|
||||
./rvctl tokens add r1 --user u1 --org edu-tools --repo rv-launcher
|
||||
./rvctl tokens add r1 --user u1 --org edu-tools --repo stem-launcher
|
||||
```
|
||||
|
||||
## `tokens sync remote REMOTE_ID`
|
||||
@@ -885,7 +885,7 @@ Przykład:
|
||||
|
||||
```bash
|
||||
./rvctl tokens sync remote r1
|
||||
./rvctl tokens sync remote r1 --repo ~/dev/workspace/rv/tools/rv-launcher
|
||||
./rvctl tokens sync remote r1 --repo ~/dev/workspace/stem/tools/stem-launcher
|
||||
```
|
||||
|
||||
## `tokens sync store REMOTE_ID`
|
||||
@@ -996,7 +996,7 @@ token_path<TAB>...
|
||||
tokens
|
||||
item server proto host org repo user remote token_ref token valid scope org repo
|
||||
---- ------ ----- ------------------ --------- ----------- ---- ------ --------- ------------ ------------------- aAimnopru oawrc- oawr--
|
||||
1 gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 r1 r1 * e59cc...13be forever -----w--- +++++ ++++
|
||||
1 gitea http 77.90.8.171:3001 edu-tools stem-launcher u1 r1 r1 * e59cc...13be forever -----w--- +++++ ++++
|
||||
|
||||
status
|
||||
item<TAB>value
|
||||
|
||||
+7
-7
@@ -9,7 +9,7 @@ Rekord w `tokens.json` zawiera token, endpoint serwera, login oraz docelowe
|
||||
`org/repo`. Git remote służy tylko do operacji Git (`fetch`, `push`) albo do
|
||||
pierwszego wczytania tokena do store.
|
||||
|
||||
Bez `--repo` komendy tokenów działają na repo `rv-launcher`. Dla kart pracy albo
|
||||
Bez `--repo` komendy tokenów działają na repo `stem-launcher`. Dla kart pracy albo
|
||||
innych repo podaj `--repo PATH`.
|
||||
|
||||
## Szybki przepływ
|
||||
@@ -17,7 +17,7 @@ innych repo podaj `--repo PATH`.
|
||||
Startujemy od git remota z tokenem w URL-u:
|
||||
|
||||
```bash
|
||||
git remote add r1 http://u1:TOKEN@77.90.8.171:3001/edu-tools/rv-launcher.git
|
||||
git remote add r1 http://u1:TOKEN@77.90.8.171:3001/edu-tools/stem-launcher.git
|
||||
```
|
||||
|
||||
Sprawdzamy, co jest zapisane w remote i store:
|
||||
@@ -133,7 +133,7 @@ Jeśli remote `r1` nie istnieje, `rvctl` buduje URL z pól `server.endpoint`,
|
||||
`org` i `repo` w `tokens.json`, na przykład:
|
||||
|
||||
```text
|
||||
http://77.90.8.171:3001/edu-tools/rv-launcher.git
|
||||
http://77.90.8.171:3001/edu-tools/stem-launcher.git
|
||||
```
|
||||
|
||||
Jeżeli w repo istnieje tylko `origin` wskazujący ten sam URL, `sync store r1`
|
||||
@@ -142,7 +142,7 @@ automatycznie przemianuje `origin` na `r1`, a potem wpisze credentials.
|
||||
Opcjonalnie można podać URL ręcznie:
|
||||
|
||||
```bash
|
||||
./rvctl tokens sync store r1 --url http://77.90.8.171:3001/edu-tools/rv-launcher.git
|
||||
./rvctl tokens sync store r1 --url http://77.90.8.171:3001/edu-tools/stem-launcher.git
|
||||
```
|
||||
|
||||
Jeśli remote ma już inne credentials, użyj:
|
||||
@@ -265,7 +265,7 @@ domyślnie pochodzi z `workspace.json`.
|
||||
|
||||
```bash
|
||||
./rvctl tokens add r1
|
||||
./rvctl tokens add r1 --server http://77.90.8.171:3001 --user u1 --org edu-tools --repo rv-launcher
|
||||
./rvctl tokens add r1 --server http://77.90.8.171:3001 --user u1 --org edu-tools --repo stem-launcher
|
||||
```
|
||||
|
||||
Najczęściej pusty szkielet ma sens wtedy, gdy chcesz ręcznie wpisać token w
|
||||
@@ -279,7 +279,7 @@ Pokazuje kontekst, tabelę `tokens` i podsumowanie statusów endpointów.
|
||||
|
||||
```bash
|
||||
./rvctl tokens stats
|
||||
./rvctl tokens stats --repo ~/dev/workspace/rv/tools/rv-launcher
|
||||
./rvctl tokens stats --repo ~/dev/workspace/stem/tools/stem-launcher
|
||||
```
|
||||
|
||||
## Uprawnienia
|
||||
@@ -384,7 +384,7 @@ Minimalny przykład:
|
||||
},
|
||||
"user": "u1",
|
||||
"org": "edu-tools",
|
||||
"repo": "rv-launcher"
|
||||
"repo": "stem-launcher"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://edu-tools.local/rv-launcher/tokens.schema.json",
|
||||
"title": "RV launcher tokens",
|
||||
"$id": "https://edu-tools.local/stem-launcher/tokens.schema.json",
|
||||
"title": "STEM launcher tokens",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["version", "tokens"],
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ Typowy układ:
|
||||
├── meta
|
||||
│ └── workspace-info
|
||||
├── tools
|
||||
│ └── rv-launcher
|
||||
│ └── stem-launcher
|
||||
├── tokens
|
||||
│ └── tokens.json
|
||||
└── series
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
if [[ "${STEM_RVCTL_SILENCE_DEPRECATION:-0}" != "1" ]]; then
|
||||
printf '%s\n' 'warning: rvctl is deprecated; use stemctl (compatibility mode remains enabled).' >&2
|
||||
fi
|
||||
export STEM_CLI_NAME=rvctl
|
||||
exec python3 "$SCRIPT_DIR/rvctl.py" "$@"
|
||||
|
||||
@@ -18,6 +18,18 @@ import rvctl # noqa: E402
|
||||
|
||||
|
||||
class StemctlContractTests(unittest.TestCase):
|
||||
def test_rvctl_compatibility_wrapper_is_silent(self) -> None:
|
||||
wrapper = Path(__file__).resolve().parents[1] / "rvctl"
|
||||
completed = subprocess.run(
|
||||
[str(wrapper), "--help"],
|
||||
text=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
)
|
||||
self.assertEqual(completed.returncode, 0, completed.stderr)
|
||||
self.assertNotIn("deprecated", completed.stderr.lower())
|
||||
self.assertNotIn("warning", completed.stderr.lower())
|
||||
|
||||
def test_new_command_help_never_crashes(self) -> None:
|
||||
script = Path(__file__).resolve().parents[1] / "rvctl.py"
|
||||
commands = ["env", "build", "test", "run", "debug", "deploy", "shell", "start", "status", "attach", "stop", "rm", "probe", "mcp"]
|
||||
|
||||
Reference in New Issue
Block a user