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

Use latest Datasette #12

Merged
merged 1 commit into from
Apr 25, 2023
Merged

Use latest Datasette #12

merged 1 commit into from
Apr 25, 2023

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Apr 25, 2023

Closes #13.

- 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.
Copy link
Member

@shaunanoordin shaunanoordin left a 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
  • 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
Copy link
Member

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
Copy link
Member

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.

@shaunanoordin shaunanoordin merged commit 169ea5f into main Apr 25, 2023
@shaunanoordin
Copy link
Member

Wait a minute, this repo is still using Jenkins and doesn't have Github Actions set up.

@eatyourgreens eatyourgreens deleted the datasette-latest branch April 25, 2023 16:19
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.

This no longer builds with datasette:0.54
2 participants