streams able to perform or logic

Bug #2070178 reported by Wong Hong Han
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
simplestreams
Incomplete
Undecided
Unassigned

Bug Description

We would like to have item_filters to have OR behaviour if possible.

As of now we are filtering thru `supported` key.
However there is a request to add unsupported version to the simplestreams and we have to revert back to `release` key.

We have to maintain the list for every ubuntu release and EOL after revert to `release` key.

It would be nice to have a OR logic where we can select if the item_filters can contain `supported=true` or `release~(trusty|xenial)`

Revision history for this message
Thomas Bechtold (toabctl) wrote :

Hi Wong,

thanks for reporting this bug.

> However there is a request to add unsupported version to the simplestreams and we have to revert back to `release` key.

I don't understand that. Could you give a more detailed example including which stream you use exactly, which fields you use to query and what this "request" is about?

Changed in simplestreams:
status: New → Incomplete
Revision history for this message
Wong Hong Han (honghan) wrote :

Hi Thomas,

As of now we have this query set in charm
item_filters: [ "supported~(true|True)", "arch~(x86_64|amd64|arm64|riscv64|s390x|ppc64el)", "ftype~(disk1.img|disk.img)" ]

Where in the charm it will run this command
/snap/bin/simplestreams.sstream-mirror-glance --path streams/v1/index.sjson http://cloud-images.ubuntu.com/releases/ supported~(true|True) arch~(x86_64|amd64|arm64|riscv64|s390x|ppc64el) ftype~(disk1.img|disk.img)

This setting help us to keep the sync images up to date with supported tags
However we have request to add unsupported images but yet to EOL.[1]

From the item_filters code, we can see the filter arguments will be combined with logical AND. [2]
We would like to have an option to maintain the current `supported~(true|True)` tag and include additional `release~(trusty|xenial)`.

Hope this clarify our use case.

1. https://wiki.ubuntu.com/Releases
2. https://git.launchpad.net/simplestreams/tree/bin/sstream-mirror-glance#n102

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.