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

Re-add docker blob build artifact type #1086

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

soapy1
Copy link
Contributor

@soapy1 soapy1 commented Feb 11, 2025

Fixes #1085

Description

This PR re-adds the DOCKER_BLOB build artifact enum value. This is required for backwards compatibility with old database entries.

To test manually:

  • insert a new build into the database with the docker_blob artifact type
    one way to do this is to add a new artifact to an existing build. For example (with the docker compose setup):
$ docker compose exec -it psql
# \c conda-store

// see what build artifacts exist
conda-store=# select * from build_artifact;
 id | build_id | artifact_type |                                  key                                   
----+----------+---------------+------------------------------------------------------------------------
  1 |        1 | LOGS          | logs/c3457167-1739296499-1-python-flask-env.log
  2 |        1 | LOCKFILE      | lockfile/c3457167-1739296499-1-python-flask-env.yml
  3 |        2 | LOGS          | logs/d448494f-1739296648-2-test.log
  4 |        1 | DIRECTORY     | /var/lib/conda-store/filesystem/c3457167-1739296499-1-python-flask-env
  5 |        1 | YAML          | yaml/c3457167-1739296499-1-python-flask-env.yml
  6 |        2 | LOCKFILE      | lockfile/d448494f-1739296648-2-test.yml
  7 |        1 | CONDA_PACK    | archive/c3457167-1739296499-1-python-flask-env.tar.gz
  8 |        2 | DIRECTORY     | /var/lib/conda-store/test/d448494f-1739296648-2-test
  9 |        2 | YAML          | yaml/d448494f-1739296648-2-test.yml
 10 |        2 | CONDA_PACK    | archive/d448494f-1739296648-2-test.tar.gz

// add a docker blob to the build with id `2`
conda-store=# insert into build_artifact (build_id, artifact_type, key)  values (2, 'DOCKER_BLOB', 'idonte
xist');
INSERT 0 1
  • query for the build using the api
$ curl http://localhost:8080/conda-store/api/v1/environment/

On the main branch this curl request causes an internal server error.

Pull request checklist

  • Did you test this change locally?
  • Did you update the documentation (if required)?
  • Did you add/update relevant tests for this change (if required)?

Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for conda-store canceled.

Name Link
🔨 Latest commit 18297ac
🔍 Latest deploy log https://app.netlify.com/sites/conda-store/deploys/67ab8c2e25957e0008bc7414

@soapy1 soapy1 force-pushed the add-docker-blob-type branch from 52e4825 to 18d3490 Compare February 11, 2025 17:42
@soapy1 soapy1 added the type: bug 🐛 Something isn't working label Feb 11, 2025
@soapy1 soapy1 requested a review from peytondmurray February 11, 2025 17:43
@soapy1 soapy1 marked this pull request as ready for review February 11, 2025 17:46
Copy link
Contributor

@peytondmurray peytondmurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@soapy1 soapy1 merged commit 58b5129 into conda-incubator:main Feb 11, 2025
30 checks passed
@soapy1 soapy1 deleted the add-docker-blob-type branch February 11, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

[BUG] - Validation error when extracting 'buildartifacttype.DOCKER_BLOB`
2 participants