EMODnet / emodnet.wfs

Access EMODnet Web Feature Service data through R
https://emodnet.github.io/emodnet.wfs/
Other
8 stars 4 forks source link

tests flaky right now #175

Open maelle opened 2 days ago

maelle commented 2 days ago

On my machine, tests pass with and without fixtures. On CI, it failed for every platform with and without fixtures for the try a few hours ago.

@salvafern would you mind running the tests with and without fixtures (just delete the tests/testthat/fixtures folder) on your machine?

The failure for scheduled runs was:

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-info.R:4:3'): emodnet_get_all_wfs_info() works ─────────────────
<purrr_error_indexed/rlang_error/error/condition>
Error in `map(.x, .f, ...)`: i In index: 8.
Caused by error:
! 1: Space required after the Public Identifier
2: SystemLiteral " or ' expected
3: SYSTEM or PUBLIC, the URI is missing
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-layers.R:109:3'): reduce works ───────────────────────────────
`sf_data` is not an S3 object
── Error ('test-layers.R:110:3'): reduce works ─────────────────────────────────
Error in `expect_compare(">", act, exp)`: Result of comparison must be a single logical value
Backtrace:
    ▆
 1. └─testthat::expect_gt(nrow(sf_data), 0L) at test-layers.R:110:3
 2.   └─testthat:::expect_compare(">", act, exp)
 3.     └─rlang::abort("Result of comparison must be a single logical value")

On Ubuntu

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-info.R:4:3'): emodnet_get_all_wfs_info() works ─────────────────
<purrr_error_indexed/rlang_error/error/condition>
Error in `map(.x, .f, ...)`: i In index: 8.
Caused by error:
! 1: Space required after the Public Identifier
2: SystemLiteral " or ' expected
3: SYSTEM or PUBLIC, the URI is missing
maelle commented 2 days ago

And the latest run after my commit to the README: failures for all except macOS :zany_face: https://github.com/EMODnet/emodnet.wfs/actions/runs/10898491286/job/30241818460

Is there anything up with the services maybe?

maelle commented 2 days ago

ah now i get the without fixtures failure locally!

maelle commented 2 days ago

This is actually really weird. It just worked:

sf_data <- emodnet.wfs::emodnet_get_layers(
    service = "seabed_habitats_individual_habitat_map_and_model_datasets",
    layers = c("dk003069", "dk003070"),
    reduce_layers = TRUE
)
#> Loading ISO 19139 XML schemas...
#> Loading ISO 19115 codelists...
#> ✔ WFS client created successfully
#> ℹ Service: "https://ows.emodnet-seabedhabitats.eu/geoserver/emodnet_open_maplibrary/wfs"
#> ℹ Version: "2.0.0"

Created on 2024-09-17 with reprex v2.1.0

But right before I got:

> sf_data <- emodnet_get_layers(
+     service = "seabed_habitats_individual_habitat_map_and_model_datasets",
+     layers = c("dk003069", "dk003070"),
+     reduce_layers = TRUE
+   )
Space required after the Public Identifier
SystemLiteral " or ' expected
SYSTEM or PUBLIC, the URI is missing
Opening and ending tag mismatch: hr line 0 and body
Opening and ending tag mismatch: body line 0 and html
EndTag: '</' not found
Error: 1: Space required after the Public Identifier
2: SystemLiteral " or ' expected
3: SYSTEM or PUBLIC, the URI is missing
4: Opening and ending tag mismatch: hr line 0 and body
5: Opening and ending tag mismatch: body line 0 and html
6: EndTag: '</' not found
Backtrace:
  1. emodnet.wfs::emodnet_get_layers(...)
 16. XML (local) `<fn>`(`<chr>`)

:exploding_head:

maelle commented 2 days ago

@salvafern I'll wait for your feedback and will try again on Thursday.

bart-v commented 2 days ago

As usual, when tests fail, there is an issue with the services, like always , you can check https://monitor.emodnet.eu/resources?lang=en&tag=Seabed+Habitats image

There is nothing special about this, this is a federated system of 40+ services, these go down now and then....

maelle commented 1 day ago

Thanks and sorry for not checking the dashboard!