11597 Commits

Author SHA1 Message Date
Zuul
49d22d8291 Merge "Fix perfload jobs after consumer_types" 2022-04-01 21:41:47 +00:00
Zuul
ffca1ebd9b Merge "Add zed spec directory" 2022-03-25 06:21:23 +00:00
Zuul
17545aa2f7 Merge "setup: Replace dashes with underscores" 2022-03-23 16:17:03 +00:00
Zuul
cd68adb748 Merge "tox: Remove psycopg2 warning filter" 2022-03-23 16:04:57 +00:00
Zuul
11757852a9 Merge "tests: Silence noisy tests" 2022-03-23 15:57:13 +00:00
Takashi Natsume
e600254d54 Add zed spec directory
Change-Id: If4384292ee94be9bb27cc650b31f5f8c70c119ed
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-03-19 08:23:55 +00:00
333fe55b76 Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ie37ed6ec079985bd6bc14de9517e6669d8b2b259
2022-03-10 08:21:35 +00:00
cd899b66fa Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.

Sem-Ver: feature
Change-Id: Id7b917a26bbaecf08a20e83375bf5940d08cc4c7
2022-03-10 08:21:32 +00:00
Zuul
ff0f2dda77 Merge "Add microversion 1.39 to support any-trait queries" 7.0.0 7.0.0.0rc1 2022-02-22 20:23:52 +00:00
Zuul
35f61658eb Merge "Remove unused compatibility code" 2022-02-22 20:20:04 +00:00
Zuul
75a4af0409 Merge "Add any-traits support for allocation candidates" 2022-02-22 19:40:27 +00:00
Zuul
4b43b80f11 Merge "Add any-traits support for listing resource providers" 2022-02-22 16:27:17 +00:00
Zuul
26bd968add Merge "Extend the RP tree DB query to support any-traits" 2022-02-22 16:27:15 +00:00
Zuul
da8bb3d04d Merge "Enhance doc of _get_trees_with_traits" 2022-02-22 16:27:12 +00:00
Zuul
88bb5e33b3 Merge "DB layer should only depend on trait id not names" 2022-02-22 16:27:09 +00:00
Zuul
9f75ce599e Merge "Extend the RP db query to support any-traits" 2022-02-22 16:27:07 +00:00
Balazs Gibizer
b2afade159 Add microversion 1.39 to support any-trait queries
The new microversion adds support for the ``in:`` syntax in the ``required``
query parameter in the ``GET /resource_providers`` API as well as to the
``required`` and ``requiredN`` query params of the
``GET /allocation_candidates`` API. Also adds support for repeating the
``required`` and ``requiredN`` parameters in the respective APIs. So

  required=in:T3,T4&required=T1,!T2

is supported and it means T1 and not T2 and (T3 or T4).

Story: 2005345
Story: 2005346
Change-Id: I66543c0c5509739d1461af2fb2c327a003202d74
2022-02-10 11:09:20 +01:00
Balazs Gibizer
8245f9e5ec Remove unused compatibility code
During the development of the any-traits feature the signature of the DB
methods are changed and to allow gradual change in the caller sites
fallback logic was added to accept the old signature as well.
Now that all the call sites uses a new signature such code is removed.

Story: 2005345
Story: 2005346
Change-Id: Icdbdbb8e68bba37a2a5c1ffb81df231581c4ae02
2022-02-10 11:09:20 +01:00
Balazs Gibizer
87e56f749b Add any-traits support for allocation candidates
The patch I8704fe7350f74e0567e574eb00fc40b330817381 added support for
any-traits in the DB query when considering RP trees. This patch extends
the allocation candidates code path to be able to parse the extended
'in:' syntax of the 'required' query parameter as well as to handle the
nested required trait structure both in the unnamed and in the name
request groups.

This patch refers to microversion 1.39 which has not been added yet so
the changes in this patch cannot be triggered from the REST API. A later
patch will add the microversion bump.

Note that supporting the 'in:' syntax in root_required query param was
not planned and it is not implemented as part of this patch series and
API microversion.

Story: 2005345
Story: 2005346
Change-Id: I760be29201bce8dfc6d4e571bc8a842404eaff09
2022-02-10 11:09:20 +01:00
Balazs Gibizer
faa1ad516f Add any-traits support for listing resource providers
The patch Id908822e8e03b872b204016345fba30b05ff5b1f added support for
any-traits in the DB layer. This patch extends the resource provider
object and API layer to be able to parse the extended 'in:' syntax of
the 'required' query parameter as well as to handle the nested required
trait structure.

This patch refers to microversion 1.39 which has not been added yet so
the changes in this patch cannot be triggered from the REST API. A later
patch will add the microversion bump after the allocation_candidates
code path also gained support for the same query structure.

Story: 2005345
Story: 2005346
Change-Id: I1ef8e31c73ffbc84ecdfed806098ca860c60a396
2022-02-10 11:09:09 +01:00
Zuul
91b85ba7ab Merge "Refactor trait normalization" 2022-02-09 21:32:24 +00:00
Balazs Gibizer
c19481a5f3 Extend the RP tree DB query to support any-traits
This extends the RP tree query at the DB layer to support any-traits with a
nested required_traits syntax [{A, B}, {C}] meaning ((A or B) and C).
The object and API layers do not support such queries yet.

Story: 2005345
Story: 2005346
Change-Id: I8704fe7350f74e0567e574eb00fc40b330817381
2022-02-08 14:51:50 +01:00
Balazs Gibizer
849c9afd2e Enhance doc of _get_trees_with_traits
The documentation of the research_context._get_trees_with_traits
function was not complete. So this patch adds characterisation tests for
this function and documents the behavior of the call.
The behavior might seem to be broken at first as it returns RPs that
are actually forbidden by forbidden traits. Still a later call in the
call chain does a proper trait filtering with a comment that this
later filtering should be moved to _get_trees_with_traits. So this is
probably not a bug just a limitation of the current
_get_trees_with_traits call.

Change-Id: I3216b951ac755a09326357809748823426f20acd
2022-02-08 14:42:29 +01:00
Balazs Gibizer
2d2a8ce7c9 DB layer should only depend on trait id not names
Update get_provider_ids_having_any_trait to only depend on the internal
trait IDs in signature. In implementation it only depends on that anyhow
and all call sites already has access to the trait ids.

Later this change will help to use this call from call sites which only
have access to the trait ids but not the names any more.

Story: 2005345
Story: 2005346
Change-Id: Id1b3d6fb2c1a50909649583dbd8ca6e841468366
2022-02-08 14:34:52 +01:00
Balazs Gibizer
a5ebaf2a45 Extend the RP db query to support any-traits
This extends the RP query at the DB layer to support any-traits with a
nested required_traits syntax [{A, B}, {C}] meaning ((A or B) and C).
The object and API layers do not support such queries yet.

Story: 2005345
Story: 2005346
Change-Id: Id908822e8e03b872b204016345fba30b05ff5b1f
2022-02-08 13:25:12 +01:00
Balazs Gibizer
a57215e8b6 Fix perfload jobs after consumer_types
Since consumer_types was added to the API in
I24c2315093e07dbf25c4fb53152e6a4de7477a51 the two perfload jobs are
getting errors from placement as they are using the latest microversion
but does not specify the consumer_type when creating allocations.

The server could not comply with the request since it is either malformed
or otherwise incorrect.\n\n JSON does not validate: 'consumer_type' is a
required property

This patch changes the allocation request to specify TEST as consumer
type.

Change-Id: I31500e3e6df5717d6bdb6ed7ed43325653d49be5
2022-02-07 16:47:17 +01:00
Stephen Finucane
079e55fd1b setup: Replace dashes with underscores
Resolves the following class of warnings issued when building the
package sdist:

  UserWarning: Usage of dash-separated 'python-requires' will not be
  supported in future versions. Please use the underscore name
  'python_requires' instead

Change-Id: Ie4f6c7b17ace67669cdeec84ce4f163aededa8e4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-02-06 02:00:06 +09:00
Stephen Finucane
b9e7524cbf tox: Remove psycopg2 warning filter
Our minimum constraint for this dependency is now at the correct
version, meaning we no longer need this filter. Remove it.

Change-Id: I94485a3f16b0cd47ae1e2331efc6b19eb4f6278b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-02-06 02:00:06 +09:00
Stephen Finucane
50bacea31c tests: Silence noisy tests
Some of our gabbit tests have the 'verbose' flag set, which means they
are rather noisy, dumping the (mostly) raw HTTP requests to stdout.
Resolve this by dropping the 'verbose' flag.

Tests for the 'placement-status' command don't capture stdout which
means we see their output. Resolve this by simply capturing stdout.

Change-Id: If6c1f88fbb94cb13459c9506c04cfbeee7ac9619
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-02-06 02:00:06 +09:00
Zuul
7e0ad4956f Merge "Extra tests around required traits" 2022-02-03 18:27:56 +00:00
Balazs Gibizer
7e3602b35f Refactor trait normalization
This prepares for the changes necessary to support multiple `required`
query params and then `in:` syntax.

Story: 2005345
Story: 2005346
Change-Id: Ifa2c55a77b34d7579e38e6618c361b9494553858
2022-02-03 11:58:19 +01:00
Balazs Gibizer
396634e07c Extra tests around required traits
This patch adds some tests to prove the following for both GET
/resource_providers and /allocation_candidates API:

* in:trait1,trait2 is not yet supported, this will makes sure we don't
  leak the support to older microversions

* repeated `required` query params are not supported. Interestingly the
  current behavior is that one `required` query param will overwrite the
  rest.

Story: 2005345
Story: 2005346

Change-Id: I67d1af5b8b6e945c744180358d588e95e13c33f6
2022-01-31 18:28:31 +01:00
Sean Mooney
89cc7332f5 update placement for os-traits 2.7.0 release
This change re enables checking the standard
trait count and updates placement to require
os-traits 2.7.0

Depends-on: https://review.opendev.org/c/openstack/requirements/+/826447
Change-Id: I3685c3caac3be4754d1f9e8479d8a047eaf8f3e8
2022-01-26 15:16:16 +00:00
Sean Mooney
affb87af23 disable traits count check to allow os-traits 2.7.0
This is a workaound to unblock the requirements repo.

Change-Id: I5aed5674975529b32390d3e216423cba8d501bc5
2022-01-26 15:13:11 +00:00
Zuul
d48d22ff24 Merge "Spec: support mixing required traits with any traits" 2022-01-11 21:05:36 +00:00
Zuul
795d4e2950 Merge "Spec: support any trait in allocation candidates" 2022-01-11 21:02:38 +00:00
Zuul
199adb9708 Merge "Add yoga spec directory" 2022-01-10 12:02:11 +00:00
Zuul
325deab277 Merge "Updating python testing as per Yoga testing runtime" 2021-12-20 19:32:16 +00:00
Ghanshyam Mann
1141597b5a Updating python testing as per Yoga testing runtime
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are
handled by the job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit makes other required changes in zuul.yaml and
update the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: I50c125df4ee03377caf16da5824e2ed492d4b7da
2021-12-14 02:24:04 +00:00
Chris Dent
fb71123aa1 Spec: support mixing required traits with any traits
This is a reproposal of a nova spec to placement, originally
proposed in I9695f0cb2c0263cd0e8ca552d3a9dd720690e466.

Previously-Approved: Stein
Story: 2005345
Task: 30295
Change-Id: Ibada21dcabbb3824c8d9fdb7584d45abf844be68
2021-11-30 15:17:11 +01:00
Chris Dent
f7422e277b Spec: support any trait in allocation candidates
This is a reproposal of a nova spec to placement, originally
proposed in I57c5611d7443070c176d213118857261b37eca0c

Change-Id: I0e47b654d5bdae1125737cf54d9c301bdba3236f
Previously-Approved: Stein
Story: 2005346
Task: 30296
2021-11-30 15:17:11 +01:00
Balazs Gibizer
a5f31071ac Add yoga spec directory
Change-Id: Idf9c491542d3e03498e2b8f4c7247d9477e606d5
2021-11-30 15:17:01 +01:00
Zuul
6e8c4cbffc Merge "Enable HTTPProxyToWSGI middleware to find actual client ips" 2021-11-29 21:54:55 +00:00
Ghanshyam Mann
6d49b6df1d Use 'functional-without-sample-db-tests' tox env for placement nova job
Nova defines (depends-on) a new tox env 'functional-without-sample-db-tests'
to run the nova functional test by exlcuding the api|notification
sample_tests, and db-related tests.

We can use that to fix the error  are facing currently for this job
- https://zuul.openstack.org/build/a8c186b2c7124856ae32477f10e2b9a4

Depends-On: https://review.opendev.org/c/openstack/nova/+/813679
Change-Id: If7e6060c867df21360a1f588ca872d65d75eb3c1
2021-10-12 23:37:19 +00:00
Zuul
bd5b19c00e Merge "Add Python3 yoga unit tests" 2021-09-22 12:29:47 +00:00
Balazs Gibizer
967abd1d57 Bump min decorator to 4.0.0
To be compatible with recent setuptools 58.0.0 which removed the support
for use_2to3 we need to bump the minimum version we support for
decorator from 3.4.0 to 4.0.0.

This is needed to unblock the gate.

Change-Id: I456f8136f882a2c6621549b2b0f80e213e5430df
2021-09-20 14:13:50 +02:00
7541d94d20 Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ib9494839df2546d8a9ffcae752a12d98d50f1dc7
2021-09-16 10:36:26 +00:00
de4eb283d3 Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: Ifa543f0d6265bf7937937b62f7ae2ff23fc6b4ba
2021-09-16 10:36:24 +00:00
Zuul
e7355066fc Merge "Fix adding 'unknown' to the ConsumerTypeCache" 6.0.0.0rc1 2021-09-13 11:57:53 +00:00
Zuul
8a31ef150c Merge "Reproduce 404 when allocation queried with 1.38" 2021-09-13 10:42:47 +00:00