forked from mtusi2026/mtusi2026lab5
Record source revisions and stopped containers in pipeline evidence
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
## 1. Квалификация уровня 3
|
## 1. Квалификация уровня 3
|
||||||
|
|
||||||
- [ ] 1.1 Добавить SHA и фактическое состояние контейнеров в результаты suite.
|
- [x] 1.1 Добавить SHA и фактическое состояние контейнеров в результаты suite.
|
||||||
- [ ] 1.2 Выполнить make check/validate/lint/student-test и собрать стенд.
|
- [ ] 1.2 Выполнить make check/validate/lint/student-test и собрать стенд.
|
||||||
- [ ] 1.3 Выполнить smoke, persistence, failover и restore с реальными выводами.
|
- [ ] 1.3 Выполнить smoke, persistence, failover и restore с реальными выводами.
|
||||||
- [ ] 1.4 Выполнить level3 suite и проверки унаследованного минимума lab4.
|
- [ ] 1.4 Выполнить level3 suite и проверки унаследованного минимума lab4.
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ def stop(service):
|
|||||||
check=True,
|
check=True,
|
||||||
).stdout.strip()
|
).stdout.strip()
|
||||||
say(f"$ docker compose stop -t 10 {service} -> {seconds:.1f} s, exit code {code}")
|
say(f"$ docker compose stop -t 10 {service} -> {seconds:.1f} s, exit code {code}")
|
||||||
|
say(
|
||||||
|
compose(
|
||||||
|
"ps", "-a", "--format", "{{.Name}} {{.ID}} {{.State}} {{.Status}}", service
|
||||||
|
).rstrip()
|
||||||
|
)
|
||||||
check(seconds <= 10 and code == "0", f"{service} did not stop cleanly on SIGTERM")
|
check(seconds <= 10 and code == "0", f"{service} did not stop cleanly on SIGTERM")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -424,7 +424,12 @@ class Suite:
|
|||||||
steps.append({"at": now(), "step": step, **extra})
|
steps.append({"at": now(), "step": step, **extra})
|
||||||
|
|
||||||
self.stack.stop(self.args.worker)
|
self.stack.stop(self.args.worker)
|
||||||
mark("worker stopped")
|
mark(
|
||||||
|
"worker stopped",
|
||||||
|
containers=self.stack.dc(
|
||||||
|
"ps", "-a", "--format", "{{.Name}} {{.ID}} {{.State}} {{.Status}}", self.args.worker
|
||||||
|
).splitlines(),
|
||||||
|
)
|
||||||
att = self.api.fixture()
|
att = self.api.fixture()
|
||||||
mark("upload 202 queued", attachment_id=att["id"])
|
mark("upload 202 queued", attachment_id=att["id"])
|
||||||
self.api.content(att["id"], expected=409)
|
self.api.content(att["id"], expected=409)
|
||||||
@@ -904,6 +909,7 @@ class Suite:
|
|||||||
report = {
|
report = {
|
||||||
"suite": "lab5-pipeline-idempotency",
|
"suite": "lab5-pipeline-idempotency",
|
||||||
"started_at": now(),
|
"started_at": now(),
|
||||||
|
"source_sha": run(["git", "rev-parse", "HEAD"]).strip(),
|
||||||
"config": self.config(),
|
"config": self.config(),
|
||||||
}
|
}
|
||||||
if self.args.preflight:
|
if self.args.preflight:
|
||||||
|
|||||||
Reference in New Issue
Block a user