#397 Document improvements suggestions (subject-type values)
Opened 2 years ago by hhorak. Modified 2 years ago

It is hard to guess what correct expected values should be for options --subject-identifier and --subject-type. The man page and --help output should document this.

I for example did a mistake that I used format for module n:s:c:r but it requires n-s-r.c.

Would it be OK to add links in documentation to check results or previous waivers for the same subject-type? Example:
- https://waiverdb.fedoraproject.org/api/v1.0/waivers/?subject_type=redhat-module
- https://taskotron.fedoraproject.org/resultsdb_api/api/v2.0/results?type=redhat-module

The reason for the specific N-S-V.C format for modules is describe in comments in the resultsdb-updater PR:
- https://github.com/release-engineering/resultsdb-updater/pull/73/files#discussion_r235425975
- https://github.com/release-engineering/resultsdb-updater/pull/73/files#discussion_r235964781

Maybe we could add some verification code to waiverdb for known subject types, ideally as a mapping in configuration:

        "match": { "subject_type": "redhat-module" },
        "validate": [
                "subject_identifier": "*-*-*.*",
                "error": "format must be N-S-V.C"

It sounds like a good idea to me to include the info about previous waivers, good points.

However, the more important thing from my perspective is including some more info about these options and what values they expect specificially in the man page and --help output. That is the first place where people look for help and it is nice to read that I need to use --subject-type, but with no info about what value it expects, it does not help much.

Login to comment on this ticket.