Flaky pydap network tests due to `test.opendap.org` outages
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 22/100
Research direction
The network tests that depend on test.opendap.org are in the pydap test modules, including TestPyDAPDatatreeIO in test_datatree.py, which uses the three /opendap/dap4/ files. The open question is which of the five options to adopt, so read the thread before writing code. Using the unaligned_datatree_nc fixture and the code near line 499 as a reference, check whether CI can generate the datatree files locally. Done means a maintainer has chosen an approach and the flaky job no longer fails on server outages.
Written by the indexing model from the issue text.
Description
What is your issue?
The pydap network tests depend on the public test.opendap.org server. Whenever that server is unreachable or returns errors (e.g. HTTP 503), the flaky/network CI job fails for unrelated PRs.
Some options:
- Run our own OPeNDAP server in CI. OPeNDAP publishes the server behind
test.opendap.orgas a Docker image (opendap/hyrax). Most of the test data is already in the image, and the rest could be added in CI. The tests would then read the server URL from an environment variable that defaults totest.opendap.org. The downside is a large image (~1.4 GB) and some extra CI setup. - Use pydap's built-in server. Start
pydap[server]from a pytest fixture with local files. This is lightweight, but as far as I can tell it doesn't serve DAP4 data responses, so it would only cover part of the tests. - Record and replay HTTP responses. Store the server responses in the repo (e.g. with
vcrpy/pytest-recording) and replay them in the tests. This is fast and needs no network, but the recordings need refreshing and wouldn't catch server-side changes. - Skip when the server is unavailable. Check reachability once in a fixture and skip the tests if the server is down. This is the simplest option, but the tests silently stop running during outages.
- Move the tests to a scheduled job. Run them nightly instead of on every PR, so outages don't block PRs. Breakages would only show up later, though.
I think 1. could be feasable. Some things to consider:
- Maybe we should mirror the dockerhub image to ghcr.
- Not sure how to handle hyrax updates (another CI to update those?)
- Caching is probably not worth
- Not covered yet: the datatree tests (TestPyDAPDatatreeIO in test_datatree.py) use three files under /opendap/dap4/ that the image doesn't include:
- SimpleGroup.nc4.h5: in OPeNDAP's server repo at modules/hdf5_handler/data/ (30 KB). We could commit it or download it in CI.
- unaligned_simple_datatree.nc.h5 and all_aligned_child_nodes.nc.h5: these look like custom uploads to the public server. test_datatree.py already builds equivalent files locally (the unaligned_datatree_nc fixture and the code at line 499). Since the tests only check structure, CI could generate them before starting the container.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 74
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pydata/xarray
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
`DataTree.map_over_datasets` behavior can be obscure sometimesPossibly taken @mohansree14 claimed this 23 days ago. Openneeds triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pydata/xarray#11813 · 1 comment ·
Maintainers usually reply within 1 day
-
Comparing attrs that contain a dict of NumPy arrays raises ValueError in identical / assert_identicalPossibly taken @SohamXYZDev claimed this 29 days ago. Openbug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
pydata/xarray#11777 · 1 comment ·
Maintainers usually reply within 1 day
-
RangeIndex` with datetime64 bounds cannot be printed (`Unknown format code 'g'`)Possibly taken @d-chambers claimed this 60 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pydata/xarray#11598 · 3 comments ·
Maintainers usually reply within 1 day
-
DataTree constructor error message says dict even though dict is not acceptedPossibly taken @aryansk claimed this 100 days ago. Openbug contrib-good-first-issue topic-DataTree topic-error reporting
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pydata/xarray#11514 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
tests
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[Plugin] 群聊记忆 · 人格养成Open
Difficulty 1/5 1-3 hours Newbie friendliness 74/100
-
bug maintainer-managed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
awslabs/visual-asset-management-system#1759 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100