Skip to content

Commit d7df2c1

Browse files
author
Bob Strahan
committed
Merge branch 'develop'
2 parents 6c4beb3 + cd9736e commit d7df2c1

File tree

61 files changed

+8619
-6035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+8619
-6035
lines changed

.github/workflows/developer-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ jobs:
1515
name: Lint, Type Check, and Test
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 120 # 2 hours
18+
19+
permissions:
20+
contents: read
21+
issues: read
22+
checks: write
23+
# pull-requests: write - Not needed: PR comments are disabled (see line 115)
1824

1925
# Use Python 3.13 to match GitLab configuration
2026
container:

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,9 @@ package-lock.json
3131

3232
# Type checking
3333
pyrightconfig.temp.json
34-
.pyright/
34+
.pyright/
35+
36+
# Python virtual environments
37+
.venv/
38+
.venv-*/
39+
venv/

.gitlab-ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ deployment_validation:
9595
integration_tests:
9696
stage: integration_tests
9797
timeout: 2h
98+
variables:
99+
IDP_ADMIN_EMAIL: ${GITLAB_USER_EMAIL}
98100
# variables:
99101
# # In order to run tests in another account, add a AWS_CREDS_TARGET_ROLE variable to the Gitlab pipeline variables.
100102
# AWS_CREDS_TARGET_ROLE: ${AWS_CREDS_TARGET_ROLE}
@@ -136,3 +138,34 @@ integration_tests:
136138

137139
# Run integration test deployment
138140
- python3 scripts/integration_test_deployment.py
141+
142+
after_script:
143+
# Display CodeBuild logs directly in GitLab runner console
144+
- |
145+
if [ -f "pipeline_execution_id.txt" ]; then
146+
EXECUTION_ID=$(cat pipeline_execution_id.txt)
147+
echo "Pipeline Execution: $EXECUTION_ID"
148+
149+
# Get CodeBuild ID from the pipeline execution
150+
BUILD_ID=$(aws codepipeline list-action-executions --pipeline-name ${IDP_PIPELINE_NAME:-idp-sdlc-deploy-pipeline} --filter pipelineExecutionId=$EXECUTION_ID --query 'actionExecutionDetails[?actionName==`BuildAction`].output.executionResult.externalExecutionId' --output text 2>/dev/null || echo "")
151+
152+
if [ "$BUILD_ID" != "" ] && [ "$BUILD_ID" != "None" ]; then
153+
echo "CodeBuild ID: $BUILD_ID"
154+
# Extract just the build ID part (after the colon)
155+
LOG_STREAM_NAME="${BUILD_ID#*:}"
156+
echo "Log Stream: $LOG_STREAM_NAME"
157+
echo ""
158+
echo "=== CODEBUILD LOGS ==="
159+
aws logs get-log-events --log-group-name "/aws/codebuild/app-sdlc" --log-stream-name "$LOG_STREAM_NAME" --start-from-head --query 'events[].message' --output text 2>/dev/null || echo "Could not retrieve CodeBuild logs"
160+
else
161+
echo "Could not find CodeBuild execution"
162+
fi
163+
else
164+
echo "No pipeline execution ID found"
165+
fi
166+
167+
artifacts:
168+
when: always
169+
paths:
170+
- pipeline_execution_id.txt
171+
expire_in: 1 week

ANALYSIS_JSON_SCHEMA_LIBRARIES.md

Lines changed: 0 additions & 236 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,34 @@ SPDX-License-Identifier: MIT-0
55

66
## [Unreleased]
77

8+
## [0.4.1]
9+
10+
### Changed
11+
12+
- **Configuration Library Updates with JSON Schema Support**
13+
- Updated configuration library with JSON schema format for lending package, bank statement, and RVL-CDIP package samples
14+
- Enhanced configuration files to align with JSON Schema Draft 2020-12 format introduced in v0.4.0
15+
- Updated notebooks and documentation to reflect JSON schema configuration structure
16+
17+
### Fixed
18+
19+
- **UI Few Shot Examples Display** - Fixed issue where few shot examples were not displaying correctly from configuration in the Web UI
20+
- **Re-enabled Regex Functionality** - Restored document name and page content regex functionality for Pattern-2 classification that was temporarily missing
21+
- **Pattern-2 ECR Enhanced Scanning Support** - Added required IAM permissions (inspector2:ListCoverage, inspector2:ListFindings) to Pattern2DockerBuildRole to support AWS accounts with Amazon Inspector Enhanced Scanning enabled. Also added KMS permissions (kms:Decrypt, kms:CreateGrant) for customer-managed encryption keys. This resolves AccessDenied errors and CodeBuild timeouts when deploying Pattern-2 in accounts with enhanced scanning enabled.
22+
- **Reporting Database Data Loss After Evaluation Refactoring - Fixes #121**
23+
- Fixed bug where metering data and document_section data stopped being written to the reporting database after evaluation was migrated from EventBridge to Step Functions workflow
24+
- **IDP CLI Deploy Command Parameter Preservation Bug**
25+
- Fixed bug where `idp-cli deploy` command was resetting ALL stack parameters to their default values during updates, even when users only intended to change specific parameters
26+
- **Pattern-2 Intermittent HITLStatusUpdateFunction ECR Access Failure**
27+
- Fixed intermittent "Lambda does not have permission to access the ECR image" (403) errors during Pattern-2 deployment
28+
- **Root Cause**: Race condition where Lambda functions were created before ECR images were fully available and scannable
29+
- **Solution**: Enhanced CodeBuild custom resource to verify ECR image availability before completing, including:
30+
- Verification that all required Lambda images exist in ECR repository
31+
- Check that image scanning is complete (repository has `ScanOnPush: true`)
32+
- **New Parameter**: Added `EnablePattern2ECRImageScanning` parameter (current default: false) to allow users to enable/disable ECR vulnerability scanning if experiencing deployment issues
33+
- Recommended: Set enabled (true) for production to maintain security posture
34+
- Optional: Disable (false) only as temporary workaround for deployment reliability
35+
836
## [0.4.0]
937

1038
> **⚠️ IMPORTANT NOTICE - SIGNIFICANT CONFIGURATION CHANGES**

Makefile

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test:
1515
cd idp_cli && python -m pytest -v
1616

1717
# Run both linting and formatting in one command
18-
lint: ruff-lint format check-arn-partitions
18+
lint: ruff-lint format check-arn-partitions validate-buildspec ui-lint
1919

2020
# Run linting checks and fix issues automatically
2121
ruff-lint:
@@ -38,9 +38,28 @@ lint-cicd:
3838
echo -e "$(RED)ERROR: Code formatting check failed!$(NC)"; \
3939
echo -e "$(YELLOW)Please run 'make format' locally to fix these issues.$(NC)"; \
4040
exit 1; \
41+
fi; \
42+
echo "All checks passed!"
43+
@echo "Frontend checks"
44+
@if ! make ui-lint; then \
45+
echo -e "$(RED)ERROR: UI lint failed$(NC)"; \
46+
exit 1; \
47+
fi
48+
49+
@if ! make ui-build; then \
50+
echo -e "$(RED)ERROR: UI build failed$(NC)"; \
51+
exit 1; \
4152
fi
53+
4254
@echo -e "$(GREEN)All code quality checks passed!$(NC)"
4355

56+
# Validate AWS CodeBuild buildspec files
57+
validate-buildspec:
58+
@echo "Validating buildspec files..."
59+
@python3 scripts/validate_buildspec.py patterns/*/buildspec.yml || \
60+
(echo -e "$(RED)ERROR: Buildspec validation failed!$(NC)" && exit 1)
61+
@echo -e "$(GREEN)✅ All buildspec files are valid!$(NC)"
62+
4463
# Check CloudFormation templates for hardcoded AWS partition ARNs and service principals
4564
check-arn-partitions:
4665
@echo "Checking CloudFormation templates for hardcoded ARN partitions and service principals..."
@@ -90,6 +109,14 @@ typecheck-pr:
90109
python3 scripts/typecheck_pr_changes.py $(TARGET_BRANCH)
91110

92111

112+
ui-lint:
113+
@echo "Checking UI lint"
114+
cd src/ui && npm ci --prefer-offline --no-audit && npm run lint
115+
116+
ui-build:
117+
@echo "Checking UI build"
118+
cd src/ui && npm ci --prefer-offline --no-audit && npm run build
119+
93120
commit: lint test
94121
$(info Generating commit message...)
95122
export COMMIT_MESSAGE="$(shell q chat --no-interactive --trust-all-tools "Understand pending local git change and changes to be committed, then infer a commit message. Return this commit message only" | tail -n 1 | sed 's/\x1b\[[0-9;]*m//g')" && \

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.0
1+
0.4.1

0 commit comments

Comments
 (0)