contrib: add a specific warning to display new and unexpected stable api

Previously, apiage.py just print out a problem count when it found
an unexpected stable api in the new apis file. Now the output displays
something like this:
```
found new unexpected stable apis: API.LeakyBucket
error: 1 problems detected
```

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2023-01-09 14:27:02 -05:00 committed by mergify[bot]
parent 76ca06826b
commit dd95ce1437
1 changed files with 4 additions and 0 deletions

View File

@ -97,6 +97,10 @@ def api_update(tracked, src, copy_stable=False, defaults=None):
tracked, pkg, pkg_api, defaults=defaults tracked, pkg, pkg_api, defaults=defaults
) )
if new_stable and not copy_stable: if new_stable and not copy_stable:
print(
"found new unexpected stable apis:",
", ".join(a["name"] for a in new_stable),
)
return len(new_stable) return len(new_stable)
return 0 return 0