-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use latest Datasette #12
Conversation
- bump the build to `datasette:latest`. - remove the deprecated `hash_urls` setting. - install `datasette-hashed-urls`. - force `pandas` to 1.0, to avoid a bug in csvs-to-sqlite with v2.0. - comment out a broken `apt-get -y upgrade` during the build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Review
This PR updates the Docker setup & compose file, fixing the issue where the Datasette service would no longer build. (Because the v0.54 image was so old, its sub-dependencies all went kaput, apparently?)
- Datasette image set to
latest
- As of time of writing, this is v0.64.2.
- See inline comments for notes about pros/cons of moving to latest vs pinned version.
- See https://hub.docker.com/r/datasetteproject/datasette/tags for available versions
- build commands updated to reflect working with this new image
Tests look OK on localhost - I'm able to run docker-compose build ; docker-compose up
on my local machine, then explore the darien
kenya
and gorognosa
databases on http://127.0.0.1:8001/
LGTM 👍
@@ -1,11 +1,9 @@ | |||
FROM datasetteproject/datasette:0.54 | |||
FROM datasetteproject/datasette:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Echoing some comments I made on Slack:
- we're setting the version datasette version to latest, instead of a fixed version, which has its pros/cons we should be aware of in maintaining this repo.
- Pro: this keeps us up to date with latest versions. Con: unmanaged versions could theoretically break future builds.
The idea of "keeping versions pinned to keep builds reliable" is something we've considered for backend services such as the Classrooms Maps API and the Subject Assistant Proxy Server, but I think in practice we haven't strictly followed this doctrine. (For example, the pip install in this Dockerfile had never set versions.)
Anyway, we're going with version: latest
now, and if this becomes a problem in the future, we'll come back and start pinning fixed versions to create a reliable build.
&& \ | ||
apt-get clean | ||
RUN apt-get update | ||
# RUN apt-get -y upgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some thoughts on why this might be failing:
apt-get update
should "install the newest versions of all packages currently installed on the system" (ref)- The
-y
flag should provide "Automatic yes to prompts"- However, there's a caveat: "If an undesirable situation, such as changing a held package or removing an essential package, occurs then apt-get will abort."
- (Held package = package that's locked to a specific version, I think)
So perhaps the latest datasette image has some packages on lock, so the "yes, please upgrade those packages" command causes an error. 🤷
Anyway, I'm not sure if removing apt-get upgrade
is a good idea in the long run, but this seems to work, at least locally. I'm curious to see how this builds on GitHub Actions.
Wait a minute, this repo is still using Jenkins and doesn't have Github Actions set up. |
datasette:latest
.hash_urls
setting.datasette-hashed-urls
.pandas
to 1.0, to avoid a bug in csvs-to-sqlite with v2.0 (error_bad_lines argument has been deprecated simonw/csvs-to-sqlite#88.)apt-get -y upgrade
during the build.Closes #13.