• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agama-project / agama / 18650407963
66%
master: 74%

Build:
Build:
LAST BUILD BRANCH: revam-iscsi-ui-draft
DEFAULT BRANCH: master
Ran 20 Oct 2025 11:28AM UTC
Jobs 3
Files 1166
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Oct 2025 11:21AM UTC coverage: 64.449% (+0.5%) from 63.944%
18650407963

push

github

web-flow
feat: add a new questions API (#2813)

This PR introduces a new questions API. It is build on a single resource
`/questions` which lists all the registered questions.

```json
[
  {
    "id": 1,
    "text": "LUKS password",
    "class": "storage.luks",
    "field": {
      "type": "string"
    },
    "actions": [
      {
        "id": "accept",
        "label": "Accept"
      },
      {
        "id": "skip",
        "label": "Skip"
      }
    ],
    "defaultAction": "skip"
  }
]
```

## The new model

According to this new API, each question is composed by:

* `text`: the text for the question.
* `class`: it works as a hint for the UI or to match pre-defined answers
(e.g., "autoyast.unsupported").
* `field`: optionally, a question might define an additional field
(e.g., a password, a selector, etc.).
* `actions`: list of available actions (e.g., "next", "skip", etc.).
* `defaultAction`: default action.

## Registering a question

A new question is registered through a `POST` request to the
`/questions` API. The payload
describes the question.

```json
{
  "text": "LUKS password",
  "class": "storage.luks",
  "field": {
    "type": "string"
  },
  "actions": [
    {
      "id": "accept",
      "label": "Accept"
    },
    {
      "id": "skip",
      "label": "Skip"
    }
  ],
  "defaultAction": "skip"
}
```

## Answering a question

A question is answered by sending a `PATCH` on the connection with the
following payload.

```json
{
    "id": 1,
    "action": "accept",
    "value": "my-password"
}
```

## Automatic answers

As in the previous API, it is possible to set up the questions service
to automatically response some questions.

```json
{
  "update": {
    "questions": {
      "policy": "auto",
      "answers": [
        {
          "class": "storage.luks",
          "action": "ok",
          "value": "secret"
        }
      ]
    }
  }
}
```

## Field types

The field types allow to grow this API to cover more use cases in the
future, like sof... (continued)

2695 of 4701 branches covered (57.33%)

Branch coverage included in aggregate %.

150 of 248 new or added lines in 41 files covered. (60.48%)

427 existing lines in 28 files now uncovered.

25234 of 38634 relevant lines covered (65.32%)

150.92 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% rust/agama-manager/src/start.rs
1
95.65
rust/agama-utils/src/question/service.rs
1
0.0
0.0% service/lib/agama/product_reader.rb
1
24.0
0.0% web/src/api/questions.ts
1
80.0
0.0% web/src/components/questions/RegistrationCertificateQuestion.tsx
1
91.67
0.0% web/src/components/questions/UnsupportedAutoYaST.tsx
1
71.43
0.0% web/src/queries/questions.ts
2
96.08
rust/agama-utils/src/api/question.rs
2
47.37
0.0% service/lib/agama/autoyast/profile_reporter.rb
2
72.73
0.0% service/lib/agama/software/callbacks/progress.rb
4
25.0
6.82% rust/agama-autoinstall/src/questions.rs
4
0.0
0.0% rust/agama-server/src/web/ws.rs
22
0.0
0.0% rust/agama-cli/src/questions.rs
25
9.38
-34.63% rust/agama-lib/src/questions/http_client.rs
30
0.0
0.0% rust/agama-server/src/server/web.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
80.0
0.0% web/src/components/questions/RegistrationCertificateQuestion.tsx
1
0.0
0.0% rust/agama-utils/src/progress/start.rs
1
0.0
0.0% rust/agama-lib/src/store.rs
1
91.67
0.0% web/src/components/questions/UnsupportedAutoYaST.tsx
1
9.38
-34.63% rust/agama-lib/src/questions/http_client.rs
2
71.43
0.0% rust/agama-utils/src/issue/start.rs
3
0.0
0.0% rust/agama-manager/src/message.rs
3
86.96
0.0% web/src/components/questions/Questions.tsx
4
0.0
0.0% rust/agama-l10n/src/start.rs
4
0.0
0.0% rust/agama-server/tests/server_service.rs
4
0.0
0.0% rust/agama-manager/src/start.rs
4
90.7
-1.41% rust/agama-l10n/src/service.rs
5
0.0
0.0% rust/agama-lib/src/lib.rs
5
40.78
-4.85% rust/agama-lib/src/http/base_http_client.rs
6
0.0
0.0% rust/agama-server/src/web.rs
8
82.61
0.39% rust/agama-server/src/web/service.rs
11
0.0
0.0% rust/agama-server/src/server/web.rs
12
0.0
0.0% rust/agama-server/src/web/ws.rs
12
0.0
0.0% rust/agama-lib/src/install_settings.rs
12
24.0
0.0% web/src/api/questions.ts
21
0.0
0.0% rust/agama-manager/src/service.rs
23
19.35
-0.65% rust/agama-l10n/src/model/keyboard.rs
27
12.96
0.0% rust/agama-l10n/src/model/locale.rs
29
0.0
0.0% rust/agama-lib/src/monitor.rs
35
0.0
0.0% rust/agama-utils/src/issue/monitor.rs
43
8.54
8.54% rust/agama-l10n/src/model.rs
70
0.0
0.0% rust/agama-server/src/storage/web.rs
79
0.0
0.0% rust/agama-server/src/agama-web-server.rs
Subprojects
ID Flag name Job ID Ran Files Coverage
1 rust 18650407963.1 20 Oct 2025 11:28AM UTC 196
21.22
GitHub Action Run
3 web 18556852372.3 16 Oct 2025 09:36AM UTC 580
68.63
GitHub Action Run
3 service 18222230338.3 03 Oct 2025 12:39PM UTC 390
88.57
GitHub Action Run
Source Files on build 18650407963
  • Tree
  • List 1166
  • Changed 52
  • Source Changed 52
  • Coverage Changed 39
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #18650407963
  • 526850c2 on github
  • Prev Build on api-v2 (#18556852372)
  • Next Build on api-v2 (#18650407956)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc