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

unioslo / mreg / 30444077253 / 4
98%
master: 98%

Build:
DEFAULT BRANCH: master
Ran 29 Jul 2026 10:40AM UTC
Files 101
Run time 4s
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.4

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)

10310 of 10553 relevant lines covered (97.7%)

0.98 hits per line

Source Files on job python-3.11 - 30444077253.4
  • Tree
  • List 101
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 30444077253
  • 8153a313 on github
  • Prev Job for on master (#30363977050.2)
  • Next Job for on master (#30447326307.5)
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