Skip to content

Commit 78c2e14

Browse files
authored
Merge pull request #103 from podaac/release/0.15.0
Release 0.15.0
2 parents 4fd84ed + 8d97c14 commit 78c2e14

16 files changed

Lines changed: 1543 additions & 1772 deletions

File tree

.github/workflows/.release-created.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
${{ startsWith(github.ref, 'refs/heads/release/') }}
1717
steps:
1818
# Checks-out the develop branch
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
with:
2121
ref: 'refs/heads/develop'
22-
- uses: actions/setup-python@v5
22+
- uses: actions/setup-python@v6
2323
with:
24-
python-version: '3.10'
24+
python-version: '3.12'
2525

2626
- name: Install Poetry
27-
uses: abatilo/actions-poetry@v3
27+
uses: abatilo/actions-poetry@v4
2828
with:
29-
poetry-version: 1.8.5
29+
poetry-version: 2.1.3
3030

3131
- name: Bump minor version
3232
run: |

.github/workflows/build.yml

Lines changed: 92 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
env:
1616
REGISTRY: ghcr.io
1717
IMAGE_NAME: ${{ github.repository }}
18-
PYTHON_VERSION: '3.10'
19-
POETRY_VERSION: '1.8.5'
18+
PYTHON_VERSION: '3.12'
19+
POETRY_VERSION: '2.3.2'
2020
TERRAFORM_VERSION: '1.5.3'
2121

2222
jobs:
@@ -29,19 +29,26 @@ jobs:
2929
packages: write
3030
id-token: write
3131

32+
outputs:
33+
new_version: ${{ steps.build-outputs.outputs.new_version }}
34+
pyproject_name: ${{ steps.build-outputs.outputs.pyproject_name }}
35+
target_env_uppercase: ${{ steps.build-outputs.outputs.target_env_uppercase }}
36+
target_env_lowercase: ${{ steps.build-outputs.outputs.target_env_lowercase }}
37+
source: ${{ steps.build-outputs.outputs.source }}
38+
3239
steps:
33-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v6
3441
with:
3542
fetch-depth: 0 # Needed for proper versioning
3643

3744
- name: Setup Python
38-
uses: actions/setup-python@v5
45+
uses: actions/setup-python@v6
3946
with:
4047
python-version: ${{ env.PYTHON_VERSION }}
4148
cache: 'pip'
4249

4350
- name: Setup Poetry
44-
uses: abatilo/actions-poetry@v3
51+
uses: abatilo/actions-poetry@v4
4552
with:
4653
poetry-version: ${{ env.POETRY_VERSION }}
4754

@@ -55,17 +62,6 @@ jobs:
5562
path: .venv
5663
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
5764

58-
- name: Set up QEMU
59-
uses: docker/setup-qemu-action@v3
60-
61-
- name: Set up Docker Buildx
62-
uses: docker/setup-buildx-action@v3
63-
64-
- name: Setup Terraform
65-
uses: hashicorp/setup-terraform@v3
66-
with:
67-
terraform_version: 1.5.3
68-
6965
- name: Version Management
7066
id: versioning
7167
run: |
@@ -204,23 +200,12 @@ jobs:
204200
if: |
205201
github.ref == 'refs/heads/develop' ||
206202
github.ref == 'refs/heads/main' ||
207-
startsWith(github.ref, 'refs/heads/release/')
203+
startsWith(github.ref, 'refs/heads/release/') ||
204+
github.event.head_commit.message == '/deploy sit' ||
205+
github.event.head_commit.message == '/deploy uat'
208206
run: |
209207
pip install tenacity logging
210208
python3 ${GITHUB_WORKSPACE}/.github/workflows/wait-for-pypi.py ${{env.pyproject_name}}[harmony]==${{ env.new_version }}
211-
212-
- name: Log in to the Container registry
213-
if: |
214-
github.ref == 'refs/heads/develop' ||
215-
github.ref == 'refs/heads/main' ||
216-
startsWith(github.ref, 'refs/heads/release') ||
217-
github.event.head_commit.message == '/deploy sit' ||
218-
github.event.head_commit.message == '/deploy uat'
219-
uses: docker/login-action@v3
220-
with:
221-
registry: ${{ env.REGISTRY }}
222-
username: ${{ github.actor }}
223-
password: ${{ secrets.GITHUB_TOKEN }}
224209
225210
- name: Deploy Env Override
226211
if: |
@@ -240,43 +225,81 @@ jobs:
240225
lowercase_value=$(echo "${original_env_value}" | tr '[:upper:]' '[:lower:]')
241226
echo "TARGET_ENV_LOWERCASE=${lowercase_value}" >> $GITHUB_ENV
242227
243-
- name: Extract metadata (tags, labels) for Docker
228+
- name: Set Build Source
229+
id: set-source
230+
run: |
231+
# Use test PyPI package format (Dockerfile will find it via extra-index-url)
232+
echo "SOURCE=${{ env.pyproject_name }}==${{ env.new_version }}" >> $GITHUB_ENV
233+
234+
- name: Set build outputs
235+
id: build-outputs
236+
run: |
237+
echo "new_version=${{ env.new_version }}" >> $GITHUB_OUTPUT
238+
echo "pyproject_name=${{ env.pyproject_name }}" >> $GITHUB_OUTPUT
239+
echo "target_env_uppercase=${{ env.TARGET_ENV_UPPERCASE }}" >> $GITHUB_OUTPUT
240+
echo "target_env_lowercase=${{ env.TARGET_ENV_LOWERCASE }}" >> $GITHUB_OUTPUT
241+
echo "source=${{ env.SOURCE }}" >> $GITHUB_OUTPUT
242+
243+
- name: Upload terraform zip artifact
244244
if: |
245245
github.ref == 'refs/heads/develop' ||
246246
github.ref == 'refs/heads/main' ||
247247
startsWith(github.ref, 'refs/heads/release') ||
248248
github.event.head_commit.message == '/deploy sit' ||
249-
github.event.head_commit.message == '/deploy uat'
249+
github.event.head_commit.message == '/deploy uat'
250+
uses: actions/upload-artifact@v4
251+
with:
252+
name: terraform-zip
253+
path: tig-terraform-${{ env.new_version }}.zip
254+
retention-days: 1
255+
256+
deploy:
257+
name: Deploy Docker and Terraform
258+
runs-on: ubuntu-24.04-arm
259+
needs: build
260+
if: |
261+
github.ref == 'refs/heads/develop' ||
262+
github.ref == 'refs/heads/main' ||
263+
startsWith(github.ref, 'refs/heads/release') ||
264+
github.event.head_commit.message == '/deploy sit' ||
265+
github.event.head_commit.message == '/deploy uat'
266+
permissions:
267+
contents: read
268+
packages: write
269+
id-token: write
270+
271+
steps:
272+
- uses: actions/checkout@v6
273+
with:
274+
fetch-depth: 0
275+
276+
- name: Set deployment variables from build outputs
277+
run: |
278+
echo "NEW_VERSION=${{ needs.build.outputs.new_version }}" >> $GITHUB_ENV
279+
echo "PYPROJECT_NAME=${{ needs.build.outputs.pyproject_name }}" >> $GITHUB_ENV
280+
echo "TARGET_ENV_UPPERCASE=${{ needs.build.outputs.target_env_uppercase }}" >> $GITHUB_ENV
281+
echo "TARGET_ENV_LOWERCASE=${{ needs.build.outputs.target_env_lowercase }}" >> $GITHUB_ENV
282+
echo "SOURCE=${{ needs.build.outputs.source }}" >> $GITHUB_ENV
283+
284+
- name: Log in to the Container registry
285+
uses: docker/login-action@v3
286+
with:
287+
registry: ${{ env.REGISTRY }}
288+
username: ${{ github.actor }}
289+
password: ${{ secrets.GITHUB_TOKEN }}
290+
291+
- name: Extract metadata (tags, labels) for Docker
250292
id: meta
251293
uses: docker/metadata-action@v5
252294
with:
253295
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
254296
flavor: |
255297
latest=${{ github.ref == 'refs/heads/main' }}
256298
tags: |
257-
type=pep440,pattern={{version}},value=${{ env.new_version }}
299+
type=pep440,pattern={{version}},value=${{ env.NEW_VERSION }}
258300
type=raw,value=${{ env.TARGET_ENV_LOWERCASE }}
259301
260-
- name: Set Build Source
261-
id: set-source
262-
run: |
263-
# Default build source for standard branches
264-
echo "SOURCE=${{ env.pyproject_name }}==${{ env.new_version }}" >> $GITHUB_ENV
265-
266-
if [[ "${{ contains(github.event.head_commit.message, '/deploy sit') ||
267-
contains(github.event.head_commit.message, '/deploy uat') }}" == "true" ]]; then
268-
local_tig=$(find dist -type f -name "*.whl")
269-
echo "SOURCE=${local_tig}" >> $GITHUB_ENV
270-
echo "DIST_PATH=dist/" >> $GITHUB_ENV
271-
fi
272-
273302
- name: Build and Push Docker Image
274-
if: |
275-
github.ref == 'refs/heads/develop' ||
276-
github.ref == 'refs/heads/main' ||
277-
startsWith(github.ref, 'refs/heads/release') ||
278-
github.event.head_commit.message == '/deploy sit' ||
279-
github.event.head_commit.message == '/deploy uat'
280303
uses: docker/build-push-action@v6
281304
with:
282305
context: .
@@ -288,38 +311,33 @@ jobs:
288311
platforms: linux/arm64
289312
build-args: |
290313
SOURCE=${{ env.SOURCE }}
291-
DIST_PATH=${{ env.DIST_PATH || '' }}
292-
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/cache:tig-cache
293-
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/cache:tig-cache,mode=max
314+
315+
- name: Setup Terraform
316+
uses: hashicorp/setup-terraform@v3
317+
with:
318+
terraform_version: 1.5.3
319+
320+
- name: Get Docker image tag
321+
id: docker-tag
322+
run: |
323+
# Extract the first tag (version tag) from metadata output
324+
DOCKER_IMAGE_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1)
325+
echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV
326+
echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_OUTPUT
294327
295328
- name: Deploy Terraform
296-
if: |
297-
github.ref == 'refs/heads/develop' ||
298-
github.ref == 'refs/heads/main' ||
299-
startsWith(github.ref, 'refs/heads/release') ||
300-
github.event.head_commit.message == '/deploy sit' ||
301-
github.event.head_commit.message == '/deploy uat'
302329
working-directory: terraform_deploy/
303330
env:
304331
AWS_ACCESS_KEY_ID: ${{ secrets[format('AWS_ACCESS_KEY_ID_SERVICES_{0}', env.TARGET_ENV_UPPERCASE)] }}
305332
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_SERVICES_{0}', env.TARGET_ENV_UPPERCASE)] }}
306333
AWS_ACCOUNT_ID: ${{ secrets[format('AWS_ACCOUNT_ID_SERVICES_{0}', env.TARGET_ENV_UPPERCASE)] }}
307334
AWS_DEFAULT_REGION: us-west-2
308335

309-
TF_VAR_tig_docker_image: "ghcr.io/podaac/tig:${{ env.DOCKER_METADATA_OUTPUT_VERSION }}"
336+
TF_VAR_tig_docker_image: ${{ env.DOCKER_IMAGE_TAG }}
310337
TF_VAR_EARTH_DATA_LOGIN_CLIENT_ID: ${{ secrets[format('EARTH_DATA_LOGIN_CLIENT_ID_{0}', env.TARGET_ENV_UPPERCASE)] }}
311338
TF_VAR_EARTH_DATA_LOGIN_PASSWORD: ${{ secrets[format('EARTH_DATA_LOGIN_PASSWORD_{0}', env.TARGET_ENV_UPPERCASE)] }}
312339
run: |
313-
ls -al
314-
ls -al bin/
315-
which python3
316-
python3 --version
317-
python3 override.py https://github.com/podaac/tig/releases/download/${{ env.new_version }}/tig-terraform-${{ env.new_version }}.zip "ghcr.io/podaac/tig:${{ env.DOCKER_METADATA_OUTPUT_VERSION }}"
318-
ls -al
319-
echo "Show override contents"
320-
cat override.tf.json
321-
echo "End show override contents"
322-
terraform --version
340+
python3 override.py https://github.com/podaac/tig/releases/download/${{ env.NEW_VERSION }}/tig-terraform-${{ env.NEW_VERSION }}.zip "${{ env.DOCKER_IMAGE_TAG }}"
323341
source bin/config.sh ${{ env.TARGET_ENV_LOWERCASE }}
324-
terraform plan -var-file=tfvars/"${{ env.TARGET_ENV_LOWERCASE }}".tfvars -var="app_version=${{ env.new_version }}" -out="tfplan"
325-
terraform apply -auto-approve tfplan > /dev/null
342+
terraform plan -var-file=tfvars/"${{ env.TARGET_ENV_LOWERCASE }}".tfvars -var="app_version=${{ env.NEW_VERSION }}" -out="tfplan"
343+
terraform apply -auto-approve tfplan > /dev/null

.github/workflows/wait-for-pypi.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,27 @@
33
import tempfile
44
import logging
55
import subprocess
6-
76
import tenacity
8-
7+
import time
98
'''
109
Sometimes the package published to PyPi is not immediately available for download from the index. This script
1110
simply repeatedly tries to download a specific version of a package from PyPI (or test.pypi) until it succeeds or
1211
a limit is exceeded.
1312
'''
14-
15-
1613
@tenacity.retry(
1714
wait=tenacity.wait_exponential(multiplier=1, min=4, max=10),
1815
retry=tenacity.retry_if_exception_type(subprocess.CalledProcessError),
1916
stop=tenacity.stop_after_delay(120),
2017
before_sleep=tenacity.before_sleep_log(logging.getLogger(__name__), logging.DEBUG)
2118
)
2219
def download_package(package):
20+
time.sleep(20) # Wait 20 seconds before first try
2321
subprocess.check_call([sys.executable, '-m',
2422
'pip', '--isolated', '--no-cache-dir',
2523
'download', '--no-deps', '-d', tempfile.gettempdir(), '--index-url',
2624
'https://pypi.org/simple/',
2725
'--extra-index-url', 'https://test.pypi.org/simple/', package
2826
])
29-
30-
3127
if __name__ == '__main__':
3228
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
3329
package_spec = sys.argv[1]

.pylintrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ persistent=yes
3636
# Specify a configuration file.
3737
#rcfile=
3838

39-
# When enabled, pylint would attempt to guess common misconfiguration and emit
40-
# user-friendly hints instead of false-positive error messages.
41-
suggestion-mode=yes
4239

4340
# Allow loading of arbitrary C extensions. Extensions are imported into the
4441
# active Python interpreter and may run arbitrary code.

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Security
1515

1616

17+
## [0.15.0]
18+
19+
### Added
20+
### Changed
21+
- Update to python 3.12
22+
- Update github actions build to use arm ubuntu to build images
23+
- Update poetry version 2.3.2
24+
### Deprecated
25+
### Removed
26+
### Fixed
27+
- [issue/72] (https://github.com/podaac/hitide/issues/72): empty granules for VIIRS_NPP-NAVO-L2P-v3.0 moved up code where we test lon lat for nans.
28+
- [issue/78] (https://github.com/podaac/hitide/issues/78): error message for empty granules
29+
- [issue/87] (https://github.com/podaac/hitide/issues/87): output message from cli call on input used to call tig.
30+
### Security
31+
32+
1733
## [0.14.0]
1834

1935
### Added

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2026 California Institute of Technology
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.10-slim
1+
FROM python:3.12-slim
22

33
RUN apt-get update \
44
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \

docker/lambdaDockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG FUNCTION_DIR="/function"
22

3-
FROM python:3.10-slim as build-image
3+
FROM python:3.12-slim as build-image
44

55
# Include global arg in this stage of the build
66
ARG FUNCTION_DIR

0 commit comments

Comments
 (0)