Skip to content

Commit

Permalink
HDXDSYS-1684 Failure in HAPI Pipelines publishing (OCHA-DAP#218)
Browse files Browse the repository at this point in the history
* Update requirements in Docker
* Use uv instead of pip-compile
* Update Country requirement
* Scraper base image is obsolete - use python base image instead
  • Loading branch information
mcarans authored Jan 22, 2025
1 parent 90f0abb commit c74df0f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
submodules: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Login to Public ECR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: public.ecr.aws
username: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
Expand All @@ -37,11 +37,11 @@ jobs:

- name: Create prod requirements
run: |
pip install --upgrade pip-tools
pip-compile pyproject.toml --resolver=backtracking --upgrade -q -c requirements.txt -o prod-requirements.txt
pip install --upgrade uv
uv pip compile pyproject.toml --resolver=backtracking --upgrade -q -c requirements.txt -o prod-requirements.txt
- name: Build, tag, and push image to Amazon ECR
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.10.33] = 2025-01-22

### Fixed

- uv instead of pip-compile for publish GH Actions job

## [0.10.32] = 2025-01-22

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/unocha/hdx-scraper-baseimage:stable
FROM public.ecr.aws/unocha/python:3.12-stable

WORKDIR /srv

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ requires-python = ">=3.8"
dependencies = [
"hapi-schema>= 0.9.6",
"hdx-python-api>= 6.3.7",
"hdx-python-country>= 3.8.6",
"hdx-python-country>= 3.8.7",
"hdx-python-database[postgresql]>= 1.3.4",
"hdx-python-scraper>= 2.5.5",
"hdx-python-utilities>= 3.8.2",
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ attrs==24.3.0
# jsonlines
# jsonschema
# referencing
cachetools==5.5.0
cachetools==5.5.1
# via google-auth
certifi==2024.12.14
# via requests
Expand Down Expand Up @@ -60,7 +60,7 @@ hdx-python-api==6.3.7
# via
# hapi-pipelines (pyproject.toml)
# hdx-python-scraper
hdx-python-country==3.8.6
hdx-python-country==3.8.7
# via
# hapi-pipelines (pyproject.toml)
# hdx-python-api
Expand Down

0 comments on commit c74df0f

Please sign in to comment.