Skip to content

chore(tests): bump staging app versions and drop special-app constant#610

Open
ari-nz wants to merge 5 commits into
mainfrom
chore/app-version-bumps
Open

chore(tests): bump staging app versions and drop special-app constant#610
ari-nz wants to merge 5 commits into
mainfrom
chore/app-version-bumps

Conversation

@ari-nz
Copy link
Copy Markdown
Collaborator

@ari-nz ari-nz commented Apr 28, 2026

  • test-app: 0.0.6 → 1.0.0 (new version uses same he-tme input schema)
  • he-tme: 1.1.0 → 1.1.1 on staging
  • Remove SPECIAL_APPLICATION_ID/VERSION from staging (no longer needed)

Implements: https://aignx.atlassian.net/browse/PYSDK-118

Copilot AI review requested due to automatic review settings April 28, 2026 07:40
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
873 3 870 19
View the top 2 failed test(s) by shortest run time
tests.aignostics.application.cli_test::test_cli_application_dump_schemata
Stack Traces | 0.203s run time
runner = <typer.testing.CliRunner object at 0x7f266ab5e360>
tmp_path = PosixPath('.../pytest-18/popen-gw0/test_cli_application_dump_sche0')
record_property = <function record_property.<locals>.append_property at 0x7f266a825590>

    @pytest.mark.e2e
    @pytest.mark.timeout(timeout=60)
    def test_cli_application_dump_schemata(runner: CliRunner, tmp_path: Path, record_property) -> None:
        """Check application dump schemata works as expected."""
        record_property("tested-item-id", "SPEC-APPLICATION-SERVICE")
        result = runner.invoke(
            cli, ["application", "dump-schemata", HETA_APPLICATION_ID, "--destination", str(tmp_path), "--zip"]
        )
        application_version = ApplicationService().application_version(HETA_APPLICATION_ID)
        application_version = ApplicationService().application_version(HETA_APPLICATION_ID)
        assert result.exit_code == 0
>       assert "Zipped 11 files" in normalize_output(result.output)
E       AssertionError: assert 'Zipped 11 files' in 'Zipped 16 files to .../pytest-18/popen-gw0/test_cli_application_dump_sche0/he-tme_1.2.0_schemata.zip'
E        +  where 'Zipped 16 files to .../pytest-18/popen-gw0/test_cli_application_dump_sche0/he-tme_1.2.0_schemata.zip' = normalize_output('Zipped 16 files to .../pytest-18/popen-gw0/test_cli_application_dump_sche0/he-tme_1.2.0_schemata.zip\n')
E        +    where 'Zipped 16 files to .../pytest-18/popen-gw0/test_cli_application_dump_sche0/he-tme_1.2.0_schemata.zip\n' = <Result okay>.output

.../aignostics/application/cli_test.py:219: AssertionError
tests.aignostics.application.gui_test::test_gui_download_dataset_via_application_to_run_cancel_to_find_back
Stack Traces | 7.08s run time
user = <nicegui.testing.user.User object at 0x7f6bb0816ad0>
runner = <typer.testing.CliRunner object at 0x7f6b75c8a5d0>
silent_logging = None
record_property = <function record_property.<locals>.append_property at 0x7f6bac353110>

    @pytest.mark.e2e
    @pytest.mark.long_running
    @pytest.mark.flaky(retries=1, delay=5)
    @pytest.mark.timeout(timeout=60 * 10)
    @pytest.mark.sequential
    async def test_gui_download_dataset_via_application_to_run_cancel_to_find_back(  # noqa: PLR0915
        user: User, runner: CliRunner, silent_logging: None, record_property
    ) -> None:
        """Test that the user can download a dataset via the application page and cancel the run, then find it back."""
        record_property("tested-item-id", "TC-APPLICATION-GUI-04, SPEC-GUI-SERVICE")
        with tempfile.TemporaryDirectory() as tmpdir:
            tmp_path = Path(tmpdir)
    
            with patch(
                "aignostics.application._gui._page_application_describe.Path.home",
                return_value=tmp_path,
            ):
                # Download example wsi
                result = runner.invoke(
                    cli,
                    [
                        "dataset",
                        "aignostics",
                        "download",
                        SPOT_1_GS_URL,
                        str(tmp_path),
                    ],
                )
                assert result.exit_code == 0
                assert "Successfully downloaded" in normalize_output(result.stdout)
                assert SPOT_1_FILENAME in normalize_output(result.stdout)
                expected_file = Path(tmp_path) / SPOT_1_FILENAME
                assert expected_file.exists(), f"Expected file {expected_file} not found"
