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

UIP-49 modify dockerfile #93

Merged
merged 8 commits into from
May 31, 2024
Merged

UIP-49 modify dockerfile #93

merged 8 commits into from
May 31, 2024

Conversation

briehl
Copy link
Collaborator

@briehl briehl commented May 21, 2024

As done in StaticNarrative and elsewhere, this updates the Dockerfile to use the Python 3.12 image, and a little bit of compatilbility fixing in the test suite.

Note that tests are (still) going to fail pretty hard right now due to some mish-mash between mocking and contacting other services. That'll be addressed in a patch to split between unit and integration tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is most of the PR. Copy-pasted from another repo, so it can be included here directly.

@briehl briehl changed the title modify dockerfile UIP-49 modify dockerfile May 30, 2024
@briehl briehl requested a review from ialarmedalien May 30, 2024 20:24
Dockerfile Outdated
FROM kbase/sdkbase2:python
MAINTAINER KBase Developer
FROM python:3.12-slim
LABEL MAINTAINER KBase Developer

Choose a reason for hiding this comment

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

LABEL maintainer="KBase Developer"

Dockerfile Outdated
Comment on lines 8 to 9
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

Choose a reason for hiding this comment

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

could combine into a single command

@@ -0,0 +1,27 @@
[NarrativeService]
kbase-endpoint = https://ci.kbase.us/services

Choose a reason for hiding this comment

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

I'm going to guess that a lot of these aren't used...

I've been contemplating about migrating to a model where the config file just provides the base url (instead of all these derivative URLs) and any extra stuff, like scratch dir, etc., and there's a config.py that generates the various necessary endpoint URLs from the base url. Main advantages would be being able to reuse the config generator in multiple projects, not having to remember the suffixes if you accidentally delete the test or real deploy.cfg, and a more compact config file with less repetition. Hmmm.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I bet you're right. I'd rather ferret those out when picking through the tests, though, as they seem reasonably benign here.

Comment on lines 5 to 9
# export KB_DEPLOYMENT_CONFIG=$script_dir/../deploy.cfg
export KB_AUTH_TOKEN=`cat /kb/module/work/token`
export PYTHONPATH=$script_dir/../lib:$PATH:$PYTHONPATH
# cd $script_dir/../test
# python -m nose --with-coverage --cover-package=NarrativeService --cover-html --cover-html-dir=/kb/module/work/cover_html --nocapture .

Choose a reason for hiding this comment

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

do you want to remove these comments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, I suppose.

@briehl briehl merged commit 17c7081 into kbaseapps:main May 31, 2024
0 of 2 checks passed
@briehl briehl deleted the update-image branch May 31, 2024 20:10
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.

2 participants