conda-incubator / conda-store

Data science environments, for collaboration. ✨
https://conda.store
BSD 3-Clause "New" or "Revised" License
143 stars 46 forks source link

update conda store dockerfile to have prod target #621

Closed dcmcand closed 11 months ago

dcmcand commented 11 months ago

Fixes #614 Part of #599

Description

updates Dockerfile for conda-store to have a prod target that does not install pip dependencies in editable mode, and a dev target that does.

This pull request:

Pull request checklist

netlify[bot] commented 11 months ago

Deploy Preview for kaleidoscopic-dango-0cf31d canceled.

Name Link
Latest commit 4cc36d096b1fdfb65c9ec54ca30ed55955d18bbc
Latest deploy log https://app.netlify.com/sites/kaleidoscopic-dango-0cf31d/deploys/652d9a1e3918cb0008b01634
trallard commented 11 months ago

While reviewing the PR I realised that the GH workflow logic actually needs some tuning too. Right now the triggers are:

on:
  push:
    branches:
      - "main"
  release:
    types: [created]

While this PR creates separate dev and prod Docker targets, the images are built more frequently than releases are made, and since conda-store is installed with pip install . this still does not ensure we are using an officially released version (which I'd prefer doing) so we might need to adapt to some logic where

@dcmcand

dcmcand commented 11 months ago

While reviewing the PR I realised that the GH workflow logic actually needs some tuning too. Right now the triggers are:

on:
  push:
    branches:
      - "main"
  release:
    types: [created]

While this PR creates separate dev and prod Docker targets, the images are built more frequently than releases are made, and since conda-store is installed with pip install . this still does not ensure we are using an officially released version (which I'd prefer doing) so we might need to adapt to some logic where

* `dev` is built on pushes to main and optionally when a new version has been released on pip or conda-forge

* `prod` is built when a new version has been released on pip or conda-forge only

@dcmcand

Ok, no problem. I will make these changes and let you know when it is ready for :eyes:

dcmcand commented 11 months ago

@trallard the same applies to conda-store-server correct?

trallard commented 11 months ago

yes this should apply for both

dcmcand commented 11 months ago

@trallard This is ready for another look. We can't test the the full release workflow without cutting a release though. Can we cut a test release and then delete it from pypi after? Or are you comfortable with not testing that bit?

dcmcand commented 11 months ago

@trallard is this one good to go?

trallard commented 11 months ago

🤔 I got confused since the changes here are also in #625, so it seems some of my changes will not be introduced here (e.g. timezone) but in the other PR which is fine by me so will mark this as merge ready.

As for the release - I will cut a release candidate today/tomorrow so that should work as a test