From d6ea5fc251ec712460ad75cb954ed35bb6084dae Mon Sep 17 00:00:00 2001 From: Ferran Llamas Date: Thu, 12 Sep 2024 17:08:09 +0200 Subject: [PATCH 1/5] Removed frmo tests --- nucliadb/tests/fixtures.py | 4 +-- .../tests/nucliadb/benchmarks/test_search.py | 2 -- .../common/cluster/test_rebalance.py | 1 - .../common/cluster/test_rollover.py | 3 -- .../integration/migrator/test_migrator.py | 1 - .../integration/search/test_autofilters.py | 1 - .../integration/search/test_filters.py | 6 ---- .../search/test_filters_expression.py | 1 - .../integration/search/test_search.py | 28 --------------- .../search/test_search_date_ranges_filter.py | 2 -- .../tests/nucliadb/integration/test_api.py | 34 +++---------------- .../tests/nucliadb/integration/test_ask.py | 19 ----------- .../nucliadb/integration/test_conversation.py | 3 -- .../nucliadb/integration/test_counters.py | 1 - .../nucliadb/integration/test_deletion.py | 1 - .../nucliadb/integration/test_entities.py | 9 ----- .../integration/test_field_external_file.py | 1 - .../tests/nucliadb/integration/test_find.py | 8 ----- .../tests/nucliadb/integration/test_labels.py | 4 --- .../nucliadb/integration/test_labelsets.py | 1 - .../integration/test_predict_proxy.py | 2 -- .../integration/test_processing_status.py | 1 - .../integration/test_purge_vectorsets.py | 1 - .../nucliadb/integration/test_reindex.py | 3 -- .../nucliadb/integration/test_relations.py | 3 -- .../nucliadb/integration/test_resources.py | 10 ------ .../nucliadb/integration/test_security.py | 3 -- .../nucliadb/integration/test_suggest.py | 6 ---- .../nucliadb/integration/test_summarize.py | 1 - .../nucliadb/integration/test_synonyms.py | 3 -- .../integration/test_text_field_json.py | 2 -- .../tests/nucliadb/integration/test_tokens.py | 1 - .../tests/nucliadb/integration/test_upload.py | 2 -- .../nucliadb/integration/test_usermetadata.py | 1 - .../nucliadb/integration/test_vectorsets.py | 3 -- .../integration/test_visual_selections.py | 1 - .../tests/train/test_field_classification.py | 1 - nucliadb/tests/train/test_field_streaming.py | 1 - .../tests/train/test_image_classification.py | 1 - nucliadb/tests/train/test_list_sentences.py | 1 - .../train/test_paragraph_classification.py | 1 - .../tests/train/test_paragraph_streaming.py | 1 - .../train/test_question_answer_streaming.py | 2 -- .../train/test_sentence_classification.py | 1 - .../tests/train/test_token_classification.py | 1 - .../standalone/test_search.py | 2 +- nucliadb_sidecar/tests/fixtures.py | 4 +-- .../tests/integration/test_indexing.py | 4 --- 48 files changed, 10 insertions(+), 183 deletions(-) diff --git a/nucliadb/tests/fixtures.py b/nucliadb/tests/fixtures.py index fac7db6375..c1744eee16 100644 --- a/nucliadb/tests/fixtures.py +++ b/nucliadb/tests/fixtures.py @@ -205,9 +205,9 @@ async def nucliadb_manager(nucliadb: Settings): @pytest.fixture(scope="function") -async def knowledgebox(nucliadb_manager: AsyncClient, request): +async def knowledgebox(nucliadb_manager: AsyncClient): resp = await nucliadb_manager.post( - "/kbs", json={"slug": "knowledgebox", "release_channel": request.param} + "/kbs", json={"slug": "knowledgebox", "release_channel": "STABLE"} ) assert resp.status_code == 201 uuid = resp.json().get("uuid") diff --git a/nucliadb/tests/nucliadb/benchmarks/test_search.py b/nucliadb/tests/nucliadb/benchmarks/test_search.py index b5ef7fe0cf..9c56edf55e 100644 --- a/nucliadb/tests/nucliadb/benchmarks/test_search.py +++ b/nucliadb/tests/nucliadb/benchmarks/test_search.py @@ -42,7 +42,6 @@ warmup=False, ) @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_search_returns_labels( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -70,7 +69,6 @@ async def test_search_returns_labels( warmup=False, ) @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_search_relations( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/common/cluster/test_rebalance.py b/nucliadb/tests/nucliadb/integration/common/cluster/test_rebalance.py index 970d233b4e..654b24afba 100644 --- a/nucliadb/tests/nucliadb/integration/common/cluster/test_rebalance.py +++ b/nucliadb/tests/nucliadb/integration/common/cluster/test_rebalance.py @@ -39,7 +39,6 @@ async def app_context(natsd, storage, nucliadb): await ctx.finalize() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_rebalance_kb_shards( app_context, knowledgebox, diff --git a/nucliadb/tests/nucliadb/integration/common/cluster/test_rollover.py b/nucliadb/tests/nucliadb/integration/common/cluster/test_rollover.py index ddd2276620..5bca2facf3 100644 --- a/nucliadb/tests/nucliadb/integration/common/cluster/test_rollover.py +++ b/nucliadb/tests/nucliadb/integration/common/cluster/test_rollover.py @@ -41,7 +41,6 @@ async def app_context(natsd, storage, nucliadb): await ctx.finalize() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_rollover_kb_index( app_context: ApplicationContext, knowledgebox, @@ -113,7 +112,6 @@ async def _test_rollover_kb_index( assert len(body["resources"]) == count -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_rollover_kb_index_does_a_clean_cutover( app_context, knowledgebox, @@ -131,7 +129,6 @@ async def get_kb_shards(kbid: str): assert shards2.extra == {} -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_rollover_kb_index_handles_changes_in_between( app_context, knowledgebox, diff --git a/nucliadb/tests/nucliadb/integration/migrator/test_migrator.py b/nucliadb/tests/nucliadb/integration/migrator/test_migrator.py index ca7fceebd0..6ce79693ed 100644 --- a/nucliadb/tests/nucliadb/integration/migrator/test_migrator.py +++ b/nucliadb/tests/nucliadb/integration/migrator/test_migrator.py @@ -40,7 +40,6 @@ async def execution_context(natsd, storage, nucliadb): await context.finalize() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_migrate_kb(execution_context: ExecutionContext, knowledgebox): # this will test run all available migrations await execution_context.data_manager.update_kb_info(kbid=knowledgebox, current_version=-1) diff --git a/nucliadb/tests/nucliadb/integration/search/test_autofilters.py b/nucliadb/tests/nucliadb/integration/search/test_autofilters.py index 3a6a25db92..246a871eac 100644 --- a/nucliadb/tests/nucliadb/integration/search/test_autofilters.py +++ b/nucliadb/tests/nucliadb/integration/search/test_autofilters.py @@ -28,7 +28,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_autofilters_are_returned( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/search/test_filters.py b/nucliadb/tests/nucliadb/integration/search/test_filters.py index 858fc27511..2fba8b25b7 100644 --- a/nucliadb/tests/nucliadb/integration/search/test_filters.py +++ b/nucliadb/tests/nucliadb/integration/search/test_filters.py @@ -42,11 +42,6 @@ from nucliadb_protos.writer_pb2_grpc import WriterStub from tests.utils import broker_resource, inject_message -RELEASE_CHANNELS = ( - "STABLE", - "EXPERIMENTAL", -) - class ClassificationLabels: RESOURCE_ANNOTATED = "user-resource/label" @@ -283,7 +278,6 @@ async def kbid( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", RELEASE_CHANNELS, indirect=True) @pytest.mark.parametrize( "filters", [ diff --git a/nucliadb/tests/nucliadb/integration/search/test_filters_expression.py b/nucliadb/tests/nucliadb/integration/search/test_filters_expression.py index 810a48b08d..6aa9c95de2 100644 --- a/nucliadb/tests/nucliadb/integration/search/test_filters_expression.py +++ b/nucliadb/tests/nucliadb/integration/search/test_filters_expression.py @@ -21,7 +21,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_filtering_expression(nucliadb_reader, nucliadb_writer, knowledgebox): kbid = knowledgebox diff --git a/nucliadb/tests/nucliadb/integration/search/test_search.py b/nucliadb/tests/nucliadb/integration/search/test_search.py index 505d17eff7..717a808a40 100644 --- a/nucliadb/tests/nucliadb/integration/search/test_search.py +++ b/nucliadb/tests/nucliadb/integration/search/test_search.py @@ -54,7 +54,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_simple_search_sc_2062( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -143,7 +142,6 @@ async def create_resource_with_duplicates(knowledgebox, writer: WriterStub, sent @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_filters_out_duplicate_paragraphs( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -176,7 +174,6 @@ async def test_search_filters_out_duplicate_paragraphs( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_returns_paragraph_positions( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -249,7 +246,6 @@ def broker_resource_with_classifications(knowledgebox): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_returns_labels( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -275,7 +271,6 @@ async def test_search_returns_labels( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_with_filters( nucliadb_reader: AsyncClient, nucliadb_grpc: WriterStub, @@ -303,7 +298,6 @@ async def test_search_with_filters( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_paragraph_search_with_filters( nucliadb_writer, nucliadb_reader, @@ -341,7 +335,6 @@ async def test_paragraph_search_with_filters( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) @pytest.mark.skipif("pg" in TESTING_MAINDB_DRIVERS, reason="PG catalog does not support with_status") async def test_catalog_can_filter_by_processing_status( nucliadb_reader: AsyncClient, @@ -425,7 +418,6 @@ async def test_catalog_can_filter_by_processing_status( @pytest.mark.skip(reason="Needs sc-5626") @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -473,7 +465,6 @@ async def test_( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_returns_sentence_positions( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -544,7 +535,6 @@ async def inject_resource_with_a_sentence(knowledgebox, writer): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_relations( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -666,7 +656,6 @@ async def test_search_relations( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) @pytest.mark.skipif("pg" in TESTING_MAINDB_DRIVERS, reason="PG catalog does not support with_status") async def test_processing_status_doesnt_change_on_search_after_processed( nucliadb_reader: AsyncClient, @@ -729,7 +718,6 @@ async def test_processing_status_doesnt_change_on_search_after_processed( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_automatic_relations( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, knowledgebox ): @@ -935,7 +923,6 @@ async def get_audit_messages(sub): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_sends_audit( nucliadb_reader, knowledgebox, @@ -1024,7 +1011,6 @@ async def test_search_pagination( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_search_pagination( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -1115,7 +1101,6 @@ async def test_resource_search_pagination( @pytest.mark.asyncio @pytest.mark.parametrize("endpoint", ["search", "find"]) -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_endpoints_handle_predict_errors( nucliadb_reader: AsyncClient, knowledgebox, @@ -1278,7 +1263,6 @@ async def test_search_two_logic_shards( assert len(content1["sentences"]["results"]) == len(content2["sentences"]["results"]) -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_min_score( nucliadb_reader: AsyncClient, knowledgebox, @@ -1300,7 +1284,6 @@ async def test_search_min_score( assert body["fulltext"]["min_score"] == 10 -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) @pytest.mark.parametrize( "facets,valid,error_message", [ @@ -1347,7 +1330,6 @@ async def test_facets_validation( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_marks_fuzzy_results( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -1405,7 +1387,6 @@ def check_fuzzy_paragraphs(search_response, *, fuzzy_result: bool, n_expected: i @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_by_path_filter( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -1461,7 +1442,6 @@ async def test_search_kb_not_found(nucliadb_reader: AsyncClient): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_search_query_param_is_optional(nucliadb_reader, knowledgebox): kb = knowledgebox # If query is not present, should not fail @@ -1475,7 +1455,6 @@ async def test_resource_search_query_param_is_optional(nucliadb_reader, knowledg @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_with_duplicates(nucliadb_reader, knowledgebox): kb = knowledgebox resp = await nucliadb_reader.get(f"/kb/{kb}/search?with_duplicates=True") @@ -1495,7 +1474,6 @@ def search_with_limits_exceeded_error(): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_handles_limits_exceeded_error( nucliadb_reader, knowledgebox, search_with_limits_exceeded_error ): @@ -1510,7 +1488,6 @@ async def test_search_handles_limits_exceeded_error( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) @pytest.mark.skipif("pg" in TESTING_MAINDB_DRIVERS, reason="PG catalog cannot do shards") async def test_catalog_returns_shard_and_node_data( nucliadb_reader: AsyncClient, @@ -1537,7 +1514,6 @@ async def test_catalog_returns_shard_and_node_data( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_catalog_post( nucliadb_reader: AsyncClient, knowledgebox, @@ -1579,7 +1555,6 @@ async def test_api_does_not_show_tracebacks_on_api_errors(not_debug, nucliadb_re @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_catalog_pagination( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -1632,7 +1607,6 @@ async def test_catalog_pagination( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_catalog_date_range_filtering( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -1675,7 +1649,6 @@ async def test_catalog_date_range_filtering( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_catalog_faceted( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -1705,7 +1678,6 @@ async def test_catalog_faceted( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_catalog_filters( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/search/test_search_date_ranges_filter.py b/nucliadb/tests/nucliadb/integration/search/test_search_date_ranges_filter.py index 475b4c48ca..22a540d044 100644 --- a/nucliadb/tests/nucliadb/integration/search/test_search_date_ranges_filter.py +++ b/nucliadb/tests/nucliadb/integration/search/test_search_date_ranges_filter.py @@ -80,7 +80,6 @@ async def resource(nucliadb_grpc, knowledgebox): "vector", ], ) -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_with_date_range_filters_nucliadb_dates( nucliadb_reader: AsyncClient, knowledgebox, @@ -138,7 +137,6 @@ async def test_search_with_date_range_filters_nucliadb_dates( "vector", ], ) -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_with_date_range_filters_origin_dates( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_api.py b/nucliadb/tests/nucliadb/integration/test_api.py index 33a4cfcfcd..fda219235b 100644 --- a/nucliadb/tests/nucliadb/integration/test_api.py +++ b/nucliadb/tests/nucliadb/integration/test_api.py @@ -92,7 +92,6 @@ async def test_kb_creation_allows_setting_learning_configuration( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_creation( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -219,7 +218,6 @@ async def iterate(value: BrokerMessage): @pytest.mark.asyncio -@pytest.mark.parametrize("channel", ("EXPERIMENTAL", "STABLE")) async def test_can_create_knowledgebox_with_colon_in_slug(nucliadb_manager: AsyncClient, channel): resp = await nucliadb_manager.post( "/kbs", @@ -233,7 +231,6 @@ async def test_can_create_knowledgebox_with_colon_in_slug(nucliadb_manager: Asyn @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_serialize_errors( nucliadb_writer: AsyncClient, nucliadb_reader: AsyncClient, @@ -284,7 +281,6 @@ async def test_serialize_errors( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_entitygroups( nucliadb_writer: AsyncClient, nucliadb_reader: AsyncClient, @@ -323,7 +319,6 @@ async def test_entitygroups( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_extracted_shortened_metadata( nucliadb_writer: AsyncClient, nucliadb_reader: AsyncClient, @@ -401,16 +396,12 @@ async def test_extracted_shortened_metadata( @pytest.mark.asyncio @pytest.mark.parametrize( - "field_id,error,knowledgebox", + "field_id,error", [ - ("foobar", False, "EXPERIMENTAL"), - ("My_Field_1", False, "EXPERIMENTAL"), - ("With Spaces Not Allowed", True, "EXPERIMENTAL"), - ("Invalid&Character", True, "EXPERIMENTAL"), - ("foobar", False, "STABLE"), - ("My_Field_1", False, "STABLE"), - ("With Spaces Not Allowed", True, "STABLE"), - ("Invalid&Character", True, "STABLE"), + ("foobar", False), + ("My_Field_1", False), + ("With Spaces Not Allowed", True), + ("Invalid&Character", True), ], ) async def test_field_ids_are_validated( @@ -438,7 +429,6 @@ async def test_field_ids_are_validated( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_extra( nucliadb_writer: AsyncClient, nucliadb_reader: AsyncClient, @@ -516,7 +506,6 @@ async def test_extra( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_icon_doesnt_change_after_labeling_resource_sc_5625( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -545,11 +534,6 @@ async def test_icon_doesnt_change_after_labeling_resource_sc_5625( @pytest.mark.asyncio -@pytest.mark.parametrize( - "knowledgebox", - ("STABLE", "EXPERIMENTAL"), - indirect=True, -) @pytest.mark.parametrize( "slug,valid", [ @@ -576,7 +560,6 @@ async def test_resource_slug_validation(nucliadb_writer, nucliadb_reader, knowle @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_icon_doesnt_change_after_adding_file_field_sc_2388( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -609,7 +592,6 @@ async def test_icon_doesnt_change_after_adding_file_field_sc_2388( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_language_metadata( nucliadb_writer, nucliadb_reader, @@ -682,7 +664,6 @@ async def test_language_metadata( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_story_7081( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -715,7 +696,6 @@ async def test_story_7081( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_question_answer( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -796,7 +776,6 @@ async def iterate(value: BrokerMessage): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_question_answer_annotations( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -852,7 +831,6 @@ async def test_question_answer_annotations( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_link_fields_store_css_selector( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -893,7 +871,6 @@ async def test_link_fields_store_css_selector( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_link_fields_store_xpath( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -977,7 +954,6 @@ async def test_pagination_limits( assert resp.status_code != 412 -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_dates_are_properly_validated( nucliadb_writer: AsyncClient, nucliadb_reader: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_ask.py b/nucliadb/tests/nucliadb/integration/test_ask.py index dfb2732fc9..af21c5c4b6 100644 --- a/nucliadb/tests/nucliadb/integration/test_ask.py +++ b/nucliadb/tests/nucliadb/integration/test_ask.py @@ -42,7 +42,6 @@ def audit(): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask( nucliadb_reader: AsyncClient, knowledgebox, @@ -71,7 +70,6 @@ def find_incomplete_results(): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_handles_incomplete_find_results( nucliadb_reader: AsyncClient, knowledgebox, @@ -99,7 +97,6 @@ async def resource(nucliadb_writer, knowledgebox): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_synchronous(nucliadb_reader: AsyncClient, knowledgebox, resource): resp = await nucliadb_reader.post( f"/kb/{knowledgebox}/ask", @@ -114,7 +111,6 @@ async def test_ask_synchronous(nucliadb_reader: AsyncClient, knowledgebox, resou @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_with_citations(nucliadb_reader: AsyncClient, knowledgebox, resource): citations = {"foo": [], "bar": []} # type: ignore citations_gen = CitationsGenerativeResponse(citations=citations) @@ -136,7 +132,6 @@ async def test_ask_with_citations(nucliadb_reader: AsyncClient, knowledgebox, re @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) @pytest.mark.parametrize("debug", (True, False)) async def test_sync_ask_returns_prompt_context( nucliadb_reader: AsyncClient, knowledgebox, resource, debug @@ -188,7 +183,6 @@ def parse_ask_response(resp): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_rag_options_full_resource(nucliadb_reader: AsyncClient, knowledgebox, resources): resource1, resource2 = resources @@ -221,7 +215,6 @@ async def test_ask_rag_options_full_resource(nucliadb_reader: AsyncClient, knowl @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_rag_options_extend_with_fields(nucliadb_reader: AsyncClient, knowledgebox, resources): resource1, resource2 = resources @@ -342,7 +335,6 @@ async def test_ask_rag_strategies_validation(nucliadb_reader, invalid_payload, e @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_capped_context(nucliadb_reader: AsyncClient, knowledgebox, resources): # By default, max size is big enough to fit all the prompt context resp = await nucliadb_reader.post( @@ -388,7 +380,6 @@ async def test_ask_on_a_kb_not_found(nucliadb_reader): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_max_tokens(nucliadb_reader, knowledgebox, resources): # As an integer resp = await nucliadb_reader.post( @@ -423,7 +414,6 @@ async def test_ask_max_tokens(nucliadb_reader, knowledgebox, resources): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_on_resource(nucliadb_reader: AsyncClient, knowledgebox, resource): resp = await nucliadb_reader.post( f"/kb/{knowledgebox}/resource/{resource}/ask", @@ -435,7 +425,6 @@ async def test_ask_on_resource(nucliadb_reader: AsyncClient, knowledgebox, resou @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_handles_stream_errors_on_predict(nucliadb_reader, knowledgebox, resource): predict = get_predict() prev = predict.ndjson_answer.copy() @@ -472,7 +461,6 @@ async def test_ask_handles_stream_errors_on_predict(nucliadb_reader, knowledgebo @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_handles_stream_unexpected_errors_sync(nucliadb_reader, knowledgebox, resource): with mock.patch( "nucliadb.search.search.chat.ask.AskResult._stream", @@ -488,7 +476,6 @@ async def test_ask_handles_stream_unexpected_errors_sync(nucliadb_reader, knowle @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_handles_stream_unexpected_errors_stream(nucliadb_reader, knowledgebox, resource): with mock.patch( "nucliadb.search.search.chat.ask.AskResult._stream", @@ -509,7 +496,6 @@ async def test_ask_handles_stream_unexpected_errors_stream(nucliadb_reader, know @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_with_json_schema_output( nucliadb_reader: AsyncClient, knowledgebox, @@ -544,7 +530,6 @@ async def test_ask_with_json_schema_output( @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_assert_audit_retrieval_contexts( nucliadb_reader: AsyncClient, knowledgebox, resources, audit ): @@ -558,7 +543,6 @@ async def test_ask_assert_audit_retrieval_contexts( @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_rag_strategy_neighbouring_paragraphs( nucliadb_reader: AsyncClient, knowledgebox, resources ): @@ -579,7 +563,6 @@ async def test_ask_rag_strategy_neighbouring_paragraphs( pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_rag_strategy_metadata_extension( nucliadb_reader: AsyncClient, knowledgebox, resources ): @@ -644,7 +627,6 @@ async def test_ask_rag_strategy_metadata_extension( assert origin_found, ask_response.prompt_context -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_top_k(nucliadb_reader: AsyncClient, knowledgebox, resources): resp = await nucliadb_reader.post( f"/kb/{knowledgebox}/ask", @@ -673,7 +655,6 @@ async def test_ask_top_k(nucliadb_reader: AsyncClient, knowledgebox, resources): assert ask_response.retrieval_results.best_matches[0] == prev_best_matches[0] -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_ask_rag_strategy_prequeries(nucliadb_reader: AsyncClient, knowledgebox, resources): resp = await nucliadb_reader.post( f"/kb/{knowledgebox}/ask", diff --git a/nucliadb/tests/nucliadb/integration/test_conversation.py b/nucliadb/tests/nucliadb/integration/test_conversation.py index c569ecc5e9..549a15dd2f 100644 --- a/nucliadb/tests/nucliadb/integration/test_conversation.py +++ b/nucliadb/tests/nucliadb/integration/test_conversation.py @@ -114,7 +114,6 @@ async def resource_with_conversation(nucliadb_grpc, nucliadb_writer, knowledgebo @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_conversations( nucliadb_reader: AsyncClient, knowledgebox, @@ -154,7 +153,6 @@ async def test_conversations( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_extracted_text_is_serialized_properly( nucliadb_reader: AsyncClient, knowledgebox, @@ -174,7 +172,6 @@ async def test_extracted_text_is_serialized_properly( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_find_conversations( nucliadb_reader: AsyncClient, knowledgebox, diff --git a/nucliadb/tests/nucliadb/integration/test_counters.py b/nucliadb/tests/nucliadb/integration/test_counters.py index 4e60e7f696..6edcd1da92 100644 --- a/nucliadb/tests/nucliadb/integration/test_counters.py +++ b/nucliadb/tests/nucliadb/integration/test_counters.py @@ -22,7 +22,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_counters( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_deletion.py b/nucliadb/tests/nucliadb/integration/test_deletion.py index a4219036c8..a193ba2db2 100644 --- a/nucliadb/tests/nucliadb/integration/test_deletion.py +++ b/nucliadb/tests/nucliadb/integration/test_deletion.py @@ -39,7 +39,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_paragraph_index_deletions( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_entities.py b/nucliadb/tests/nucliadb/integration/test_entities.py index 60f5393e58..769cca0b6c 100644 --- a/nucliadb/tests/nucliadb/integration/test_entities.py +++ b/nucliadb/tests/nucliadb/integration/test_entities.py @@ -211,7 +211,6 @@ async def entities( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_get_entities_groups( nucliadb_reader: AsyncClient, knowledgebox: str, @@ -242,7 +241,6 @@ async def test_get_entities_groups( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_list_entities_groups( nucliadb_reader: AsyncClient, knowledgebox: str, @@ -260,7 +258,6 @@ async def test_list_entities_groups( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_create_entities_group_twice( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -280,7 +277,6 @@ async def test_create_entities_group_twice( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_update_entities_group( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -311,7 +307,6 @@ async def test_update_entities_group( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_update_indexed_entities_group( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -340,7 +335,6 @@ async def test_update_indexed_entities_group( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_update_entities_group_metadata( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -365,7 +359,6 @@ async def test_update_entities_group_metadata( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_delete_entities_group( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -382,7 +375,6 @@ async def test_delete_entities_group( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_delete_and_recreate_entities_group( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -411,7 +403,6 @@ async def test_delete_and_recreate_entities_group( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_entities_indexing( nucliadb_reader: AsyncClient, knowledgebox: str, diff --git a/nucliadb/tests/nucliadb/integration/test_field_external_file.py b/nucliadb/tests/nucliadb/integration/test_field_external_file.py index 6e91419e40..f137e46d51 100644 --- a/nucliadb/tests/nucliadb/integration/test_field_external_file.py +++ b/nucliadb/tests/nucliadb/integration/test_field_external_file.py @@ -41,7 +41,6 @@ def nuclia_jwt_key(): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_external_file_field( nuclia_jwt_key, nucliadb_reader, diff --git a/nucliadb/tests/nucliadb/integration/test_find.py b/nucliadb/tests/nucliadb/integration/test_find.py index 8502ffef28..57da555dfc 100644 --- a/nucliadb/tests/nucliadb/integration/test_find.py +++ b/nucliadb/tests/nucliadb/integration/test_find.py @@ -29,7 +29,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_find_with_label_changes( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -101,7 +100,6 @@ async def test_find_with_label_changes( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_find_does_not_support_fulltext_search( nucliadb_reader: AsyncClient, knowledgebox, @@ -121,7 +119,6 @@ async def test_find_does_not_support_fulltext_search( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_find_resource_filters( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -176,7 +173,6 @@ async def test_find_resource_filters( assert rid in body["resources"] -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_find_min_score( nucliadb_reader: AsyncClient, knowledgebox, @@ -204,7 +200,6 @@ async def test_find_min_score( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_story_7286( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -264,7 +259,6 @@ async def test_story_7286( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_find_marks_fuzzy_results( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -362,7 +356,6 @@ def find_with_limits_exceeded_error(): @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_find_handles_limits_exceeded_error( nucliadb_reader, knowledgebox, find_with_limits_exceeded_error ): @@ -376,7 +369,6 @@ async def test_find_handles_limits_exceeded_error( assert resp.json() == {"detail": "over the quota"} -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_find_keyword_filters( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_labels.py b/nucliadb/tests/nucliadb/integration/test_labels.py index c7c42bc386..723a075f5f 100644 --- a/nucliadb/tests/nucliadb/integration/test_labels.py +++ b/nucliadb/tests/nucliadb/integration/test_labels.py @@ -162,7 +162,6 @@ async def inject_resource_with_paragraph_labels(knowledgebox, writer): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_labels_global( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -195,7 +194,6 @@ async def test_labels_global( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_classification_labels_cancelled_by_the_user( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -241,7 +239,6 @@ async def test_classification_labels_cancelled_by_the_user( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_classification_labels_are_shown_in_resource_basic( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -314,7 +311,6 @@ def test_add_field_classifications(): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_fieldmetadata_classification_labels( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_labelsets.py b/nucliadb/tests/nucliadb/integration/test_labelsets.py index ab24add10e..dbead98db8 100644 --- a/nucliadb/tests/nucliadb/integration/test_labelsets.py +++ b/nucliadb/tests/nucliadb/integration/test_labelsets.py @@ -23,7 +23,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_selection_labelsets( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_predict_proxy.py b/nucliadb/tests/nucliadb/integration/test_predict_proxy.py index 9c047d23a9..ea00d77ba9 100644 --- a/nucliadb/tests/nucliadb/integration/test_predict_proxy.py +++ b/nucliadb/tests/nucliadb/integration/test_predict_proxy.py @@ -23,7 +23,6 @@ @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) @pytest.mark.parametrize( "method,endpoint,params,payload", [ @@ -61,7 +60,6 @@ async def test_predict_proxy(nucliadb_reader, knowledgebox, method, endpoint, pa @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_predict_proxy_not_proxied_returns_422( nucliadb_reader, knowledgebox, diff --git a/nucliadb/tests/nucliadb/integration/test_processing_status.py b/nucliadb/tests/nucliadb/integration/test_processing_status.py index 4e373b53ba..84cba2c07e 100644 --- a/nucliadb/tests/nucliadb/integration/test_processing_status.py +++ b/nucliadb/tests/nucliadb/integration/test_processing_status.py @@ -38,7 +38,6 @@ ], ) @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_endpoint_set_resource_status_to_pending( endpoint, expected_status, diff --git a/nucliadb/tests/nucliadb/integration/test_purge_vectorsets.py b/nucliadb/tests/nucliadb/integration/test_purge_vectorsets.py index bd95b509f3..7da9a213a7 100644 --- a/nucliadb/tests/nucliadb/integration/test_purge_vectorsets.py +++ b/nucliadb/tests/nucliadb/integration/test_purge_vectorsets.py @@ -32,7 +32,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_purge_vectorsets( maindb_driver: Driver, storage: Storage, diff --git a/nucliadb/tests/nucliadb/integration/test_reindex.py b/nucliadb/tests/nucliadb/integration/test_reindex.py index e84d8a9016..cc39585863 100644 --- a/nucliadb/tests/nucliadb/integration/test_reindex.py +++ b/nucliadb/tests/nucliadb/integration/test_reindex.py @@ -22,7 +22,6 @@ import hashlib from functools import partial -import pytest from httpx import AsyncClient from nucliadb.common import datamanagers @@ -35,7 +34,6 @@ from tests.utils import inject_message -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_reindex( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -54,7 +52,6 @@ async def test_reindex_kb_with_vectorsets( await _test_reindex(nucliadb_reader, nucliadb_writer, nucliadb_grpc, knowledgebox_with_vectorsets) -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def _test_reindex( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_relations.py b/nucliadb/tests/nucliadb/integration/test_relations.py index 6cd79dc3ba..7fc861636e 100644 --- a/nucliadb/tests/nucliadb/integration/test_relations.py +++ b/nucliadb/tests/nucliadb/integration/test_relations.py @@ -58,7 +58,6 @@ async def resource_with_bm_relations( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_api_aliases( nucliadb_reader: AsyncClient, knowledgebox: str, @@ -95,7 +94,6 @@ async def test_api_aliases( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_broker_message_relations( nucliadb_reader: AsyncClient, knowledgebox: str, @@ -144,7 +142,6 @@ async def test_broker_message_relations( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_extracted_relations( nucliadb_grpc: WriterStub, nucliadb_reader: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_resources.py b/nucliadb/tests/nucliadb/integration/test_resources.py index 122a3a5f14..ef0dcf4b95 100644 --- a/nucliadb/tests/nucliadb/integration/test_resources.py +++ b/nucliadb/tests/nucliadb/integration/test_resources.py @@ -30,7 +30,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_crud( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -72,7 +71,6 @@ async def test_resource_crud( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_list_resources( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -109,7 +107,6 @@ async def test_list_resources( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_get_resource_field( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -141,7 +138,6 @@ async def test_get_resource_field( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_creation_slug_conflicts( nucliadb_writer: AsyncClient, knowledgebox, @@ -179,7 +175,6 @@ async def test_resource_creation_slug_conflicts( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_title_is_set_automatically_if_not_provided( nucliadb_reader, nucliadb_writer, @@ -201,7 +196,6 @@ async def test_title_is_set_automatically_if_not_provided( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) @pytest.mark.parametrize("update_by", ["slug", "uuid"]) async def test_resource_slug_modification( nucliadb_reader, @@ -254,7 +248,6 @@ async def check_resource(nucliadb_reader, kbid, rid, slug, **body_checks): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_slug_modification_rollbacks( nucliadb_reader, nucliadb_writer, @@ -292,7 +285,6 @@ async def test_resource_slug_modification_rollbacks( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_slug_modification_handles_conflicts( nucliadb_writer, knowledgebox, @@ -325,7 +317,6 @@ async def test_resource_slug_modification_handles_conflicts( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_slug_modification_handles_unknown_resources( nucliadb_writer, knowledgebox, @@ -340,7 +331,6 @@ async def test_resource_slug_modification_handles_unknown_resources( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_parallel_dup_resource_creation_raises_conflicts( nucliadb_writer, knowledgebox, diff --git a/nucliadb/tests/nucliadb/integration/test_security.py b/nucliadb/tests/nucliadb/integration/test_security.py index 2641cec38a..eb20565244 100644 --- a/nucliadb/tests/nucliadb/integration/test_security.py +++ b/nucliadb/tests/nucliadb/integration/test_security.py @@ -45,7 +45,6 @@ async def resource_with_security(nucliadb_writer, knowledgebox): return resp.json()["uuid"] -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_security_is_returned_serialization( nucliadb_reader, knowledgebox, resource_with_security ): @@ -58,7 +57,6 @@ async def test_resource_security_is_returned_serialization( assert set(resource["security"]["access_groups"]) == set([PLATFORM_GROUP, DEVELOPERS_GROUP]) -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_resource_security_is_updated( nucliadb_reader, nucliadb_writer, knowledgebox, resource_with_security ): @@ -86,7 +84,6 @@ async def test_resource_security_is_updated( assert resource["security"]["access_groups"] == [] -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) @pytest.mark.parametrize("search_endpoint", ("find_get", "find_post", "search_get", "search_post")) async def test_resource_security_search( nucliadb_reader, diff --git a/nucliadb/tests/nucliadb/integration/test_suggest.py b/nucliadb/tests/nucliadb/integration/test_suggest.py index 2ac74b0207..34d68fa710 100644 --- a/nucliadb/tests/nucliadb/integration/test_suggest.py +++ b/nucliadb/tests/nucliadb/integration/test_suggest.py @@ -27,7 +27,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_suggest_paragraphs( nucliadb_grpc: WriterStub, nucliadb_reader: AsyncClient, @@ -151,9 +150,6 @@ async def test_suggest_paragraphs( @pytest.mark.asyncio -# Old relations gives different suggest results. They are better but still different -# so we are not testing them for now. -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL",), indirect=True) async def test_suggest_related_entities( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, knowledgebox, request ): @@ -262,7 +258,6 @@ def assert_expected_entities(body, expected): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_suggestion_on_link_computed_titles_sc6088( nucliadb_writer, nucliadb_grpc, @@ -320,7 +315,6 @@ async def test_suggestion_on_link_computed_titles_sc6088( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_suggest_features( nucliadb_grpc: WriterStub, nucliadb_reader: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_summarize.py b/nucliadb/tests/nucliadb/integration/test_summarize.py index 224da9b2ea..f01099f20b 100644 --- a/nucliadb/tests/nucliadb/integration/test_summarize.py +++ b/nucliadb/tests/nucliadb/integration/test_summarize.py @@ -24,7 +24,6 @@ @pytest.mark.asyncio() -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_summarize( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_synonyms.py b/nucliadb/tests/nucliadb/integration/test_synonyms.py index dc99bae3ae..34cad5f6b9 100644 --- a/nucliadb/tests/nucliadb/integration/test_synonyms.py +++ b/nucliadb/tests/nucliadb/integration/test_synonyms.py @@ -21,7 +21,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_custom_synonyms_api( nucliadb_reader, nucliadb_writer, @@ -88,7 +87,6 @@ async def knowledgebox_with_synonyms(nucliadb_writer, knowledgebox): @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_with_synonyms( nucliadb_reader, nucliadb_writer, @@ -186,7 +184,6 @@ async def test_search_with_synonyms( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_search_errors_if_vectors_or_relations_requested( nucliadb_reader, knowledgebox, diff --git a/nucliadb/tests/nucliadb/integration/test_text_field_json.py b/nucliadb/tests/nucliadb/integration/test_text_field_json.py index 56cf41ff14..64fa9a8589 100644 --- a/nucliadb/tests/nucliadb/integration/test_text_field_json.py +++ b/nucliadb/tests/nucliadb/integration/test_text_field_json.py @@ -26,7 +26,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_text_field_in_json_format( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -59,7 +58,6 @@ async def test_text_field_in_json_format( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_text_field_with_invalid_json( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_tokens.py b/nucliadb/tests/nucliadb/integration/test_tokens.py index ad8a12f4d3..67a9a2b077 100644 --- a/nucliadb/tests/nucliadb/integration/test_tokens.py +++ b/nucliadb/tests/nucliadb/integration/test_tokens.py @@ -23,7 +23,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_metadata_tokens_cancelled_by_the_user_sc_3775( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_upload.py b/nucliadb/tests/nucliadb/integration/test_upload.py index 7fc67fe28a..65f55af0f8 100644 --- a/nucliadb/tests/nucliadb/integration/test_upload.py +++ b/nucliadb/tests/nucliadb/integration/test_upload.py @@ -26,7 +26,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_upload( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -66,7 +65,6 @@ async def test_upload( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_upload_guesses_content_type( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_usermetadata.py b/nucliadb/tests/nucliadb/integration/test_usermetadata.py index 5932eb71fc..01b3c052ba 100644 --- a/nucliadb/tests/nucliadb/integration/test_usermetadata.py +++ b/nucliadb/tests/nucliadb/integration/test_usermetadata.py @@ -22,7 +22,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_labels_sc_2053( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, diff --git a/nucliadb/tests/nucliadb/integration/test_vectorsets.py b/nucliadb/tests/nucliadb/integration/test_vectorsets.py index 9a7d0cd38a..86a5e025b3 100644 --- a/nucliadb/tests/nucliadb/integration/test_vectorsets.py +++ b/nucliadb/tests/nucliadb/integration/test_vectorsets.py @@ -59,7 +59,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_vectorsets_work_on_a_kb_with_a_single_vectorset( nucliadb_reader: AsyncClient, nucliadb_writer: AsyncClient, @@ -114,7 +113,6 @@ async def test_vectorsets_work_on_a_kb_with_a_single_vectorset( [(None, ""), ("", ""), ("myvectorset", "myvectorset")], ) @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_vectorset_parameter_without_default_vectorset( nucliadb_reader: AsyncClient, knowledgebox: str, @@ -173,7 +171,6 @@ async def mock_node_query(kbid: str, method, pb_query: nodereader_pb2.SearchRequ [(None, "multilingual"), ("", "multilingual"), ("myvectorset", "myvectorset")], ) @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_vectorset_parameter_with_default_vectorset( nucliadb_reader: AsyncClient, knowledgebox: str, diff --git a/nucliadb/tests/nucliadb/integration/test_visual_selections.py b/nucliadb/tests/nucliadb/integration/test_visual_selections.py index 7f5e203b92..6992f10a01 100644 --- a/nucliadb/tests/nucliadb/integration/test_visual_selections.py +++ b/nucliadb/tests/nucliadb/integration/test_visual_selections.py @@ -97,7 +97,6 @@ async def annotated_file_field( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_visual_selection(nucliadb_reader: AsyncClient, knowledgebox: str, annotated_file_field): kbid = knowledgebox rid, field_id = annotated_file_field diff --git a/nucliadb/tests/train/test_field_classification.py b/nucliadb/tests/train/test_field_classification.py index e2982e57c5..8ed0c6162d 100644 --- a/nucliadb/tests/train/test_field_classification.py +++ b/nucliadb/tests/train/test_field_classification.py @@ -34,7 +34,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generator_field_classification( train_rest_api: aiohttp.ClientSession, knowledgebox_with_labels: str, diff --git a/nucliadb/tests/train/test_field_streaming.py b/nucliadb/tests/train/test_field_streaming.py index 5e82144a35..4d92933c84 100644 --- a/nucliadb/tests/train/test_field_streaming.py +++ b/nucliadb/tests/train/test_field_streaming.py @@ -38,7 +38,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generator_field_streaming( train_rest_api: aiohttp.ClientSession, nucliadb_grpc: WriterStub, diff --git a/nucliadb/tests/train/test_image_classification.py b/nucliadb/tests/train/test_image_classification.py index badb1e1212..c71243d997 100644 --- a/nucliadb/tests/train/test_image_classification.py +++ b/nucliadb/tests/train/test_image_classification.py @@ -51,7 +51,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generation_image_classification( train_rest_api: aiohttp.ClientSession, knowledgebox: str, diff --git a/nucliadb/tests/train/test_list_sentences.py b/nucliadb/tests/train/test_list_sentences.py index a5b73d6df1..851f68b381 100644 --- a/nucliadb/tests/train/test_list_sentences.py +++ b/nucliadb/tests/train/test_list_sentences.py @@ -42,7 +42,6 @@ async def test_list_sentences( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_list_sentences_shows_ners_with_positions( train_client: TrainStub, knowledgebox: str, test_pagination_resources ) -> None: diff --git a/nucliadb/tests/train/test_paragraph_classification.py b/nucliadb/tests/train/test_paragraph_classification.py index 7f913840fa..858406c710 100644 --- a/nucliadb/tests/train/test_paragraph_classification.py +++ b/nucliadb/tests/train/test_paragraph_classification.py @@ -35,7 +35,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generator_paragraph_classification( train_rest_api: aiohttp.ClientSession, nucliadb_grpc: WriterStub, diff --git a/nucliadb/tests/train/test_paragraph_streaming.py b/nucliadb/tests/train/test_paragraph_streaming.py index b644c05dca..829da29096 100644 --- a/nucliadb/tests/train/test_paragraph_streaming.py +++ b/nucliadb/tests/train/test_paragraph_streaming.py @@ -50,7 +50,6 @@ async def get_paragraph_streaming_batch_from_response( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generator_paragraph_streaming( train_rest_api: aiohttp.ClientSession, nucliadb_grpc: WriterStub, diff --git a/nucliadb/tests/train/test_question_answer_streaming.py b/nucliadb/tests/train/test_question_answer_streaming.py index a4bbf463d4..566d49934e 100644 --- a/nucliadb/tests/train/test_question_answer_streaming.py +++ b/nucliadb/tests/train/test_question_answer_streaming.py @@ -52,7 +52,6 @@ async def get_question_answer_streaming_batch_from_response( @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generator_question_answer_streaming( train_rest_api: aiohttp.ClientSession, nucliadb_grpc: WriterStub, @@ -161,7 +160,6 @@ def smb_wonder_bm(kbid: str) -> BrokerMessage: @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generator_question_answer_streaming_streams_qa_annotations( train_rest_api: aiohttp.ClientSession, writer_rest_api: aiohttp.ClientSession, diff --git a/nucliadb/tests/train/test_sentence_classification.py b/nucliadb/tests/train/test_sentence_classification.py index 2f7d83c407..8e179aad59 100644 --- a/nucliadb/tests/train/test_sentence_classification.py +++ b/nucliadb/tests/train/test_sentence_classification.py @@ -35,7 +35,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generator_sentence_classification( train_rest_api: aiohttp.ClientSession, nucliadb_grpc: WriterStub, diff --git a/nucliadb/tests/train/test_token_classification.py b/nucliadb/tests/train/test_token_classification.py index 8c1c3915d7..23befe3908 100644 --- a/nucliadb/tests/train/test_token_classification.py +++ b/nucliadb/tests/train/test_token_classification.py @@ -35,7 +35,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("knowledgebox", ["STABLE", "EXPERIMENTAL"], indirect=True) async def test_generator_token_classification( train_rest_api: aiohttp.ClientSession, knowledgebox_with_entities: str, diff --git a/nucliadb_performance/nucliadb_performance/standalone/test_search.py b/nucliadb_performance/nucliadb_performance/standalone/test_search.py index 29a2f8416f..984e112702 100644 --- a/nucliadb_performance/nucliadb_performance/standalone/test_search.py +++ b/nucliadb_performance/nucliadb_performance/standalone/test_search.py @@ -66,7 +66,7 @@ def get_test_kb(): def create_kb(kb_slug: str): ndb = get_nucliadb_client(local=True) - release_channel = ReleaseChannel.EXPERIMENTAL if "experimental" in kb_slug else ReleaseChannel.STABLE + release_channel = ReleaseChannel.STABLE print(f"Creating KB {kb_slug}...") ndb.writer.create_knowledge_box(slug=kb_slug, release_channel=release_channel) diff --git a/nucliadb_sidecar/tests/fixtures.py b/nucliadb_sidecar/tests/fixtures.py index cda425b6ee..c2384ea848 100644 --- a/nucliadb_sidecar/tests/fixtures.py +++ b/nucliadb_sidecar/tests/fixtures.py @@ -320,7 +320,7 @@ async def worker( @pytest.fixture(scope="function") async def shard(request, writer_stub: NodeWriterStub) -> AsyncIterable[str]: - channel = ReleaseChannel.EXPERIMENTAL if request.param == "EXPERIMENTAL" else ReleaseChannel.STABLE + channel = ReleaseChannel.STABLE request = NewShardRequest(kbid="test", release_channel=channel) shard: ShardCreated = await writer_stub.NewShard(request) # type: ignore @@ -332,7 +332,7 @@ async def shard(request, writer_stub: NodeWriterStub) -> AsyncIterable[str]: @pytest.fixture(scope="function") async def bunch_of_shards(request, writer_stub: NodeWriterStub) -> AsyncIterable[list[str]]: - channel = ReleaseChannel.EXPERIMENTAL if request.param == "EXPERIMENTAL" else ReleaseChannel.STABLE + channel = ReleaseChannel.STABLE request = NewShardRequest(kbid="test", release_channel=channel) try: diff --git a/nucliadb_sidecar/tests/integration/test_indexing.py b/nucliadb_sidecar/tests/integration/test_indexing.py index a38c3d505a..d4376d1275 100644 --- a/nucliadb_sidecar/tests/integration/test_indexing.py +++ b/nucliadb_sidecar/tests/integration/test_indexing.py @@ -44,7 +44,6 @@ @pytest.mark.asyncio -@pytest.mark.parametrize("shard", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_indexing(worker, shard: str, reader: Reader): node = settings.force_host_id @@ -83,7 +82,6 @@ async def test_indexing(worker, shard: str, reader: Reader): @pytest.mark.asyncio -@pytest.mark.parametrize("shard", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_prioritary_indexing_on_one_shard( worker, shard: str, @@ -210,7 +208,6 @@ async def run_or_fail(func, fail_ratio: float, *args, **kwargs): settings.indexer_delay_after_error = original_delay @pytest.mark.asyncio - @pytest.mark.parametrize("bunch_of_shards", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test( self, bunch_of_shards: list[str], @@ -289,7 +286,6 @@ async def test_indexing_not_found(worker, reader): @pytest.mark.asyncio -@pytest.mark.parametrize("shard", ("EXPERIMENTAL", "STABLE"), indirect=True) async def test_indexing_publishes_to_sidecar_index_stream(worker, shard: str, natsd): node_id = settings.force_host_id assert node_id From 229cd682b148d6f1afa2cefd810c5b844afdbc93 Mon Sep 17 00:00:00 2001 From: Ferran Llamas Date: Thu, 12 Sep 2024 17:19:10 +0200 Subject: [PATCH 2/5] Remove more from python --- nucliadb/src/nucliadb/common/cluster/base.py | 6 +- .../src/nucliadb/common/cluster/manager.py | 2 - .../src/nucliadb/common/cluster/rollover.py | 2 - .../src/nucliadb/ingest/orm/knowledgebox.py | 26 +------ .../nucliadb/writer/api/v1/knowledgebox.py | 2 - .../integration/orm/test_orm_knowledgebox.py | 29 +++----- .../orm/test_knowledgebox_release_channel.py | 70 ------------------- .../tests/nucliadb/integration/test_purge.py | 29 +------- .../src/nucliadb_models/resource.py | 19 ++--- .../tests/integration/test_indexing.py | 5 -- 10 files changed, 21 insertions(+), 169 deletions(-) delete mode 100644 nucliadb/tests/ingest/unit/orm/test_knowledgebox_release_channel.py diff --git a/nucliadb/src/nucliadb/common/cluster/base.py b/nucliadb/src/nucliadb/common/cluster/base.py index 4f358a68f2..aaa7aba30f 100644 --- a/nucliadb/src/nucliadb/common/cluster/base.py +++ b/nucliadb/src/nucliadb/common/cluster/base.py @@ -93,12 +93,11 @@ async def get_shard(self, shard_id: str) -> noderesources_pb2.Shard: async def new_shard( self, kbid: str, - release_channel: utils_pb2.ReleaseChannel.ValueType, vector_index_config: VectorIndexConfig, ) -> noderesources_pb2.ShardCreated: req = NewShardRequest( kbid=kbid, - release_channel=release_channel, + release_channel=utils_pb2.ReleaseChannel.STABLE, config=vector_index_config, # Deprecated fields, only for backwards compatibility with older nodes similarity=vector_index_config.similarity, @@ -111,12 +110,11 @@ async def new_shard( async def new_shard_with_vectorsets( self, kbid: str, - release_channel: utils_pb2.ReleaseChannel.ValueType, vectorsets_configs: dict[str, VectorIndexConfig], ) -> noderesources_pb2.ShardCreated: req = NewShardRequest( kbid=kbid, - release_channel=release_channel, + release_channel=utils_pb2.ReleaseChannel.STABLE, vectorsets_configs=vectorsets_configs, ) diff --git a/nucliadb/src/nucliadb/common/cluster/manager.py b/nucliadb/src/nucliadb/common/cluster/manager.py index 86891e644d..1835e58cc7 100644 --- a/nucliadb/src/nucliadb/common/cluster/manager.py +++ b/nucliadb/src/nucliadb/common/cluster/manager.py @@ -244,14 +244,12 @@ async def create_shard_by_kbid( shard_created = await node.new_shard( kbid, - release_channel=kb_shards.release_channel, vector_index_config=vector_index_config, ) else: shard_created = await node.new_shard_with_vectorsets( kbid, - release_channel=kb_shards.release_channel, vectorsets_configs=vectorsets, ) diff --git a/nucliadb/src/nucliadb/common/cluster/rollover.py b/nucliadb/src/nucliadb/common/cluster/rollover.py index 9e14defa26..646fb759cb 100644 --- a/nucliadb/src/nucliadb/common/cluster/rollover.py +++ b/nucliadb/src/nucliadb/common/cluster/rollover.py @@ -167,13 +167,11 @@ async def create_rollover_shards( ) shard_created = await node.new_shard( kbid, - release_channel=kb_shards.release_channel, vector_index_config=vector_index_config, ) else: shard_created = await node.new_shard_with_vectorsets( kbid, - release_channel=kb_shards.release_channel, vectorsets_configs=vectorsets, ) except Exception as e: diff --git a/nucliadb/src/nucliadb/ingest/orm/knowledgebox.py b/nucliadb/src/nucliadb/ingest/orm/knowledgebox.py index f89c244b5e..b0e31034d7 100644 --- a/nucliadb/src/nucliadb/ingest/orm/knowledgebox.py +++ b/nucliadb/src/nucliadb/ingest/orm/knowledgebox.py @@ -19,7 +19,7 @@ # from datetime import datetime from functools import partial -from typing import Any, AsyncGenerator, Callable, Coroutine, Optional, Sequence, cast +from typing import Any, AsyncGenerator, Callable, Coroutine, Optional, Sequence from uuid import uuid4 from grpc import StatusCode @@ -48,7 +48,7 @@ from nucliadb.ingest.orm.resource import Resource from nucliadb.ingest.orm.utils import choose_matryoshka_dimension, compute_paragraph_key from nucliadb.migrator.utils import get_latest_version -from nucliadb_protos import knowledgebox_pb2, nodewriter_pb2, utils_pb2, writer_pb2 +from nucliadb_protos import knowledgebox_pb2, nodewriter_pb2, writer_pb2 from nucliadb_protos.knowledgebox_pb2 import ( CreateExternalIndexProviderMetadata, ExternalIndexProviderType, @@ -58,13 +58,10 @@ ) from nucliadb_protos.resources_pb2 import Basic from nucliadb_protos.utils_pb2 import ReleaseChannel -from nucliadb_utils import const -from nucliadb_utils.settings import running_settings from nucliadb_utils.storages.storage import Storage from nucliadb_utils.utilities import ( get_audit, get_storage, - has_feature, ) # XXX Eventually all these keys should be moved to datamanagers.kb @@ -104,7 +101,6 @@ async def create( title: str = "", description: str = "", semantic_models: Optional[dict[str, SemanticModelMetadata]] = None, - release_channel: Optional[ReleaseChannel.ValueType] = ReleaseChannel.STABLE, external_index_provider: CreateExternalIndexProviderMetadata = CreateExternalIndexProviderMetadata(), ) -> tuple[str, str]: """Creates a new knowledge box and return its id and slug.""" @@ -116,8 +112,6 @@ async def create( if semantic_models is None or len(semantic_models) == 0: raise KnowledgeBoxCreationError("KB must define at least one semantic model") - release_channel = cast(ReleaseChannel.ValueType, release_channel_for_kb(slug, release_channel)) - rollback_ops: list[Callable[[], Coroutine[Any, Any, Any]]] = [] try: @@ -139,7 +133,7 @@ async def create( kb_shards.kbid = kbid # B/c with Shards.actual kb_shards.actual = -1 - kb_shards.release_channel = release_channel + kb_shards.release_channel = ReleaseChannel.STABLE vs_external_indexes = [] for vectorset_id, semantic_model in semantic_models.items(): # type: ignore @@ -498,20 +492,6 @@ async def _maybe_delete_external_indexes( await PineconeIndexManager.delete_indexes(kbid, stored) -def release_channel_for_kb( - slug: str, release_channel: Optional[ReleaseChannel.ValueType] -) -> ReleaseChannel.ValueType: - if running_settings.running_environment == "stage" and has_feature( - const.Features.EXPERIMENTAL_KB, context={"slug": slug} - ): - release_channel = utils_pb2.ReleaseChannel.EXPERIMENTAL - - if release_channel is None: - return utils_pb2.ReleaseChannel.STABLE - - return release_channel - - def chunker(seq: Sequence, size: int): return (seq[pos : pos + size] for pos in range(0, len(seq), size)) diff --git a/nucliadb/src/nucliadb/writer/api/v1/knowledgebox.py b/nucliadb/src/nucliadb/writer/api/v1/knowledgebox.py index a2b7f8d73c..349e8eb714 100644 --- a/nucliadb/src/nucliadb/writer/api/v1/knowledgebox.py +++ b/nucliadb/src/nucliadb/writer/api/v1/knowledgebox.py @@ -125,7 +125,6 @@ async def _rollback_learning_config(kbid: str): rollback_learning_config = partial(_rollback_learning_config, kbid) semantic_models = learning_config.into_semantic_models_metadata() - release_channel = item.release_channel.to_pb() if item.release_channel is not None else None external_index_provider = knowledgebox_pb2.CreateExternalIndexProviderMetadata( type=knowledgebox_pb2.ExternalIndexProviderType.UNSET, @@ -152,7 +151,6 @@ async def _rollback_learning_config(kbid: str): title=item.title or "", description=item.description or "", semantic_models=semantic_models, - release_channel=release_channel, external_index_provider=external_index_provider, ) diff --git a/nucliadb/tests/ingest/integration/orm/test_orm_knowledgebox.py b/nucliadb/tests/ingest/integration/orm/test_orm_knowledgebox.py index 80af81f7a8..e0e7590f3e 100644 --- a/nucliadb/tests/ingest/integration/orm/test_orm_knowledgebox.py +++ b/nucliadb/tests/ingest/integration/orm/test_orm_knowledgebox.py @@ -18,7 +18,7 @@ # along with this program. If not, see . # import uuid -from unittest.mock import AsyncMock, patch +from unittest.mock import AsyncMock import pytest @@ -27,6 +27,7 @@ from nucliadb.common.maindb.driver import Driver from nucliadb.ingest.orm.exceptions import KnowledgeBoxConflict, KnowledgeBoxCreationError from nucliadb.ingest.orm.knowledgebox import KnowledgeBox, chunker +from nucliadb_models.resource import ReleaseChannel from nucliadb_protos import utils_pb2 from nucliadb_protos.knowledgebox_pb2 import SemanticModelMetadata from nucliadb_utils.storages.storage import Storage @@ -143,34 +144,22 @@ async def test_create_knowledgebox_without_vectorsets_is_not_allowed( await KnowledgeBox.create(maindb_driver, kbid="kbid", slug="slug", semantic_models={}) -@pytest.mark.parametrize( - "release_channel", - [ - utils_pb2.ReleaseChannel.STABLE, - utils_pb2.ReleaseChannel.EXPERIMENTAL, - ], -) @pytest.mark.asyncio async def test_create_knowledgebox_with_release_channel( storage: Storage, maindb_driver: Driver, shard_manager: cluster_manager.KBShardManager, - release_channel: utils_pb2.ReleaseChannel.ValueType, ): - with patch("nucliadb.ingest.orm.knowledgebox.release_channel_for_kb") as mock: - mock.return_value = release_channel - - kbid, _ = await KnowledgeBox.create( - maindb_driver, - kbid=KnowledgeBox.new_unique_kbid(), - slug="mykbslug", - semantic_models={"my-semantic-model": SemanticModelMetadata()}, - ) - + kbid, _ = await KnowledgeBox.create( + maindb_driver, + kbid=KnowledgeBox.new_unique_kbid(), + slug="mykbslug", + semantic_models={"my-semantic-model": SemanticModelMetadata()}, + ) async with maindb_driver.transaction(read_only=True) as txn: shards = await datamanagers.cluster.get_kb_shards(txn, kbid=kbid) assert shards is not None - assert shards.release_channel == release_channel + assert shards.release_channel == ReleaseChannel.STABLE @pytest.mark.asyncio diff --git a/nucliadb/tests/ingest/unit/orm/test_knowledgebox_release_channel.py b/nucliadb/tests/ingest/unit/orm/test_knowledgebox_release_channel.py deleted file mode 100644 index 0fece69174..0000000000 --- a/nucliadb/tests/ingest/unit/orm/test_knowledgebox_release_channel.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (C) 2021 Bosutech XXI S.L. -# -# nucliadb is offered under the AGPL v3.0 and as commercial software. -# For commercial licensing, contact us at info@nuclia.com. -# -# AGPL: -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -from unittest.mock import Mock, patch - -import pytest - -from nucliadb.ingest.orm.knowledgebox import release_channel_for_kb -from nucliadb_protos.utils_pb2 import ReleaseChannel - - -@pytest.mark.parametrize( - "slug,release_channel,has_feature,environment,expected_channel", - [ - ( - "foo", - ReleaseChannel.EXPERIMENTAL, - False, - "prod", - ReleaseChannel.EXPERIMENTAL, - ), - ( - "foo", - ReleaseChannel.STABLE, - True, - "prod", - ReleaseChannel.STABLE, - ), - ( - "foo", - ReleaseChannel.STABLE, - True, - "stage", - ReleaseChannel.EXPERIMENTAL, - ), - ( - "foo", - ReleaseChannel.STABLE, - False, - "stage", - ReleaseChannel.STABLE, - ), - ], -) -def test_release_channel_default_and_overwrite( - slug: str, release_channel, has_feature, environment, expected_channel -): - module = "nucliadb.ingest.orm.knowledgebox" - with ( - patch(f"{module}.has_feature", return_value=has_feature), - patch(f"{module}.running_settings", new=Mock(running_environment=environment)), - ): - assert release_channel_for_kb(slug, release_channel) == expected_channel diff --git a/nucliadb/tests/nucliadb/integration/test_purge.py b/nucliadb/tests/nucliadb/integration/test_purge.py index 5848c7520e..3e92157eaf 100644 --- a/nucliadb/tests/nucliadb/integration/test_purge.py +++ b/nucliadb/tests/nucliadb/integration/test_purge.py @@ -33,31 +33,23 @@ ) from nucliadb.purge import purge_kb, purge_kb_storage from nucliadb.purge.orphan_shards import detect_orphan_shards, purge_orphan_shards -from nucliadb_models.resource import ReleaseChannel from nucliadb_protos import nodewriter_pb2, utils_pb2, writer_pb2 from nucliadb_utils.storages.storage import Storage @pytest.mark.asyncio -@pytest.mark.parametrize( - "release_channel", - [ReleaseChannel.EXPERIMENTAL, ReleaseChannel.STABLE], -) async def test_purge_deletes_everything_from_maindb( maindb_driver: Driver, storage: Storage, nucliadb_manager: AsyncClient, nucliadb_writer: AsyncClient, - release_channel: str, ): """Create a KB and some resource and then purge it. Validate that purge removes every key from maindb """ kb_slug = str(uuid.uuid4()) - resp = await nucliadb_manager.post( - "/kbs", json={"slug": kb_slug, "release_channel": release_channel} - ) + resp = await nucliadb_manager.post("/kbs", json={"slug": kb_slug}) assert resp.status_code == 201 kbid = resp.json().get("uuid") @@ -105,25 +97,18 @@ async def test_purge_deletes_everything_from_maindb( @pytest.mark.asyncio -@pytest.mark.parametrize( - "release_channel", - [ReleaseChannel.EXPERIMENTAL, ReleaseChannel.STABLE], -) async def test_purge_orphan_shards( maindb_driver: Driver, storage: Storage, nucliadb_manager: AsyncClient, nucliadb_writer: AsyncClient, - release_channel: str, ): """Create a KB with some resource (hence a shard) and delete it. Simulate an index node is down and validate orphan shards purge works as expected. """ kb_slug = str(uuid.uuid4()) - resp = await nucliadb_manager.post( - "/kbs", json={"slug": kb_slug, "release_channel": release_channel} - ) + resp = await nucliadb_manager.post("/kbs", json={"slug": kb_slug}) assert resp.status_code == 201 kbid = resp.json().get("uuid") @@ -172,16 +157,11 @@ async def test_purge_orphan_shards( @pytest.mark.asyncio -@pytest.mark.parametrize( - "release_channel", - [ReleaseChannel.EXPERIMENTAL, ReleaseChannel.STABLE], -) async def test_purge_orphan_shard_detection( maindb_driver: Driver, storage: Storage, nucliadb_manager: AsyncClient, nucliadb_writer: AsyncClient, - release_channel: str, ): """Prepare a situation where there are: - a regular KB @@ -192,9 +172,7 @@ async def test_purge_orphan_shard_detection( """ # Regular KB kb_slug = str(uuid.uuid4()) - resp = await nucliadb_manager.post( - "/kbs", json={"slug": kb_slug, "release_channel": release_channel} - ) + resp = await nucliadb_manager.post("/kbs", json={"slug": kb_slug}) assert resp.status_code == 201 kbid = resp.json().get("uuid") @@ -203,7 +181,6 @@ async def test_purge_orphan_shard_detection( node = random.choice(available_nodes) orphan_shard = await node.new_shard( kbid="deleted-kb", - release_channel=utils_pb2.ReleaseChannel.STABLE, vector_index_config=nodewriter_pb2.VectorIndexConfig( similarity=utils_pb2.VectorSimilarity.COSINE, normalize_vectors=False, diff --git a/nucliadb_models/src/nucliadb_models/resource.py b/nucliadb_models/src/nucliadb_models/resource.py index 281c51273d..d96e80964f 100644 --- a/nucliadb_models/src/nucliadb_models/resource.py +++ b/nucliadb_models/src/nucliadb_models/resource.py @@ -53,7 +53,6 @@ from nucliadb_models.utils import SlugString from nucliadb_models.vectors import SemanticModelMetadata, VectorSimilarity from nucliadb_protos.knowledgebox_pb2 import KnowledgeBoxConfig as PBKnowledgeBoxConfig -from nucliadb_protos.utils_pb2 import ReleaseChannel as PBReleaseChannel _T = TypeVar("_T") @@ -82,23 +81,13 @@ class ExtractedDataTypeName(str, Enum): class ReleaseChannel(str, Enum): + """ + Deprecated. No longer used. + """ + STABLE = "STABLE" EXPERIMENTAL = "EXPERIMENTAL" - def to_pb(self) -> PBReleaseChannel.ValueType: - return RELEASE_CHANNEL_ENUM_TO_PB[self.value] - - @classmethod - def from_message(cls, message: PBReleaseChannel.ValueType): - return cls(RELEASE_CHANNEL_PB_TO_ENUM[message]) - - -RELEASE_CHANNEL_ENUM_TO_PB = { - ReleaseChannel.STABLE.value: PBReleaseChannel.STABLE, - ReleaseChannel.EXPERIMENTAL.value: PBReleaseChannel.EXPERIMENTAL, -} -RELEASE_CHANNEL_PB_TO_ENUM = {v: k for k, v in RELEASE_CHANNEL_ENUM_TO_PB.items()} - class KnowledgeBoxConfig(BaseModel): slug: Optional[SlugString] = Field( diff --git a/nucliadb_node_binding/tests/integration/test_indexing.py b/nucliadb_node_binding/tests/integration/test_indexing.py index cb0731bb26..6b2a33f340 100644 --- a/nucliadb_node_binding/tests/integration/test_indexing.py +++ b/nucliadb_node_binding/tests/integration/test_indexing.py @@ -85,11 +85,6 @@ async def test_set_and_search(data_path): return await _test_set_and_search(ReleaseChannel.STABLE) -@pytest.mark.asyncio -async def test_set_and_search_exp(data_path): - return await _test_set_and_search(ReleaseChannel.EXPERIMENTAL) - - async def _test_set_and_search(channel): cluster = IndexNode() From af34a06b21e1303f99697b337931b5f625b48eee Mon Sep 17 00:00:00 2001 From: Ferran Llamas Date: Thu, 12 Sep 2024 17:23:05 +0200 Subject: [PATCH 3/5] Remove more --- .../src/nucliadb/ingest/orm/knowledgebox.py | 2 -- nucliadb/tests/fixtures.py | 4 +--- .../integration/orm/test_orm_knowledgebox.py | 19 ------------------- .../tests/ingest/unit/service/test_writer.py | 1 - .../tests/nucliadb/integration/test_api.py | 7 ++----- .../src/nucliadb_models/resource.py | 5 ----- 6 files changed, 3 insertions(+), 35 deletions(-) diff --git a/nucliadb/src/nucliadb/ingest/orm/knowledgebox.py b/nucliadb/src/nucliadb/ingest/orm/knowledgebox.py index b0e31034d7..e201a16bbd 100644 --- a/nucliadb/src/nucliadb/ingest/orm/knowledgebox.py +++ b/nucliadb/src/nucliadb/ingest/orm/knowledgebox.py @@ -57,7 +57,6 @@ StoredExternalIndexProviderMetadata, ) from nucliadb_protos.resources_pb2 import Basic -from nucliadb_protos.utils_pb2 import ReleaseChannel from nucliadb_utils.storages.storage import Storage from nucliadb_utils.utilities import ( get_audit, @@ -133,7 +132,6 @@ async def create( kb_shards.kbid = kbid # B/c with Shards.actual kb_shards.actual = -1 - kb_shards.release_channel = ReleaseChannel.STABLE vs_external_indexes = [] for vectorset_id, semantic_model in semantic_models.items(): # type: ignore diff --git a/nucliadb/tests/fixtures.py b/nucliadb/tests/fixtures.py index c1744eee16..128810e93f 100644 --- a/nucliadb/tests/fixtures.py +++ b/nucliadb/tests/fixtures.py @@ -206,9 +206,7 @@ async def nucliadb_manager(nucliadb: Settings): @pytest.fixture(scope="function") async def knowledgebox(nucliadb_manager: AsyncClient): - resp = await nucliadb_manager.post( - "/kbs", json={"slug": "knowledgebox", "release_channel": "STABLE"} - ) + resp = await nucliadb_manager.post("/kbs", json={"slug": "knowledgebox"}) assert resp.status_code == 201 uuid = resp.json().get("uuid") diff --git a/nucliadb/tests/ingest/integration/orm/test_orm_knowledgebox.py b/nucliadb/tests/ingest/integration/orm/test_orm_knowledgebox.py index e0e7590f3e..4ee8408a09 100644 --- a/nucliadb/tests/ingest/integration/orm/test_orm_knowledgebox.py +++ b/nucliadb/tests/ingest/integration/orm/test_orm_knowledgebox.py @@ -27,7 +27,6 @@ from nucliadb.common.maindb.driver import Driver from nucliadb.ingest.orm.exceptions import KnowledgeBoxConflict, KnowledgeBoxCreationError from nucliadb.ingest.orm.knowledgebox import KnowledgeBox, chunker -from nucliadb_models.resource import ReleaseChannel from nucliadb_protos import utils_pb2 from nucliadb_protos.knowledgebox_pb2 import SemanticModelMetadata from nucliadb_utils.storages.storage import Storage @@ -144,24 +143,6 @@ async def test_create_knowledgebox_without_vectorsets_is_not_allowed( await KnowledgeBox.create(maindb_driver, kbid="kbid", slug="slug", semantic_models={}) -@pytest.mark.asyncio -async def test_create_knowledgebox_with_release_channel( - storage: Storage, - maindb_driver: Driver, - shard_manager: cluster_manager.KBShardManager, -): - kbid, _ = await KnowledgeBox.create( - maindb_driver, - kbid=KnowledgeBox.new_unique_kbid(), - slug="mykbslug", - semantic_models={"my-semantic-model": SemanticModelMetadata()}, - ) - async with maindb_driver.transaction(read_only=True) as txn: - shards = await datamanagers.cluster.get_kb_shards(txn, kbid=kbid) - assert shards is not None - assert shards.release_channel == ReleaseChannel.STABLE - - @pytest.mark.asyncio async def test_create_knowledgebox_with_same_kbid( storage: Storage, diff --git a/nucliadb/tests/ingest/unit/service/test_writer.py b/nucliadb/tests/ingest/unit/service/test_writer.py index e66c3ba06e..1970362e1b 100644 --- a/nucliadb/tests/ingest/unit/service/test_writer.py +++ b/nucliadb/tests/ingest/unit/service/test_writer.py @@ -100,7 +100,6 @@ async def test_NewKnowledgeBoxV2(self, writer: WriterServicer, hosted_nucliadb, ) for vs in request.vectorsets } - assert "release_channel" not in knowledgebox_class.create.call_args.kwargs async def test_NewKnowledgeBoxV2_with_matryoshka_dimensions( self, writer: WriterServicer, hosted_nucliadb, knowledgebox_class diff --git a/nucliadb/tests/nucliadb/integration/test_api.py b/nucliadb/tests/nucliadb/integration/test_api.py index fda219235b..144d7b79b8 100644 --- a/nucliadb/tests/nucliadb/integration/test_api.py +++ b/nucliadb/tests/nucliadb/integration/test_api.py @@ -218,11 +218,8 @@ async def iterate(value: BrokerMessage): @pytest.mark.asyncio -async def test_can_create_knowledgebox_with_colon_in_slug(nucliadb_manager: AsyncClient, channel): - resp = await nucliadb_manager.post( - "/kbs", - json={"slug": "something:else", "release_channel": channel}, - ) +async def test_can_create_knowledgebox_with_colon_in_slug(nucliadb_manager: AsyncClient): + resp = await nucliadb_manager.post("/kbs", json={"slug": "something:else"}) assert resp.status_code == 201 resp = await nucliadb_manager.get(f"/kbs") diff --git a/nucliadb_models/src/nucliadb_models/resource.py b/nucliadb_models/src/nucliadb_models/resource.py index d96e80964f..6ecba7379e 100644 --- a/nucliadb_models/src/nucliadb_models/resource.py +++ b/nucliadb_models/src/nucliadb_models/resource.py @@ -99,11 +99,6 @@ class KnowledgeBoxConfig(BaseModel): title="Description", description="Description for the Knowledge Box.", ) - release_channel: Optional[ReleaseChannel] = Field( - default=None, - title="Release Channel", - description="Release channel for the Knowledge Box.", - ) learning_configuration: Optional[Dict[str, Any]] = Field( default=None, title="Learning Configuration", From fb17638ff1b55593ec0f38f5dfc140efca3346c7 Mon Sep 17 00:00:00 2001 From: Ferran Llamas Date: Fri, 13 Sep 2024 14:16:25 +0200 Subject: [PATCH 4/5] Remove feature flag too --- nucliadb_utils/src/nucliadb_utils/const.py | 1 - nucliadb_utils/src/nucliadb_utils/featureflagging.py | 4 ---- 2 files changed, 5 deletions(-) diff --git a/nucliadb_utils/src/nucliadb_utils/const.py b/nucliadb_utils/src/nucliadb_utils/const.py index b4d7bb8fef..e4461f5652 100644 --- a/nucliadb_utils/src/nucliadb_utils/const.py +++ b/nucliadb_utils/src/nucliadb_utils/const.py @@ -72,7 +72,6 @@ class KB_IMPORTS: class Features: WAIT_FOR_INDEX = "nucliadb_wait_for_resource_index" - EXPERIMENTAL_KB = "nucliadb_experimental_kb" READ_REPLICA_SEARCHES = "nucliadb_read_replica_searches" VERSIONED_PRIVATE_PREDICT = "nucliadb_versioned_private_predict" REBALANCE_KB = "nucliadb_rebalance_kb" diff --git a/nucliadb_utils/src/nucliadb_utils/featureflagging.py b/nucliadb_utils/src/nucliadb_utils/featureflagging.py index 3184e688e1..7f737019b7 100644 --- a/nucliadb_utils/src/nucliadb_utils/featureflagging.py +++ b/nucliadb_utils/src/nucliadb_utils/featureflagging.py @@ -37,10 +37,6 @@ class Settings(pydantic_settings.BaseSettings): "rollout": 0, "variants": {"environment": ["none"]}, }, - const.Features.EXPERIMENTAL_KB: { - "rollout": 0, - "variants": {"environment": ["local"]}, - }, const.Features.READ_REPLICA_SEARCHES: { "rollout": 0, "variants": {"environment": ["local"]}, From cc302a7e13c71a9e231465b5c4753c3fddb85065 Mon Sep 17 00:00:00 2001 From: Ferran Llamas Date: Fri, 13 Sep 2024 14:18:17 +0200 Subject: [PATCH 5/5] Remove more --- .../nucliadb_performance/standalone/test_search.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nucliadb_performance/nucliadb_performance/standalone/test_search.py b/nucliadb_performance/nucliadb_performance/standalone/test_search.py index 984e112702..8df29d775f 100644 --- a/nucliadb_performance/nucliadb_performance/standalone/test_search.py +++ b/nucliadb_performance/nucliadb_performance/standalone/test_search.py @@ -21,7 +21,6 @@ from molotov import global_setup, global_teardown, scenario -from nucliadb_models.resource import ReleaseChannel from nucliadb_performance.settings import get_benchmark_output_file, settings from nucliadb_performance.utils.errors import print_errors from nucliadb_performance.utils.export_import import import_kb @@ -66,9 +65,8 @@ def get_test_kb(): def create_kb(kb_slug: str): ndb = get_nucliadb_client(local=True) - release_channel = ReleaseChannel.STABLE print(f"Creating KB {kb_slug}...") - ndb.writer.create_knowledge_box(slug=kb_slug, release_channel=release_channel) + ndb.writer.create_knowledge_box(slug=kb_slug) def import_test_data(kb_slug: str):