>               assert expected_file.stat().st_size == 14681750
E               AssertionError: assert 8942460 == 14681750
E                +  where 8942460 = os.stat_result(st_mode=33188, st_ino=9199587, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=1001, st_size=8942460, st_atime=1778543395, st_mtime=1778543396, st_ctime=1778543396).st_size
E                +    where os.stat_result(st_mode=33188, st_ino=9199587, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=1001, st_size=8942460, st_atime=1778543395, st_mtime=1778543396, st_ctime=1778543396) = stat()
E                +      where stat = PosixPath('.../tmp/tmpyeksi3mh/1603ba4c-398a-49db-926b-c14d8f17dc83.tiff').stat

.../aignostics/application/gui_test.py:217: AssertionError
View the full list of 1 ❄️ flaky test(s)
tests.aignostics.dataset.cli_test::test_cli_aignostics_download_sample

Flake rate in main: 8.82% (Passed 31 times, Failed 3 times)

Stack Traces | 6.46s run time
runner = <typer.testing.CliRunner object at 0x7f93b706a580>
tmp_path = PosixPath('.../pytest-18/popen-gw3/test_cli_aignostics_download_s1')
record_property = <function record_property.<locals>.append_property at 0x7f93b8e49380>

    @pytest.mark.e2e
    @pytest.mark.flaky(retries=1, delay=5)
    @pytest.mark.timeout(timeout=60 * 2)
    def test_cli_aignostics_download_sample(runner: CliRunner, tmp_path: Path, record_property) -> None:
        """Check download functionality with dry-run option."""
        record_property("tested-item-id", "TC-DATASET-CLI-01")
        result = runner.invoke(
            cli,
            [
                "dataset",
                "aignostics",
                "download",
                SPOT_1_GS_URL,
                str(tmp_path),
            ],
        )
        assert result.exit_code == 0
    
        assert "Successfully downloaded" in result.stdout
        assert SPOT_1_FILENAME in result.stdout
    
        expected_file = tmp_path / SPOT_1_FILENAME
        assert expected_file.exists(), f"Expected file {expected_file} not found"
>       assert expected_file.stat().st_size == 14681750
E       AssertionError: assert 8942460 == 14681750
E        +  where 8942460 = os.stat_result(st_mode=33188, st_ino=9451602, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=1001, st_size=8942460, st_atime=1778542914, st_mtime=1778542916, st_ctime=1778542916).st_size
E        +    where os.stat_result(st_mode=33188, st_ino=9451602, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=1001, st_size=8942460, st_atime=1778542914, st_mtime=1778542916, st_ctime=1778542916) = stat()
E        +      where stat = PosixPath('.../pytest-18/popen-gw3/test_cli_aignostics_download_s1/1603ba4c-398a-49db-926b-c14d8f17dc83.tiff').stat

.../aignostics/dataset/cli_test.py:152: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

ari-nz and others added 5 commits May 11, 2026 22:12
- test-app: 0.0.6 → 1.0.0 (new version uses same he-tme input schema)
- he-tme: 1.1.0 → 1.1.1 on staging
- Remove SPECIAL_APPLICATION_ID/VERSION from staging (no longer needed)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…alization artifact

- Re-add SPECIAL_APPLICATION_ID/VERSION to staging pointing to test-app 1.0.0
  so e2e_test.py imports resolve on staging
- Remove normalization:wsi input artifact from _get_spots_payload_for_special;
  test-app 1.0.0 only requires whole_slide_image, matching the he-tme schema

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Remove SPECIAL_APPLICATION_ID/VERSION from staging constants entirely
- Guard the import in e2e_test.py with try/except so staging doesn't NameError
- Add skipif(SPECIAL_APPLICATION_ID is None) to both special-app tests
  so they are silently skipped on staging but still run on production (0.99.0)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Simpler than a try/except guard: staging defines SPECIAL_APPLICATION_ID
and SPECIAL_APPLICATION_VERSION as None, the regular import works, and
the existing skipif(SPECIAL_APPLICATION_ID is None) handles the rest.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…e-tme 1.2.0

- Replace SPOT_1 with breast cancer slide 1603ba4c (BREAST/BREAST_CANCER,
  6649×6578 at 0.25 MPP); preserve old 9375e3ed data as SPOT_4
- Add VIPS 10x resolution ambiguity note for SPOT_2, SPOT_3, SPOT_4
- Bump HETA_APPLICATION_VERSION to 1.2.0, TEST_APPLICATION_VERSION to 1.0.0
- Remove SPECIAL_APPLICATION concept; restore stress tests against test-app 1.0.0
- Unify payload builders via _build_wsi_input_item / _build_minimal_wsi_input_item
- Update SPOT_1_EXPECTED_RESULT_FILES sizes from staging run 43a3bcd2
- Reduce PIPELINE_NODE_ACQUISITION_TIMEOUT_MINUTES to 25
@ari-nz ari-nz force-pushed the chore/app-version-bumps branch from 0d5af5f to bd5f44a Compare May 11, 2026 23:19
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
11.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant