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

Speed up spack git clone in docker build #896

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/custom_docker_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- docker-image: ./images/cache-indexer
image-tags: ghcr.io/spack/cache-indexer:0.0.3
- docker-image: ./analytics
image-tags: ghcr.io/spack/django:0.3.2
image-tags: ghcr.io/spack/django:0.3.3
- docker-image: ./images/ci-prune-buildcache
image-tags: ghcr.io/spack/ci-prune-buildcache:0.0.3
- docker-image: ./images/protected-publish
Expand Down
3 changes: 1 addition & 2 deletions analytics/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ RUN apt-get update && \
&& rm -rf /var/lib/apt/lists/*

# Install spack
RUN git clone -c feature.manyFiles=true https://github.com/spack/spack.git /opt/spack
RUN cd /opt/spack && git checkout v0.22.0
RUN git clone -c feature.manyFiles=true --depth 1 --branch v0.22.0 https://github.com/spack/spack.git /opt/spack

# Include spack import paths for python packages. Order is important
ENV PYTHONPATH "/opt/spack/lib/spack:$PYTHONPATH"
Expand Down
5 changes: 4 additions & 1 deletion analytics/analytics/job_processor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def process_job(job_input_data_json: str):
# Retrieve project and job from gitlab API
# TODO: Seems to be very slow and sometimes times out. Look into using shared session?
gl = gitlab.Gitlab(
settings.GITLAB_ENDPOINT, settings.GITLAB_TOKEN, retry_transient_errors=True
settings.GITLAB_ENDPOINT,
settings.GITLAB_TOKEN,
retry_transient_errors=True,
timeout=15,
)
gl_project = gl.projects.get(job_input_data["project_id"])
gl_job = gl_project.jobs.get(job_input_data["build_id"])
Expand Down
4 changes: 2 additions & 2 deletions k8s/production/custom/webhook-handler/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
serviceAccountName: webhook-handler
containers:
- name: webhook-handler
image: ghcr.io/spack/django:0.3.2
image: ghcr.io/spack/django:0.3.3
imagePullPolicy: Always
resources:
requests:
Expand Down Expand Up @@ -146,7 +146,7 @@ spec:
serviceAccountName: webhook-handler
containers:
- name: webhook-handler-worker
image: ghcr.io/spack/django:0.3.2
image: ghcr.io/spack/django:0.3.3
command: ["celery", "-A", "analytics.celery", "worker", "-l", "info", "-Q", "celery"]
imagePullPolicy: Always
resources:
Expand Down