Skip to content

Commit

Permalink
Merge pull request #6 from podaac/release/0.4.0
Browse files Browse the repository at this point in the history
Release 0.4.0
  • Loading branch information
jamesfwood authored Jul 25, 2024
2 parents c0d8617 + 736c050 commit 2dbc205
Show file tree
Hide file tree
Showing 9 changed files with 348 additions and 336 deletions.
58 changes: 39 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build Pipeline for Forge-py
# Build Pipeline for hitide-backfill-lambdas
name: Build
# Controls when the workflow will run
on:
Expand Down Expand Up @@ -29,19 +29,13 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.1

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

#########################################################################
# Versioning (featuring weird gradle output work-arounds)
#########################################################################
Expand All @@ -56,7 +50,7 @@ jobs:
echo "pyproject_name=$(poetry version | awk '{print $1}')" >> $GITHUB_ENV
poetry version > .temp_version.out
cat .temp_version.out
the_version=$(cat .temp_version.out |grep -v Downloading |grep -v '%' |sed -e 's/forge-py *//')
the_version=$(cat .temp_version.out |grep -v Downloading |grep -v '%' |sed -e 's/hitide-backfill-lambdas *//')
rm .temp_version.out
echo "old_version=$the_version" >> $GITHUB_ENV
echo "the_version=$the_version" >> $GITHUB_ENV
Expand Down Expand Up @@ -186,14 +180,15 @@ jobs:
poetry version ${{ env.the_version }}
#########################################################################
# Install
# Install & Test & Snyk
#########################################################################
# NOTE: This step is platform-specific
# These are gradle-specific steps for installing the application
- name: Install Software
run: |
pip install pylint
pip install pytest
poetry build
poetry install
# This is where tests go
Expand All @@ -203,16 +198,29 @@ jobs:
poetry run flake8 podaac
poetry run pytest --junitxml=build/reports/pytest.xml --cov=podaac/ --cov-report=html -m "not aws and not integration" tests/
## TODO: Find out where the test report goes

- name: Run Snyk as a blocking step
uses: snyk/actions/python@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test
args: >
--org=${{ secrets.SNYK_ORG_ID }}
--project-name=${{ github.repository }}
--severity-threshold=high
--fail-on=all
#########################################################################
# Build
#########################################################################
- name: Install Software
run: |
poetry build
- name: Run Snyk on Python
uses: snyk/actions/python@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
args: >
--org=${{ secrets.SNYK_ORG_ID }}
--project-name=${{ github.repository }}
## TODO: Find out where the test report goes

#########################################################################
# Publish new version numbers
Expand Down Expand Up @@ -258,9 +266,21 @@ jobs:
# Publish release to releases
#########################################################################
- name: Create Zip release
if: |
github.ref == 'refs/heads/develop' ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release') ||
github.event.head_commit.message == '/deploy sit' ||
github.event.head_commit.message == '/deploy uat' ||
github.event.head_commit.message == '/deploy sandbox'
run: |
poetry run pip install -t package dist/*.whl
mv package/podaac/hitide_backfill_post_step package
mv package/podaac/hitide_backfill_sqs_to_step package
ls -la
ls -la package
cd package/; zip -r ../terraform/hitide-backfill-lambda.zip . -x '*.pyc'
cd ../; cd terraform; zip -r ../hitide-backfill-lambdas-${{ env.the_version }}.zip *
- name: Upload Release Artifacts
if: |
Expand Down
3 changes: 2 additions & 1 deletion .test_env
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ FORGE_STEP_ARN="arn:aws:states:us-east-1:123456789012:stateMachine:forge"
TIG_STEP_ARN="arn:aws:states:us-east-1:123456789012:stateMachine:tig"
STEP_RETRY="3"
REGION="us-east-1"
AWS_DEFAULT_REGION="us-east-1"

DB_NAME_SSM = "db_name"
DB_HOST_SSM = "db_host"
DB_USER_PASS_SSM = "pass"
DB_USER_NAME_SSM = "user"

SQS_URL="https://us-west-2.queue.amazonaws.com/123456789012/test_queue"
SQS_URL="https://us-east-1.queue.amazonaws.com/123456789012/test_queue"
63 changes: 58 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security


## [0.3.0]
## [0.4.0]

### Added
- Migrated into public Github [hitide-backfill-lambdas](https://github.com/podaac/hitide-backfill-lambdas) repo
- Combined hitide-backfill-post-step lambda and hitide-backfill-sqs-to-step into one repo
### Deprecated
### Removed
### Fixed
### Security


## [0.3.0] hitide-backfill-post-step

### Added
- Update lambda use arm architecture
Expand All @@ -24,7 +35,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security


## [0.2.2]
## [0.3.0] hitide-backfill-sqs-to-step

### Added
- Update lambda to use arm architechture
### Deprecated
### Removed
### Fixed
### Security


## [0.2.2] hitide-backfill-post-step

### Added
- Updated python version to 3.9, poetry version to 1.5.1, and dependency libraries
Expand All @@ -34,7 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security


## [0.2.1]
## [0.2.1] hitide-backfill-post-step

### Added
### Deprecated
Expand All @@ -46,7 +67,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security


## [0.2.0]
## [0.2.1] hitide-backfill-sqs-to-step

### Added
- Updated python version to 3.9, poetry version to 1.5.1, and dependency libraries
### Deprecated
### Removed
### Fixed
### Security


## [0.2.0] hitide-backfill-post-step

### Added
- **PODAAC-5229
Expand All @@ -58,7 +89,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security


## [0.1.0]
## [0.2.0] hitide-backfill-sqs-to-step

### Added
- **PODAAC-5127**
- Added in ability to create dmrpp workflows and parallelized step function creation.
### Deprecated
### Removed
### Fixed
### Security


## [0.1.0] hitide-backfill-post-step

### Added
- **PODAAC-4424**
Expand All @@ -68,3 +110,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Fixed
### Security


## [0.1.0] hitide-backfill-sqs-to-step

### Added
- **PODAAC-4424**
- Implementation of hitide backfill sqs to step function lambda.
### Deprecated
### Removed
### Fixed
### Security
1 change: 1 addition & 0 deletions podaac/hitide_backfill_post_step/lambda_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def lambda_handler(event, context): # pylint: disable=unused-argument, disable-
granule_start_time = parser.parse(cli_params.get('granule_start'))
granule_end_time = parser.parse(cli_params.get('granule_end'))

sf_type = cli_execution = None
if step_arn == tig_step_arn:
sf_type = "TIG"
elif step_arn == forge_step_arn:
Expand Down
Loading

0 comments on commit 2dbc205

Please sign in to comment.