-
Notifications
You must be signed in to change notification settings - Fork 1
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
DM-45657 Add tests for consdb-hinfo and consdb-pqserver +200-65 #33
Changes from all commits
09cb45f
a1c5a95
d809865
a38ae4b
909e797
bae092b
192f896
b3e5cbb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
ARG OBS_LSST_VERSION=w_2024_21 | ||
FROM lsstsqre/centos:7-stack-lsst_distrib-${OBS_LSST_VERSION} | ||
USER lsst | ||
|
||
RUN source loadLSST.bash && mamba install aiokafka httpx | ||
RUN source loadLSST.bash && pip install kafkit | ||
COPY python/lsst/consdb/hinfo.py python/lsst/consdb/utils.py ./hinfo/ | ||
RUN source loadLSST.bash && pip install kafkit aiokafka httpx | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We generally try to avoid pip installing into conda environments whenever possible. Although it works pretty well nowadays, there's still some iffiness about the integration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to do this using only mamba, but it wouldn't cooperate. I think it's because we have to rely on newer versions of aiokafka that have not made their way to conda. My understanding is generally you can get away with mixing pip and conda as long as you never use conda again once you've used pip. |
||
|
||
WORKDIR /home/lsst/ | ||
COPY --chown=lsst . ./consdb/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like it copies too much for the hinfo service. |
||
WORKDIR /home/lsst/consdb/ | ||
RUN source /opt/lsst/software/stack/loadLSST.bash && pip install -e . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why this as well as the install above. |
||
|
||
# Environment variables that must be set: | ||
# INSTRUMENT: LATISS, LSSTComCam, LSSTCam | ||
|
@@ -16,4 +21,4 @@ COPY python/lsst/consdb/hinfo.py python/lsst/consdb/utils.py ./hinfo/ | |
# KAFKA_GROUP_ID: name of consumer group, default is "consdb-consumer" | ||
# KAFKA_USERNAME: username for SASL_PLAIN authentication, default is "consdb" | ||
|
||
ENTRYPOINT [ "bash", "-c", "source loadLSST.bash; setup obs_lsst; python ./hinfo/hinfo.py" ] | ||
ENTRYPOINT [ "bash", "-c", "source /opt/lsst/software/stack/loadLSST.bash; setup obs_lsst; python -m lsst.consdb.hinfo" ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG OBS_LSST_VERSION=w_2024_21 | ||
FROM lsstsqre/centos:7-stack-lsst_distrib-${OBS_LSST_VERSION} | ||
USER lsst | ||
RUN source loadLSST.bash && mamba install aiokafka httpx | ||
RUN source loadLSST.bash && pip install kafkit aiokafka httpx pytest-asyncio | ||
|
||
WORKDIR /home/lsst/ | ||
COPY --chown=lsst . ./consdb/ | ||
WORKDIR /home/lsst/consdb/ | ||
RUN source /opt/lsst/software/stack/loadLSST.bash && pip install -e . | ||
|
||
ENTRYPOINT [ "/bin/bash", "-c", "source /opt/lsst/software/stack/loadLSST.bash; setup obs_lsst; pytest ." ] |
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.
Wondering if this could be done in a container in the workflow: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainer
instead of building a new container and running in it.
The advantage would be that more of the test code is in the workflow file, where it's more visible, than in another Dockerfile.