Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest datacube version breaks a test #111

Open
benjimin opened this issue Jul 10, 2021 · 4 comments
Open

Latest datacube version breaks a test #111

benjimin opened this issue Jul 10, 2021 · 4 comments

Comments

@benjimin
Copy link
Collaborator

Bumping the datacube version (from 1.8.3 to 1.8.4dev) causes an error in the Fractional Cover Drill test.

Test report for version-bump commit:
https://github.com/opendatacube/datacube-wps/runs/3030084203

Roughly what the code is doing:

# thing = datacube.virtual.construct(…) # probably..
bag = thing.query(dc, time, geopolygon)
box = thing.group(bag)
# guard rail functionlist(box.shape) # seems to complain about box.load_natively
VirtualProductException: shape requires known geobox
@whatnick
Copy link
Member

We can mark this as Pytest XFail and move on. https://docs.pytest.org/en/latest/how-to/skipping.html

@benjimin
Copy link
Collaborator Author

benjimin commented Oct 2, 2021

Datacube is now up to 1.8.6, time to re-check...

@benjimin
Copy link
Collaborator Author

benjimin commented Oct 6, 2021

This error can be replicated by running the example in opendatacube/datacube-core#1203 except using datacube_wps.processes.wofls_fuser instead of digitalearthau.utils.wofs_fuser.

This produces a <natively loaded VirtualDatasetBox> rather than one with a defined shape, hence the error. Tested in the wps image using datacube 1.8.6.

The fusers are slightly different:

def wofs_fuser(dest, src):
    empty = (dest & 1).astype(numpy.bool)
    both = ~empty & ~((src & 1).astype(numpy.bool))
    dest[empty] = src[empty]
    dest[both] |= src[both]
def wofls_fuser(dest, src):
    where_nodata = (src & 1) == 0
    np.copyto(dest, src, where=where_nodata)
    return dest

@benjimin
Copy link
Collaborator Author

benjimin commented Oct 6, 2021

Retried this linked example in a modified wps image with datacube 1.8.5 (the version where .shape succeeds in dev sandbox) and using digitalearthau for the fuser; still reproduced "natively loaded" failure.

Suggests the fault is some other difference between the environments? (Both are using python 3.8.10. Could the difference be in the database index? e.g. here the VirtualDatasetBag was returned with 46 not 68 datasets..)

@benjimin benjimin changed the title Latest datacube version breaks test Latest datacube version breaks a test Nov 5, 2021
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

No branches or pull requests

2 participants