diff --git a/api/src/opentrons/config/advanced_settings.py b/api/src/opentrons/config/advanced_settings.py index 6a6076a8432..f65b5824eb1 100644 --- a/api/src/opentrons/config/advanced_settings.py +++ b/api/src/opentrons/config/advanced_settings.py @@ -159,19 +159,6 @@ class Setting(NamedTuple): robot_type=[RobotTypeEnum.OT2], default_true_on_robot_types=[RobotTypeEnum.FLEX], ), - SettingDefinition( - _id="disableFastProtocolUpload", - title="Use older protocol analysis method", - description=( - "Use an older, slower method of analyzing uploaded protocols. " - "This changes how the OT-2 validates your protocol during the upload " - "step, but does not affect how your protocol actually runs. " - "Opentrons Support might ask you to change this setting if you encounter " - "problems with the newer, faster protocol analysis method." - ), - restart_required=False, - robot_type=[RobotTypeEnum.OT2, RobotTypeEnum.FLEX], - ), SettingDefinition( _id="enableOT3HardwareController", title="Enable experimental OT-3 hardware controller", @@ -729,6 +716,16 @@ def _migrate32to33(previous: SettingsMap) -> SettingsMap: return newmap +def _migrate33to34(previous: SettingsMap) -> SettingsMap: + """Migrate to version 34 of the feature flags file. + + - Removes disableFastProtocolUpload + """ + removals = ["disableFastProtocolUpload"] + newmap = {k: v for k, v in previous.items() if k not in removals} + return newmap + + _MIGRATIONS = [ _migrate0to1, _migrate1to2, @@ -763,6 +760,7 @@ def _migrate32to33(previous: SettingsMap) -> SettingsMap: _migrate30to31, _migrate31to32, _migrate32to33, + _migrate33to34, ] """ List of all migrations to apply, indexed by (version - 1). See _migrate below diff --git a/api/src/opentrons/config/feature_flags.py b/api/src/opentrons/config/feature_flags.py index 65984dd7ab9..719c0dc43f3 100644 --- a/api/src/opentrons/config/feature_flags.py +++ b/api/src/opentrons/config/feature_flags.py @@ -24,12 +24,6 @@ def enable_door_safety_switch(robot_type: RobotTypeEnum) -> bool: return advs.get_setting_with_env_overload("enableDoorSafetySwitch", robot_type) -def disable_fast_protocol_upload() -> bool: - return advs.get_setting_with_env_overload( - "disableFastProtocolUpload", RobotTypeEnum.FLEX - ) - - def enable_ot3_hardware_controller() -> bool: """Get whether to use the OT-3 hardware controller.""" diff --git a/api/src/opentrons/protocol_api/create_protocol_context.py b/api/src/opentrons/protocol_api/create_protocol_context.py index f48510049fa..b01d4bbbbe0 100644 --- a/api/src/opentrons/protocol_api/create_protocol_context.py +++ b/api/src/opentrons/protocol_api/create_protocol_context.py @@ -4,7 +4,6 @@ from opentrons_shared_data.labware.dev_types import LabwareDefinition -from opentrons.config import feature_flags from opentrons.hardware_control import ( HardwareControlAPI, ThreadManager, @@ -123,8 +122,7 @@ def create_protocol_context( sync_hardware=sync_hardware, ) - # TODO(mc, 2022-8-22): remove `disable_fast_protocol_upload` - elif use_simulating_core and not feature_flags.disable_fast_protocol_upload(): + elif use_simulating_core: legacy_deck = LegacyDeck(deck_type=deck_type) core = LegacyProtocolCoreSimulator( sync_hardware=sync_hardware, diff --git a/api/src/opentrons/protocol_runner/create_simulating_runner.py b/api/src/opentrons/protocol_runner/create_simulating_runner.py index 0c60af3a45c..c6854662c06 100644 --- a/api/src/opentrons/protocol_runner/create_simulating_runner.py +++ b/api/src/opentrons/protocol_runner/create_simulating_runner.py @@ -1,6 +1,5 @@ """Simulating AbstractRunner factory.""" -from opentrons.config import feature_flags from opentrons.hardware_control import API as OT2API, HardwareControlAPI from opentrons.protocols.api_support import deck_type from opentrons.protocols.api_support.deck_type import should_load_fixed_trash @@ -58,7 +57,7 @@ async def create_simulating_runner( use_virtual_modules=True, use_virtual_gripper=True, use_simulated_deck_config=True, - use_virtual_pipettes=(not feature_flags.disable_fast_protocol_upload()), + use_virtual_pipettes=True, ), load_fixed_trash=should_load_fixed_trash(protocol_config), ) diff --git a/api/tests/opentrons/config/test_advanced_settings_migration.py b/api/tests/opentrons/config/test_advanced_settings_migration.py index e3269433db5..283d11a3000 100644 --- a/api/tests/opentrons/config/test_advanced_settings_migration.py +++ b/api/tests/opentrons/config/test_advanced_settings_migration.py @@ -8,7 +8,7 @@ @pytest.fixture def migrated_file_version() -> int: - return 33 + return 34 # make sure to set a boolean value in default_file_settings only if @@ -22,7 +22,6 @@ def default_file_settings() -> Dict[str, Any]: "useOldAspirationFunctions": None, "disableLogAggregation": None, "enableDoorSafetySwitch": None, - "disableFastProtocolUpload": None, "enableOT3HardwareController": None, "rearPanelIntegration": True, "disableStallDetection": None, @@ -405,6 +404,14 @@ def v33_config(v32_config: Dict[str, Any]) -> Dict[str, Any]: return r +@pytest.fixture +def v34_config(v33_config: Dict[str, Any]) -> Dict[str, Any]: + r = v33_config.copy() + r.pop("disableFastProtocolUpload") + r["_version"] = 34 + return r + + @pytest.fixture( scope="session", params=[ @@ -443,6 +450,7 @@ def v33_config(v32_config: Dict[str, Any]) -> Dict[str, Any]: lazy_fixture("v31_config"), lazy_fixture("v32_config"), lazy_fixture("v33_config"), + lazy_fixture("v34_config"), ], ) def old_settings(request: SubRequest) -> Dict[str, Any]: @@ -527,7 +535,6 @@ def test_ensures_config() -> None: "useOldAspirationFunctions": None, "disableLogAggregation": True, "enableDoorSafetySwitch": None, - "disableFastProtocolUpload": None, "enableOT3HardwareController": None, "rearPanelIntegration": None, "disableStallDetection": None, diff --git a/app/src/assets/localization/en/anonymous.json b/app/src/assets/localization/en/anonymous.json index 5dcfd9bf237..bdb1a6a7805 100644 --- a/app/src/assets/localization/en/anonymous.json +++ b/app/src/assets/localization/en/anonymous.json @@ -65,7 +65,6 @@ "update_requires_restarting_app": "Updating requires restarting the app.", "update_robot_software_description": "Bypass the auto-update process and update the robot software manually.", "update_robot_software_link": "Launch software update page", - "use_older_protocol_analysis_method_description": "Use an older, slower method of analyzing uploaded protocols. This changes how the OT-2 validates your protocol during the upload step, but does not affect how your protocol actually runs. Support might ask you to change this setting if you encounter problems with the newer, faster protocol analysis method.", "versions_sync": "Learn more about keeping the app and robot software in sync", "want_to_help_out": "Want to help out?", "welcome_title": "Welcome!", diff --git a/app/src/assets/localization/en/branded.json b/app/src/assets/localization/en/branded.json index 13b53967aff..4e4f9d82daa 100644 --- a/app/src/assets/localization/en/branded.json +++ b/app/src/assets/localization/en/branded.json @@ -65,7 +65,6 @@ "update_requires_restarting_app": "Updating requires restarting the Opentrons App.", "update_robot_software_description": "Bypass the Opentrons App auto-update process and update the robot software manually.", "update_robot_software_link": "Launch Opentrons software update page", - "use_older_protocol_analysis_method_description": "Use an older, slower method of analyzing uploaded protocols. This changes how the OT-2 validates your protocol during the upload step, but does not affect how your protocol actually runs. Opentrons Support might ask you to change this setting if you encounter problems with the newer, faster protocol analysis method.", "versions_sync": "Learn more about keeping the Opentrons App and robot software in sync", "want_to_help_out": "Want to help out Opentrons?", "welcome_title": "Welcome to your Opentrons Flex!", diff --git a/app/src/assets/localization/en/device_settings.json b/app/src/assets/localization/en/device_settings.json index 711ce0451d7..e7910700c33 100644 --- a/app/src/assets/localization/en/device_settings.json +++ b/app/src/assets/localization/en/device_settings.json @@ -302,7 +302,6 @@ "usb_to_ethernet_description": "Looking for USB-to-Ethernet Adapter info?", "use_older_aspirate": "Use older aspirate behavior", "use_older_aspirate_description": "Aspirate with the less accurate volumetric calibrations that were used before version 3.7.0. Use this if you need consistency with pre-v3.7.0 results. This only affects GEN1 P10S, P10M, P50M, and P300S pipettes.", - "use_older_protocol_analysis_method": "Use older protocol analysis method", "validating_software": "Validating software...", "view_details": "View details", "view_latest_release_notes_at": "View latest release notes at {{url}}", diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/UseOlderProtocol.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/UseOlderProtocol.tsx deleted file mode 100644 index 84d2855c281..00000000000 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/UseOlderProtocol.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import * as React from 'react' -import { useDispatch } from 'react-redux' -import { useTranslation } from 'react-i18next' - -import { - ALIGN_CENTER, - Box, - Flex, - JUSTIFY_SPACE_BETWEEN, - SPACING, - StyledText, - TYPOGRAPHY, -} from '@opentrons/components' - -import { ToggleButton } from '../../../../atoms/buttons' -import { updateSetting } from '../../../../redux/robot-settings' - -import type { Dispatch } from '../../../../redux/types' -import type { RobotSettingsField } from '../../../../redux/robot-settings/types' -interface UseOlderProtocolProps { - settings: RobotSettingsField | undefined - robotName: string - isRobotBusy: boolean -} - -export function UseOlderProtocol({ - settings, - robotName, - isRobotBusy, -}: UseOlderProtocolProps): JSX.Element { - const { t } = useTranslation(['device_settings', 'branded']) - const dispatch = useDispatch() - const value = settings?.value ? settings.value : false - const id = settings?.id ? settings.id : 'disableFastProtocolUpload' - - const handleClick: React.MouseEventHandler = () => { - if (!isRobotBusy) { - dispatch(updateSetting(robotName, id, !value)) - } - } - - return ( - - - - {t('use_older_protocol_analysis_method')} - - - {t('branded:use_older_protocol_analysis_method_description')} - - - - - ) -} diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UseOlderProtocol.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UseOlderProtocol.test.tsx deleted file mode 100644 index c2651ff8e1e..00000000000 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UseOlderProtocol.test.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import * as React from 'react' -import { MemoryRouter } from 'react-router-dom' -import { screen, fireEvent } from '@testing-library/react' -import { describe, it, vi, beforeEach, expect } from 'vitest' -import '@testing-library/jest-dom/vitest' -import { renderWithProviders } from '../../../../../__testing-utils__' - -import { i18n } from '../../../../../i18n' -import { getRobotSettings } from '../../../../../redux/robot-settings' - -import { UseOlderProtocol } from '../UseOlderProtocol' - -vi.mock('../../../../../redux/robot-settings/selectors') - -const mockSettings = { - id: 'disableFastProtocolUpload', - title: 'Use older protocol analysis method', - description: - 'Use an older, slower method of analyzing uploaded protocols. This changes how the OT-2 validates your protocol during the upload step, but does not affect how your protocol actually runs. Opentrons Support might ask you to change this setting if you encounter problems with the newer, faster protocol analysis method.', - value: true, - restart_required: false, -} - -const render = (isRobotBusy = false) => { - return renderWithProviders( - - - , - { i18nInstance: i18n } - ) -} - -describe('RobotSettings ShortTrashBin', () => { - beforeEach(() => { - vi.mocked(getRobotSettings).mockReturnValue([mockSettings]) - }) - - it('should render title, description and toggle button', () => { - render() - screen.getByText('Use older protocol analysis method') - screen.getByText( - 'Use an older, slower method of analyzing uploaded protocols. This changes how the OT-2 validates your protocol during the upload step, but does not affect how your protocol actually runs. Opentrons Support might ask you to change this setting if you encounter problems with the newer, faster protocol analysis method.' - ) - - const toggleButton = screen.getByRole('switch', { - name: 'use_older_protocol_analysis_method', - }) - expect(toggleButton.getAttribute('aria-checked')).toBe('true') - }) - - it('should change the value when a user clicks a toggle button', () => { - const tempMockSettings = { - ...mockSettings, - value: false, - } - vi.mocked(getRobotSettings).mockReturnValue([tempMockSettings]) - render() - const toggleButton = screen.getByRole('switch', { - name: 'use_older_protocol_analysis_method', - }) - fireEvent.click(toggleButton) - expect(toggleButton.getAttribute('aria-checked')).toBe('true') - }) - - it('should call update robot status if a robot is busy', () => { - render(true) - const toggleButton = screen.getByRole('switch', { - name: 'use_older_protocol_analysis_method', - }) - expect(toggleButton).toBeDisabled() - }) -}) diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/index.ts b/app/src/organisms/Devices/RobotSettings/AdvancedTab/index.ts index b53134df945..e3359c3998b 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/index.ts +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/index.ts @@ -12,4 +12,3 @@ export * from './Troubleshooting' export * from './UpdateRobotSoftware' export * from './UsageSettings' export * from './UseOlderAspirateBehavior' -export * from './UseOlderProtocol' diff --git a/app/src/organisms/Devices/RobotSettings/RobotSettingsAdvanced.tsx b/app/src/organisms/Devices/RobotSettings/RobotSettingsAdvanced.tsx index 585dbcf69db..418e8001269 100644 --- a/app/src/organisms/Devices/RobotSettings/RobotSettingsAdvanced.tsx +++ b/app/src/organisms/Devices/RobotSettings/RobotSettingsAdvanced.tsx @@ -30,7 +30,6 @@ import { UpdateRobotSoftware, UsageSettings, UseOlderAspirateBehavior, - UseOlderProtocol, } from './AdvancedTab' import { updateSetting, @@ -232,12 +231,6 @@ export function RobotSettingsAdvanced({ /> {isFlex ? null : ( <> - - { vi.mocked(UseOlderAspirateBehavior).mockReturnValue(
Mock UseOlderAspirateBehavior Section
) - vi.mocked(UseOlderProtocol).mockReturnValue( -
Mock UseOlderProtocol Section
- ) when(useIsFlex).calledWith('otie').thenReturn(false) vi.mocked(EnableStatusLight).mockReturnValue(
mock EnableStatusLight
@@ -210,17 +205,6 @@ describe('RobotSettings Advanced tab', () => { ).toBeNull() }) - it('should render UseOlderProtocol section for OT-2', () => { - render() - screen.getByText('Mock UseOlderProtocol Section') - }) - - it('should not render UseOlderProtocol section for Flex', () => { - when(useIsFlex).calledWith('otie').thenReturn(true) - render() - expect(screen.queryByText('Mock UseOlderProtocol Section')).toBeNull() - }) - it('should not render EnableStatusLight section for OT-2', () => { render() expect(screen.queryByText('mock EnableStatusLight')).not.toBeInTheDocument() diff --git a/robot-server/tests/integration/conftest.py b/robot-server/tests/integration/conftest.py index 7e42a836a71..2c8d66853a1 100644 --- a/robot-server/tests/integration/conftest.py +++ b/robot-server/tests/integration/conftest.py @@ -40,21 +40,6 @@ def pytest_tavern_beta_after_every_response( print(json.dumps(response.json(), indent=4)) -@pytest.fixture -def ot2_server_set_disable_fast_analysis( - ot2_server_base_url: str, -) -> Generator[None, None, None]: - """For integration tests that need to set then clear the - disableFastProtocolUpload feature flag""" - url = f"{ot2_server_base_url}/settings" - data = {"id": "disableFastProtocolUpload", "value": True} - with _requests_session() as requests_session: - requests_session.post(url, json=data) - yield None - data["value"] = None - requests.post(url, json=data) - - @pytest.fixture def ot2_server_base_url(_ot2_session_server: str) -> Generator[str, None, None]: """Return the URL for a running dev server. diff --git a/robot-server/tests/integration/http_api/protocols/test_upload.tavern.yaml b/robot-server/tests/integration/http_api/protocols/test_upload.tavern.yaml index 63bf756bc8d..c7b16d64d47 100644 --- a/robot-server/tests/integration/http_api/protocols/test_upload.tavern.yaml +++ b/robot-server/tests/integration/http_api/protocols/test_upload.tavern.yaml @@ -92,41 +92,3 @@ stages: errors: - id: ProtocolNotFound title: Protocol Not Found - ---- -test_name: Upload, analyze and analyze using "slow analysis" - -marks: - - usefixtures: - - ot2_server_base_url - - ot2_server_set_disable_fast_analysis - -stages: - - name: Upload simple Python protocol - request: - url: '{ot2_server_base_url}/protocols' - method: POST - files: - files: 'tests/integration/protocols/simple.py' - response: - save: - json: - protocol_id: data.id - analysis_id: data.analysisSummaries[0].id - status_code: 201 - - - name: Retry until analyses status is completed and result is ok. - max_retries: 10 - delay_after: 0.1 - request: - url: '{ot2_server_base_url}/protocols/{protocol_id}/analyses' - method: GET - response: - strict: - - json:off - status_code: 200 - json: - data: - - id: '{analysis_id}' - status: completed - result: ok diff --git a/robot-server/tests/integration/test_settings.tavern.yaml b/robot-server/tests/integration/test_settings.tavern.yaml index 754a74f5a04..5ea380778c5 100644 --- a/robot-server/tests/integration/test_settings.tavern.yaml +++ b/robot-server/tests/integration/test_settings.tavern.yaml @@ -42,12 +42,6 @@ stages: description: !re_search 'Automatically pause protocols when robot door opens' restart_required: false value: !anything - - id: disableFastProtocolUpload - old_id: Null - title: Use older protocol analysis method - description: !re_search 'Use an older, slower method of analyzing uploaded protocols' - restart_required: false - value: !anything links: !anydict --- @@ -64,7 +58,6 @@ marks: - disableHomeOnBoot - useOldAspirationFunctions - enableDoorSafetySwitch - - disableFastProtocolUpload - parametrize: key: value vals: @@ -100,7 +93,6 @@ marks: - disableHomeOnBoot - useOldAspirationFunctions - enableDoorSafetySwitch - - disableFastProtocolUpload stages: - name: Set each setting to acceptable values request: