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

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

Build:
Build:
LAST BUILD BRANCH: dasd-http-api-v2
DEFAULT BRANCH: master
Ran 20 Oct 2025 11:25AM UTC
Jobs 3
Files 1174
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: 63.987% (+0.04%) from 63.944%
18650408007

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 4694 branches covered (57.41%)

Branch coverage included in aggregate %.

85 of 144 new or added lines in 37 files covered. (59.03%)

193 existing lines in 21 files now uncovered.

25198 of 38898 relevant lines covered (64.78%)

197.66 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% rust/agama-manager/src/service.rs
1
0.0
0.0% rust/agama-manager/src/start.rs
1
0.0
0.0% service/lib/agama/product_reader.rb
1
80.0
0.0% web/src/components/questions/RegistrationCertificateQuestion.tsx
1
91.67
0.0% web/src/components/questions/UnsupportedAutoYaST.tsx
1
67.57
-3.86% web/src/queries/questions.ts
2
18.18
0.0% rust/agama-autoinstall/src/questions.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
2
66.67
42.67% web/src/api/questions.ts
11
44.0
0.0% rust/agama-lib/src/questions/http_client.rs
15
0.0
0.0% rust/agama-server/src/server/web.rs
19
0.0
0.0% rust/agama-cli/src/questions.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
66.67
39.39% web/web/src/api/questions.ts
1
80.0
0.0% web/src/components/questions/RegistrationCertificateQuestion.tsx
1
50.0
0.0% rust/agama-l10n/src/message.rs
1
91.67
0.0% web/src/components/questions/UnsupportedAutoYaST.tsx
2
66.67
0.0% rust/agama-lib/src/questions.rs
3
92.68
0.38% web/web/src/components/questions/Questions.tsx
3
0.0
0.0% rust/agama-l10n/src/start.rs
3
0.0
0.0% rust/agama-manager/src/message.rs
3
0.0
0.0% rust/agama-server/src/web/docs/config.rs
3
92.11
0.0% rust/agama-l10n/src/service.rs
5
0.0
0.0% rust/agama-server/src/error.rs
7
18.18
0.0% rust/agama-autoinstall/src/questions.rs
7
0.0
0.0% rust/xtask/src/main.rs
7
0.0
0.0% rust/agama-manager/src/start.rs
10
0.0
0.0% rust/agama-server/src/web/docs.rs
11
0.0
0.0% rust/agama-cli/src/questions.rs
12
0.0
0.0% rust/agama-lib/src/install_settings.rs
14
0.0
0.0% rust/agama-manager/src/service.rs
24
0.0
0.0% rust/agama-server/src/web.rs
25
0.0
0.0% rust/agama-server/src/server/web.rs
50
0.0
0.0% rust/agama-lib/src/store.rs
Subprojects
ID Flag name Job ID Ran Files Coverage
3 web 18650408007.3 20 Oct 2025 11:25AM UTC 580
68.72
GitHub Action Run
3 service 18222230338.3 03 Oct 2025 12:39PM UTC 390
88.57
GitHub Action Run
1 rust 18378880435.1 09 Oct 2025 02:05PM UTC 204
20.2
GitHub Action Run
Source Files on build 18650408007
  • Tree
  • List 1174
  • Changed 23
  • Source Changed 18
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #18650408007
  • 526850c2 on github
  • Prev Build on api-v2 (#18556852372)
  • Next Build on api-v2 (#18650407963)
  • 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