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

unioslo / mreg / 30444077253
98%

Build:
DEFAULT BRANCH: master
Ran 29 Jul 2026 10:39AM UTC
Jobs 5
Files 101
Run time 1min
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

29 Jul 2026 10:30AM UTC coverage: 97.697% (+0.001%) from 97.696%
30444077253

push

github

web-flow
Fix stale pull request CI compatibility (#641)

## Summary

- Preserve the pre-#628 field order for `NetworkSerializer` and `NetGroupRegexPermissionSerializer`.
- Retain the explicit `network` and `range` fields required for OpenAPI generation.
- Restore `mreg.api.views.LIBRARIES_TO_REPORT` as a compatibility alias.
- Ensure mreg-cli tests the image built for the current pull request.
- Add regression tests for both serializer orders and the compatibility alias.

## Root cause

### Serializer field ordering

PR #628 explicitly declared two custom model fields so drf-spectacular could describe them:

```python
NetworkSerializer.network = serializers.CharField()
NetGroupRegexPermissionSerializer.range = serializers.CharField()
```

Combined with `fields = "__all__"`, DRF moved those fields earlier in the serialized output.

`NetworkSerializer` changed from:

```text
id, excluded_ranges, policy, communities, created_at, updated_at, network, ...
```

to:

```text
id, network, excluded_ranges, policy, communities, created_at, updated_at, ...
```

`NetGroupRegexPermissionSerializer` changed from:

```text
id, created_at, updated_at, group, range, regex, labels
```

to:

```text
id, range, created_at, updated_at, group, regex, labels
```

Although JSON object order is not semantically significant, mreg-cli’s recorded-output tests compare it, and stable serialization avoids unnecessary changes for existing consumers.

Both serializers now use explicit field tuples in their previous order while retaining the explicit custom fields required for OpenAPI generation.

### Renamed constant

PR #628 moved the reported-library constant from `mreg.api.views` to `mreg.api.serializers` and renamed it to `REPORTED_LIBRARY_VERSION_FIELDS`.

In-flight pull requests created before #628, including #616, still import `LIBRARIES_TO_REPORT` from `mreg.api.views`. The previous name is retained as an alias:

```python
LIBRARIES_TO_REPORT = REPORTED_LIBRARY_VERSION_FIELDS
```

Thi... (continued)

10 of 10 new or added lines in 3 files covered. (100.0%)

10310 of 10553 relevant lines covered (97.7%)

4.88 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python-3.12 - 30444077253.1 29 Jul 2026 10:40AM UTC 101
97.7
GitHub Action Run
2 python-3.10 - 30444077253.2 29 Jul 2026 10:40AM UTC 101
97.7
GitHub Action Run
3 python-3.13 - 30444077253.3 29 Jul 2026 10:40AM UTC 101
97.7
GitHub Action Run
4 python-3.11 - 30444077253.4 29 Jul 2026 10:40AM UTC 101
97.7
GitHub Action Run
5 python-3.14 - 30444077253.5 29 Jul 2026 10:40AM UTC 101
97.7
GitHub Action Run
Source Files on build 30444077253
  • Tree
  • List 101
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 8153a313 on github
  • Prev Build on master (#30363977050)
  • Next Build on master (#30447326307)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc