)]}'
{"id":"openstack%2Fwatcher~993543","triplet_id":"openstack%2Fwatcher~master~I62a798cd578588d81e06ef98ebe003564fada296","project":"openstack/watcher","branch":"master","topic":"blueprint-functional-test-infrastructure-v2","attention_set":{"16312":{"account":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"last_update":"2026-06-25 06:17:56.000000000","reason":"Someone else replied on the change"}},"removed_from_attention_set":{},"hashtags":[],"change_id":"I62a798cd578588d81e06ef98ebe003564fada296","subject":"Add Prometheus emulator and workload_stabilization functional tests","status":"NEW","created":"2026-06-16 09:51:54.000000000","updated":"2026-07-02 19:50:17.000000000","submit_type":"MERGE_IF_NECESSARY","mergeable":true,"submittable":false,"total_comment_count":11,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"504b596dda4368e151cc192a27d0afbbb7a4a2c2","_number":993543,"virtual_id_number":993543,"owner":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"actions":{},"labels":{"Verified":{"recommended":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"tag":"autogenerated:zuul:check","value":1,"date":"2026-07-02 19:05:30.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":1,"default_value":0,"optional":true},"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"all":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"permitted_voting_range":{"min":0,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{" 0":"Standard Change","+1":"Important Change","+2":"High Priority Change"},"default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"CC":[{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"}],"REVIEWER":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2026-06-16 10:07:58.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2026-06-25 06:17:56.000000000","updated_by":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"reviewer":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"state":"CC"}],"messages":[{"id":"95802abbc8c1e1078ee9f62ec6574c28d376cafc","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"date":"2026-06-16 09:51:54.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"2e1b4ce6b5286af40865ab3daa8c2600d792753a","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-06-16 10:07:58.000000000","message":"Patch Set 1: Verified-1\n\nBuild failed (check pipeline).  For information on how to proceed, see\nhttps://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing\nand https://docs.openstack.org/project-team-guide/testing.html#how-to-handle-test-failures\n\nhttps://zuul.opendev.org/t/openstack/buildset/cebd23fbc66e4cd7ae8f22d030cb07d5\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/de7ba05f26214e67b8331c807222e0cd : FAILURE in 5m 19s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/5d6e95b03c5c48229a1f8c0fe12435a3 : SUCCESS in 4m 30s\n- openstack-tox-py311 https://zuul.opendev.org/t/openstack/build/73a1712ef448410180c182f1f605b3ce : SUCCESS in 6m 04s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/7736bcdd8e524b3f831ae379e0d51da8 : SUCCESS in 8m 20s\n- openstack-tox-py314 https://zuul.opendev.org/t/openstack/build/be13379b12474a2ab033b916b127eac1 : SUCCESS in 5m 45s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/dd05788c65c442d69de02dc10aefd2eb : SUCCESS in 11m 01s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/1b328355cf2a4c63aa021ec5e07098a5 : SUCCESS in 3m 10s\n- openstack-tox-py313-eventlet https://zuul.opendev.org/t/openstack/build/fa58e18c750f474b9df7a4e534ea8e54 : SUCCESS in 6m 06s\n- openstack-tox-functional-py313 https://zuul.opendev.org/t/openstack/build/9edcd46047f846d18e728c47f6d536e7 : SUCCESS in 3m 43s","accounts_in_message":[],"_revision_number":1},{"id":"e8ceced66910466ef458e5a384094dbd4102fb35","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"date":"2026-06-16 16:14:01.000000000","message":"Uploaded patch set 2: Patch Set 1 was rebased.\n\nOutdated Votes:\n* Verified-1 (copy condition: \"NEVER\")\n","accounts_in_message":[],"_revision_number":2},{"id":"f12b55f30b24a03efe6b852ee4937c0aa4d232a3","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-06-16 16:31:32.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/a5ae3b6cfe224069b93272883f143e79\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/6e2d5359854843d3940a22955f03b4c0 : SUCCESS in 8m 55s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/bfddba4088284bf3948f828a3689510b : SUCCESS in 4m 43s\n- openstack-tox-py311 https://zuul.opendev.org/t/openstack/build/d19ebd7cb49f4a3fb23208aabfac53ec : SUCCESS in 3m 22s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/f8f8e582cbc341b5ad55d1c5b0a661d5 : SUCCESS in 3m 27s\n- openstack-tox-py314 https://zuul.opendev.org/t/openstack/build/e7e212ac0847426bbd82fb92eba77503 : SUCCESS in 8m 47s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/f57cbe6fe8ce42d08d7a6f844b2d683f : SUCCESS in 4m 52s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/e5da807f6abb4badadd4018ef2c25fc9 : SUCCESS in 5m 18s\n- openstack-tox-py313-eventlet https://zuul.opendev.org/t/openstack/build/bb54af7d34d94b1581686c08d64ac592 : SUCCESS in 3m 29s\n- openstack-tox-functional-py313 https://zuul.opendev.org/t/openstack/build/77a35ba71eac4810ab112cc2cf824195 : SUCCESS in 3m 08s","accounts_in_message":[],"_revision_number":2},{"id":"68a1574412efcd93e92354a700b9532f51a243e4","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"date":"2026-06-25 06:17:21.000000000","message":"Uploaded patch set 3.\n\nOutdated Votes:\n* Verified+1 (copy condition: \"NEVER\")\n","accounts_in_message":[],"_revision_number":3},{"id":"73379838b0edef583f9f76e45889a561f68cd2d2","tag":"autogenerated:zuul:automatic-ci","author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"date":"2026-06-25 06:17:56.000000000","message":"Patch Set 3:\n\nStarting automatic-ci jobs.","accounts_in_message":[],"_revision_number":3},{"id":"92e978e6cae19a11cc154da3445c752a1fd396ea","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-06-25 06:44:33.000000000","message":"Patch Set 3: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/77c5c35724ac47ae90cc5e26f92fd8a2\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/7f2f939f148b4da18bd3e6060035db50 : SUCCESS in 7m 08s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/6009510f294f48a9aa8bcd1761cebaa3 : SUCCESS in 7m 10s\n- openstack-tox-py311 https://zuul.opendev.org/t/openstack/build/c6c17d96b5cc433fba00f519c0661e5c : SUCCESS in 5m 13s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/13f338ffb9464459974a0fca827d8460 : SUCCESS in 5m 43s\n- openstack-tox-py314 https://zuul.opendev.org/t/openstack/build/5b16f818cd3646db959a937bf834517d : SUCCESS in 8m 10s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/a2eaeb39185346b4a784f6ab0cf98d07 : SUCCESS in 9m 23s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/8463fa52a25e466884dc486e812e56ed : SUCCESS in 4m 41s\n- openstack-tox-py313-eventlet https://zuul.opendev.org/t/openstack/build/1c0ea078d94043f791efdc1f58fce413 : SUCCESS in 5m 04s\n- openstack-tox-functional-py313 https://zuul.opendev.org/t/openstack/build/4dc761a23d8942fab7635b4ff8b92134 : SUCCESS in 4m 41s","accounts_in_message":[],"_revision_number":3},{"id":"e9f073a6382d83ecc90436b83a46cf645668678e","tag":"autogenerated:zuul:automatic-ci","author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"date":"2026-06-25 09:42:13.000000000","message":"Patch Set 3:\n\n(3 comments)\n\nBuild succeeded (automatic-ci pipeline).\nhttps://zuul.teim.app/t/main/buildset/ee2fdc99c5434cd89568a9785a1d0858\n\n- teim-code-review https://zuul.teim.app/t/main/build/86a1e57348874db18c9019e96cec20c8 : SUCCESS in 22m 43s\n\nWarning:\n  _identify_query returns \u0027host_ram\u0027 for both node_memory_MemAvailable_bytes and node_memory_MemTotal_bytes, always returning the same \u0027ram\u0027 value. This works since Watcher only queries MemAvailable, but the docstring lists MemTotal as a separate returning pattern. Impact: Low - the emulator currently serves exactly the queries Watcher generates. If a future Watcher version queries both MemTotal and MemAvailable to compute usage, the emulator would return incorrect data for MemTotal. Recommendation: Consider tracking host_ram_total separately or adding a clarifying comment that MemTotal falls back to the same value as MemAvailable. This can be a follow-up refinement.","accounts_in_message":[],"_revision_number":3},{"id":"3b75f5db3012bf73dbfc609d1df040d8397c685e","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"date":"2026-07-02 18:42:22.000000000","message":"Uploaded patch set 4.\n\nOutdated Votes:\n* Verified+1 (copy condition: \"NEVER\")\n","accounts_in_message":[],"_revision_number":4},{"id":"c93a973c6d065a3174983f7ffa06f83e833978c6","tag":"autogenerated:zuul:automatic-ci","author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"date":"2026-07-02 18:42:56.000000000","message":"Patch Set 4:\n\nStarting automatic-ci jobs.","accounts_in_message":[],"_revision_number":4},{"id":"63e423c0db064edc6fd9dddf36d4724b8933efdf","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-07-02 19:05:30.000000000","message":"Patch Set 4: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/bc21165098114da996a9ef7bdc05916a\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/06bd11c0c4ae4208959d1437a1951b27 : SUCCESS in 7m 25s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/3efbdd7a73994e949a7c8694c886c18f : SUCCESS in 4m 11s\n- openstack-tox-py311 https://zuul.opendev.org/t/openstack/build/bb0c105bdce14dcea658e7ef05085e45 : SUCCESS in 5m 07s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/aa0ee16e5f2649be871e51f6857fb6f0 : SUCCESS in 5m 21s\n- openstack-tox-py314 https://zuul.opendev.org/t/openstack/build/010e637aab904536937afd2fdfe7f8f4 : SUCCESS in 5m 25s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/fff24abfac874d17a5332c28fb008c7a : SUCCESS in 10m 35s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/90216b3afcfe4f85b471467647b7e5a6 : SUCCESS in 3m 12s\n- openstack-tox-py313-eventlet https://zuul.opendev.org/t/openstack/build/fde1c36b201344e087016bbab01f9197 : SUCCESS in 7m 12s\n- openstack-tox-functional-py313 https://zuul.opendev.org/t/openstack/build/879cbfff5bef4c5e99d7db4d2a572c34 : SUCCESS in 3m 17s","accounts_in_message":[],"_revision_number":4},{"id":"504b596dda4368e151cc192a27d0afbbb7a4a2c2","tag":"autogenerated:zuul:automatic-ci","author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"date":"2026-07-02 19:50:17.000000000","message":"Patch Set 4:\n\n(8 comments)\n\nBuild succeeded (automatic-ci pipeline).\nhttps://zuul.teim.app/t/main/buildset/1e8c71a5b276477a89b613fba9aa77d8\n\n- teim-code-review https://zuul.teim.app/t/main/build/784dc97d05b54d04a309ba4f00997a1b : SUCCESS in 12m 14s\n\nWarning:\n  The emulator does not parse PromQL; it pattern-matches query substrings, coupling it to the exact query strings from prometheus_base.py. If the query format changes (label renames, wrapping functions), the emulator silently returns empty vectors and tests pass with zero actions rather than failing. Impact: Tests can give false confidence: a strategy bug masked by an emulator that no longer matches the real query format would show \u0027no migrations\u0027 and look like a passing balanced-cluster test. This is the core fragility risk of substring matching over real PromQL parsing. Recommendation: Add at least one test that asserts the emulator returns non-empty results for the current query shapes (a smoke check), so query-format drift fails loudly rather than silently degrading to empty responses. Document the coupling in the emulator module docstring.\n  New tests use subTest loops calling load_topology()/load_metrics() each iteration. subTest reuses the same fixture, so these mutate shared emulator/topology state in place. It works because reload_metrics resets, but makes tests order-dependent if a future fixture does not fully reset on reload. Impact: If load_metrics or load_topology ever stops fully resetting prior state, subTest iterations would contaminate each other and produce flaky, order-dependent failures that are hard to diagnose. Recommendation: Ensure reload_metrics/reset semantics are documented as a hard contract, and consider asserting the emulator is empty before each load_metrics call in the first subTest iteration as a guard against partial resets.","accounts_in_message":[],"_revision_number":4}],"current_revision_number":4,"current_revision":"8b7938f71a7b660b6cc8f1b3d15da62591faed9d","revisions":{"4504bad0ab977e9668e45f23b701ceee7a95311a":{"kind":"REWORK","_number":1,"created":"2026-06-16 09:51:54.000000000","uploader":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"ref":"refs/changes/43/993543/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/watcher","ref":"refs/changes/43/993543/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/watcher refs/changes/43/993543/1"}}},"commit":{"parents":[{"commit":"356d8f14c2286f994cd8dad623c6974a7982659b","subject":"Add Nova/Placement emulators and host_maintenance functional tests","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/356d8f14c2286f994cd8dad623c6974a7982659b"}]}],"author":{"name":"Alfredo Moralejo","email":"amoralej@redhat.com","date":"2026-06-16 06:43:40.000000000","tz":120},"committer":{"name":"Alfredo Moralejo","email":"amoralej@redhat.com","date":"2026-06-16 09:51:29.000000000","tz":120},"subject":"Add Prometheus emulator and workload_stabilization functional tests","message":"Add Prometheus emulator and workload_stabilization functional tests\n\nIntroduce an in-process Prometheus API emulator that serves host and\ninstance metrics (CPU, RAM) from in-memory data, enabling functional\ntests for strategies that depend on real-time metrics without requiring\na real Prometheus server.\n\nComponents:\n- PrometheusAPIEmulator: Flask app that responds to the PromQL query\n  patterns Watcher generates (host CPU/RAM, instance CPU/RAM). Supports\n  loading metrics from Python dicts or JSON files, and can run standalone\n  for debugging.\n- PrometheusFixture: wires the emulator via wsgi-intercept and\n  configures the prometheus datasource.\n- WatcherEnvironment integration: new USE_PROMETHEUS_EMULATOR flag and\n  load_metrics() helper for per-test metric reloading.\n\nAdds functional tests for the workload_stabilization strategy covering:\n- Threshold impact on migration count (parametrized over 4 thresholds)\n- Balanced cluster producing no actions\n- RAM-only imbalance triggering migrations\n- Restrict balanced environment via audit scope\n- Weight impact on migration selection (cpu-heavy vs ram-heavy)\n\nUpdates testing.rst documentation including metrics handling in\nfunctional tests.\n\nAssisted-By: Claude\nImplements: blueprint functional-test-infrastructure\nChange-Id: I62a798cd578588d81e06ef98ebe003564fada296\nSigned-off-by: Alfredo Moralejo \u003camoralej@redhat.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/4504bad0ab977e9668e45f23b701ceee7a95311a"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/4504bad0ab977e9668e45f23b701ceee7a95311a"}]},"branch":"refs/heads/master"},"1cd25417849383c2264ff9d2220feef77cdd9b16":{"kind":"TRIVIAL_REBASE","_number":2,"created":"2026-06-16 16:14:01.000000000","uploader":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"ref":"refs/changes/43/993543/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/watcher","ref":"refs/changes/43/993543/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/watcher refs/changes/43/993543/2"}}},"commit":{"parents":[{"commit":"7937cd7a9025e8aab76e3f3b4febfa7f5838755c","subject":"Add Nova/Placement emulators and host_maintenance functional tests","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/7937cd7a9025e8aab76e3f3b4febfa7f5838755c"}]}],"author":{"name":"Alfredo Moralejo","email":"amoralej@redhat.com","date":"2026-06-16 06:43:40.000000000","tz":120},"committer":{"name":"Alfredo Moralejo","email":"amoralej@redhat.com","date":"2026-06-16 15:59:20.000000000","tz":120},"subject":"Add Prometheus emulator and workload_stabilization functional tests","message":"Add Prometheus emulator and workload_stabilization functional tests\n\nIntroduce an in-process Prometheus API emulator that serves host and\ninstance metrics (CPU, RAM) from in-memory data, enabling functional\ntests for strategies that depend on real-time metrics without requiring\na real Prometheus server.\n\nComponents:\n- PrometheusAPIEmulator: Flask app that responds to the PromQL query\n  patterns Watcher generates (host CPU/RAM, instance CPU/RAM). Supports\n  loading metrics from Python dicts or JSON files, and can run standalone\n  for debugging.\n- PrometheusFixture: wires the emulator via wsgi-intercept and\n  configures the prometheus datasource.\n- WatcherEnvironment integration: new USE_PROMETHEUS_EMULATOR flag and\n  load_metrics() helper for per-test metric reloading.\n\nAdds functional tests for the workload_stabilization strategy covering:\n- Threshold impact on migration count (parametrized over 4 thresholds)\n- Balanced cluster producing no actions\n- RAM-only imbalance triggering migrations\n- Restrict balanced environment via audit scope\n- Weight impact on migration selection (cpu-heavy vs ram-heavy)\n\nUpdates testing.rst documentation including metrics handling in\nfunctional tests.\n\nAssisted-By: Claude\nImplements: blueprint functional-test-infrastructure\nChange-Id: I62a798cd578588d81e06ef98ebe003564fada296\nSigned-off-by: Alfredo Moralejo \u003camoralej@redhat.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/1cd25417849383c2264ff9d2220feef77cdd9b16"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/1cd25417849383c2264ff9d2220feef77cdd9b16"}]},"branch":"refs/heads/master"},"979ce88e27d631a88790a239a1133a5b2aef1389":{"kind":"REWORK","_number":3,"created":"2026-06-25 06:17:21.000000000","uploader":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"ref":"refs/changes/43/993543/3","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/watcher","ref":"refs/changes/43/993543/3","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/watcher refs/changes/43/993543/3"}}},"commit":{"parents":[{"commit":"7e4e533afdd216499e24bee34365b1f3147448fc","subject":"Add Nova/Placement emulators and host_maintenance functional tests","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/7e4e533afdd216499e24bee34365b1f3147448fc"}]}],"author":{"name":"Alfredo Moralejo","email":"amoralej@redhat.com","date":"2026-06-16 06:43:40.000000000","tz":120},"committer":{"name":"Alfredo Moralejo","email":"amoralej@redhat.com","date":"2026-06-25 06:17:11.000000000","tz":120},"subject":"Add Prometheus emulator and workload_stabilization functional tests","message":"Add Prometheus emulator and workload_stabilization functional tests\n\nIntroduce an in-process Prometheus API emulator that serves host and\ninstance metrics (CPU, RAM) from in-memory data, enabling functional\ntests for strategies that depend on real-time metrics without requiring\na real Prometheus server.\n\nComponents:\n- PrometheusAPIEmulator: Flask app that responds to the PromQL query\n  patterns Watcher generates (host CPU/RAM, instance CPU/RAM). Supports\n  loading metrics from Python dicts or JSON files, and can run standalone\n  for debugging.\n- PrometheusFixture: wires the emulator via wsgi-intercept and\n  configures the prometheus datasource.\n- WatcherEnvironment integration: new USE_PROMETHEUS_EMULATOR flag and\n  load_metrics() helper for per-test metric reloading.\n\nAdds functional tests for the workload_stabilization strategy covering:\n- Threshold impact on migration count (parametrized over 4 thresholds)\n- Balanced cluster producing no actions\n- RAM-only imbalance triggering migrations\n- Restrict balanced environment via audit scope\n- Weight impact on migration selection (cpu-heavy vs ram-heavy)\n\nUpdates testing.rst documentation including metrics handling in\nfunctional tests.\n\nAssisted-By: Claude\nImplements: blueprint functional-test-infrastructure\nChange-Id: I62a798cd578588d81e06ef98ebe003564fada296\nSigned-off-by: Alfredo Moralejo \u003camoralej@redhat.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/979ce88e27d631a88790a239a1133a5b2aef1389"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/979ce88e27d631a88790a239a1133a5b2aef1389"}]},"branch":"refs/heads/master"},"8b7938f71a7b660b6cc8f1b3d15da62591faed9d":{"kind":"REWORK","_number":4,"created":"2026-07-02 18:42:22.000000000","uploader":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"ref":"refs/changes/43/993543/4","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/watcher","ref":"refs/changes/43/993543/4","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/watcher refs/changes/43/993543/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/watcher refs/changes/43/993543/4"}}},"commit":{"parents":[{"commit":"84372a10e06a1f559a071cc02fd091f826351483","subject":"Add Nova/Placement emulators and host_maintenance functional tests","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/84372a10e06a1f559a071cc02fd091f826351483"}]}],"author":{"name":"Alfredo Moralejo","email":"amoralej@redhat.com","date":"2026-06-16 06:43:40.000000000","tz":120},"committer":{"name":"Alfredo Moralejo","email":"amoralej@redhat.com","date":"2026-07-02 18:33:45.000000000","tz":120},"subject":"Add Prometheus emulator and workload_stabilization functional tests","message":"Add Prometheus emulator and workload_stabilization functional tests\n\nIntroduce an in-process Prometheus API emulator that serves host and\ninstance metrics (CPU, RAM) from in-memory data, enabling functional\ntests for strategies that depend on real-time metrics without requiring\na real Prometheus server.\n\nComponents:\n- PrometheusAPIEmulator: Flask app that responds to the PromQL query\n  patterns Watcher generates (host CPU/RAM, instance CPU/RAM). Supports\n  loading metrics from Python dicts or JSON files, and can run standalone\n  for debugging.\n- PrometheusFixture: wires the emulator via wsgi-intercept and\n  configures the prometheus datasource.\n- WatcherEnvironment integration: new USE_PROMETHEUS_EMULATOR flag and\n  load_metrics() helper for per-test metric reloading.\n\nAdds functional tests for the workload_stabilization strategy covering:\n- Threshold impact on migration count (parametrized over 4 thresholds)\n- Balanced cluster producing no actions\n- RAM-only imbalance triggering migrations\n- Restrict balanced environment via audit scope\n- Weight impact on migration selection (cpu-heavy vs ram-heavy)\n\nUpdates testing.rst documentation including metrics handling in\nfunctional tests.\n\nAssisted-By: Claude\nImplements: blueprint functional-test-infrastructure\nChange-Id: I62a798cd578588d81e06ef98ebe003564fada296\nSigned-off-by: Alfredo Moralejo \u003camoralej@redhat.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/8b7938f71a7b660b6cc8f1b3d15da62591faed9d"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/watcher/commit/8b7938f71a7b660b6cc8f1b3d15da62591faed9d"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"OK","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY"},{"label":"Workflow","status":"MAY"},{"label":"Review-Priority","status":"MAY"}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Verified\u003dMAX","label:Verified\u003dMIN"],"atom_explanations":{"label:Verified\u003dMAX":"","label:Verified\u003dMIN":""}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Code-Review\u003dMAX","label:Code-Review\u003dMIN"],"atom_explanations":{"label:Code-Review\u003dMAX":"","label:Code-Review\u003dMIN":""}}},{"name":"Review-Priority","description":"Review Priority","status":"NOT_APPLICABLE","is_legacy":false,"applicability_expression_result":{"fulfilled":false,"status":"FAIL"},"submittability_expression_result":{"expression":"is:true","fulfilled":true,"status":"NOT_EVALUATED","passing_atoms":[],"failing_atoms":[],"atom_explanations":{}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Workflow\u003dMAX","label:Workflow\u003dMIN"],"atom_explanations":{"label:Workflow\u003dMAX":"","label:Workflow\u003dMIN":""}}}]}
