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

openSUSE / agama / 8634306511
72%

Build:
DEFAULT BRANCH: master
Ran 10 Apr 2024 04:03PM UTC
Jobs 3
Files 738
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

10 Apr 2024 04:01PM UTC coverage: 74.671% (+0.002%) from 74.669%
8634306511

push

github

web-flow
Fixed setting unlimited maximum partition size (#1142)

## Problem

- https://github.com/openSUSE/agama/issues/1065
- The maximum partition size cannot be set to "unlimited", using empty
value results in the default maximum size

**Example:** Changing the default 2GB max size is not possible, it is
always restored back:

![agama_max_size_broken](https://github.com/openSUSE/agama/assets/907998/04bb3f90-dbff-4a7e-99c2-32045162d64d)

## Details

- The problem is that the "unlimited" value is represented using the
`undefined` value in the web UI.
- But `undefined` cannot be sent over D-Bus because D-Bus does not have
concept for `undefined`, `nil` or `NULL` values, Iin that case the
`MaxSize` is simply missing the sent D-Bus data.
- When the D-Bus service creates a `Volume` object it first initializes
it with the default data from the YAML product configuration file. Then
it updates the attributes using the D-Bus data. Obviously when a value
is missing in the D-Bus then it keeps the default value from the config.
And that's the problem.

## Solution

- Set the "unlimited" value when the `MaxSize` attribute is missing in
the D-Bus data.

## Questions

- The fix has a drawback, the current code allows sending only partial
data set and ensures the defaults from the config file are used for
missing values.
- This won't work any more for the maximum size as a missing value won't
be considered as a "use the default" but as "use the unlimited size".
- Can this have some bad consequences?
- The code works, but is it safe in all scenarios?

## Alternative Solution

- If this fix is not correct then we should probably introduce a new key
in the D-Bus data, something like `MaxSizeUnlimited` with `true` /
`false` values which can be transferred via D-Bus...

## Testing

- Tested manually

Now it is possible to unset  the maximum size:

![agama_max_size_fixed](https://github.com/openSUSE/agama/assets/907998/067c8108-7... (continued)

1766 of 2605 branches covered (67.79%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

18098 of 23997 relevant lines covered (75.42%)

31.1 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
3 service 8634306511.3 10 Apr 2024 04:03PM UTC 0
85.89
GitHub Action Run
3 rust 8524609707.3 02 Apr 2024 02:39PM UTC 0
41.58
GitHub Action Run
3 web 8602654670.3 08 Apr 2024 03:24PM UTC 0
74.39
GitHub Action Run
Source Files on build 8634306511
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #8634306511
  • 67081db3 on github
  • Prev Build on master (#8602654670)
  • Next Build on master (#8658907814)
  • 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