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

Switch to Github Action and Docker based test running #841

Closed
wants to merge 57 commits into from

Conversation

Kirill888
Copy link
Member

@Kirill888 Kirill888 commented Dec 19, 2019

Docker for running tests

See ./docker directory

ubuntu-full-3.0.2 + compiled rasterio is a safer combo, but ubuntu-full image is rather large and takes more than a minute to load, with ubuntu-small + binary rasterio, docker pull is quicker, less than 30s. Since ubuntu-small does not have netcdf support, binary rasterio is needed.

Contains python environment with all dependencies of datacube[s3,celery,performance,test] pre-installed, but no datacube itself. Also contains postgresql server that gets launched for integration tests.

Switch to Github Actions

  • Turned off travis
  • So far 2 work flows
    • Build test docker
    • Run tests using pre-built docker

Old Dockerfile

  • marked as deprecated
  • removed from docs
  • removed docker compose
  • switched to ubuntu gis ppa
  • don't use requirements-test.txt
  • don't use entry point to render config to a file that might not even be writable (datacube will read from env.vars directly so no need)

Other Changes

@codecov
Copy link

codecov bot commented Dec 19, 2019

Codecov Report

Merging #841 into develop will increase coverage by 0.2%.
The diff coverage is 95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop     #841     +/-   ##
==========================================
+ Coverage    88.66%   88.86%   +0.2%     
==========================================
  Files          112      112             
  Lines        10270    10331     +61     
==========================================
+ Hits          9106     9181     +75     
+ Misses        1164     1150     -14
Impacted Files Coverage Δ
datacube/drivers/_tools.py 100% <ø> (+6.66%) ⬆️
datacube/ui/click.py 85.43% <100%> (+0.49%) ⬆️
datacube/scripts/ingest.py 84.58% <80%> (+1.31%) ⬆️
datacube/config.py 98.26% <98.64%> (+3.17%) ⬆️
datacube/utils/uris.py 97.24% <0%> (-1.84%) ⬇️
datacube/utils/documents.py 93.96% <0%> (-0.87%) ⬇️
datacube/api/core.py 92.21% <0%> (+1.24%) ⬆️
datacube/utils/dask.py 100% <0%> (+2.27%) ⬆️
datacube/api/_legacy/load.py 95.37% <0%> (+6.48%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15b8b85...fbb8894. Read the comment docs.

@coveralls
Copy link

coveralls commented Dec 19, 2019

Coverage Status

Coverage increased (+0.1%) to 88.743% when pulling 85b7c3a on kk-gh-actions into 15b8b85 on develop.

@Kirill888 Kirill888 marked this pull request as ready for review December 19, 2019 05:16
@Kirill888 Kirill888 force-pushed the kk-gh-actions branch 3 times, most recently from 7ca6bbf to 6eca9f0 Compare December 23, 2019 04:51
- removed docker section from docs
- don't user test requriements
- install datacube with all features enabled
- get rid of entrypoint
assembling parts from geobase, but basing off ubuntugis-unstable
for now focus is running tests
This requires pinning to older pyproj since ubungis stable doesn't have PROJ6.
In the unstable PPA Cascaded Union test triggers SEGFAULT inside libgeos.
Become user named odc with compatible UID/GID to src/datacube-core, remain as
root if volume is owned by root.
There seems to be issue with cloudpickle, moving _echo into stand-alone
function, this makes it work. Don't care about celery anyway as this whole
"executor" nonsense needs to be deleted.
Also change /env ownership to odc:odc
Running chown on startup is way too costly, so make it writable by group and add
odc user to that group.
- remove duplicate lines
- catch morph product exceptions
- Check output for expected error strings
- Make sure source product is present in db for src_varname checking test
One that doesn't inject config/env options
- print error message when no config file found
- print error message when misspelled/missing env requested
- python3 style typing annotations
- removed some python2 workarounds
Extract database configuration components from a url
Load config options from environment variables, compatible with old style docker
config.
This will be used in dockers to render environment configuration to file.
Running `python -m datacube` will generated datacube config file from
environment variables.
- test -> check
- mark more phony targets as such
Rather then pulling down some older version from packages.dea{..} use one that
is built from current checkout.
1. Check if DATACUBE_DB_URL is set, if yes use that
2. Check if any of DB_{HOSTNAME|USERNAME|PASSWORD|DATABASE|PORT} are set, then
   use them, this mimics current docker setup but is deprecated in favour of DATACUBE_DB_URL
3. Check files as per usual
@Kirill888
Copy link
Member Author

too many force pushes, will restart from fresh

@Kirill888 Kirill888 closed this Dec 23, 2019
@mergify mergify bot deleted the kk-gh-actions branch December 23, 2019 06:44
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.

None yet

2 participants