Skip to content

Commit

Permalink
Merge pull request #23 from aws-solutions/release/v1.0.4
Browse files Browse the repository at this point in the history
Version v1.0.4 release
  • Loading branch information
mttwise authored Feb 28, 2024
2 parents 9b4a234 + 17e37df commit cd43bc0
Show file tree
Hide file tree
Showing 65 changed files with 267 additions and 244 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ coverage.xml
.hypothesis/
.pytest_cache/
cover/
*-cfnlogs.txt
.nightswatch/functional/results

# Translations
*.mo
Expand Down
56 changes: 28 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ repos:
rev: v3.2.0
hooks:
- id: check-byte-order-marker # Forbid UTF-8 byte-order markers
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: check-case-conflict # Check for files with names that would conflict on a case-insensitive
# filesystem like MacOS HFS+ or Windows FAT.
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: check-json
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: check-yaml
exclude: (^source/backstage/examples|^.*/catalog-info.yaml|^templates)
- id: check-toml
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: check-merge-conflict
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: check-added-large-files
exclude: |
(?x)^(
Expand All @@ -24,25 +24,25 @@ repos:
^.*/Pipfile.lock
)$
- id: end-of-file-fixer
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: fix-encoding-pragma
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: trailing-whitespace
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: mixed-line-ending
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: sort-simple-yaml # Requires explicit files parameter to enable file matching
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- id: detect-aws-credentials
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
args: ["--credentials-file", "~/.ada/credentials"]
- id: detect-private-key
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: insert-license
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
files: \.py$
args:
- --license-filepath
Expand All @@ -52,7 +52,7 @@ repos:
rev: v1.5.1
hooks:
- id: insert-license
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
files: \.tsx|.ts$
args:
- --license-filepath
Expand All @@ -64,65 +64,65 @@ repos:
rev: 22.3.0
hooks:
- id: black
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- repo: https://github.com/hadialqattan/pycln
rev: v2.2.2
hooks:
- id: pycln
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
args: ["--profile", "black"]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
args: ["-c", "pyproject.toml"]
additional_dependencies: [ "bandit[toml]" ]
# - repo: https://github.com/kontrolilo/kontrolilo
# rev: v2.2.0
# hooks:
# - id: license-check-configuration-lint
# exclude: (^templates)
# exclude: ^(templates/|.nightswatch/)
# language: python
# - id: license-check-pipenv
# exclude: (^templates)
# exclude: ^(templates/|.nightswatch/)
# language: python
# - id: license-check-npm
# exclude: (^templates)
# exclude: ^(templates/|.nightswatch/)
# language: python
- repo: https://github.com/pypa/pip-audit
rev: v2.6.1
hooks:
- id: pip-audit
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)

# Local hooks
- repo: local
hooks:
- id: check-bash-syntax
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
name: Check Shell scripts syntax correctness
language: system
entry: bash -n
files: \.sh$
- repo: local
hooks:
- id: detect-empty-files
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
name: Detect empty files in the repo
entry: deployment/detect-empty-files.sh
language: system
pass_filenames: false
- repo: local
hooks:
- id: pylint
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
name: pylint
entry: pylint
args: ["--extension-pkg-allow-list", "math"]
Expand All @@ -132,7 +132,7 @@ repos:
- repo: local
hooks:
- id: mypy
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
name: mypy
entry: mypy
types_or: [python, pyi]
Expand All @@ -142,7 +142,7 @@ repos:
- repo: local
hooks:
- id: cfn-nag
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
name: cfn-nag
entry: deployment/run-cfn-nag.sh
files: infrastructure
Expand All @@ -153,7 +153,7 @@ repos:
- repo: local
hooks:
- id: pytest-jest
exclude: (^templates)
exclude: ^(templates/|.nightswatch/)
name: pytest-jest
entry: deployment/run-unit-tests.sh
args: ["--no-report", "--no-nested"]
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.4] - 2024-02-28

### Fixed

- Upgrade backstage to 1.23.3 to mitigate vulnerability
- Fix a bug that could occur if the s3 version of the backstage source was prefixed with a special character.


## [1.0.3] - 2024-02-23

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ If you discover a potential security issue in this project we ask that you notif

## Licensing

See the [LICENSE](https://github.com/aws-solutions/connected-mobility-solution-on-aws/blob/main/LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
See the [LICENSE](https://github.com/aws-solutions/connected-mobility-solution-on-aws/blob/main/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

We may ask you to sign a [Contributor License Agreement (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,10 @@ Refer to the implementation guide for pricing information.

## Collection of Operational Metrics

This solution collects anonymous operational metrics to help AWS improve
This solution collects anonymized operational metrics to help AWS improve
the quality and features of the solution. For more information, including
how to disable this capability, please see the
[implementation guide](https://docs.aws.amazon.com/solutions/latest/connected-mobility-solution-on-aws/operational-metrics.html).
[implementation guide](https://docs.aws.amazon.com/solutions/latest/connected-mobility-solution-on-aws/anonymized-data-collection.html).

## Teardown

Expand Down
4 changes: 2 additions & 2 deletions deployment/build-s3-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ if [ -z "$dist_bucket_name" ] || [ -z "$template_bucket_name" ] || [ -z "$soluti
template_bucket_name=${template_bucket_name:-"connected-mobility-solution-on-aws"}
read -p "Solution Name [connected-mobility-solution-on-aws]: " solution_name
solution_name=${solution_name:-"connected-mobility-solution-on-aws"}
read -p "Solution Version [v1.0.3]: " solution_version
solution_version=${solution_version:-"v1.0.3"}
read -p "Solution Version [v1.0.4]: " solution_version
solution_version=${solution_version:-"v1.0.4"}
fi

dashed_version="${solution_version//./$'_'}"
Expand Down
4 changes: 2 additions & 2 deletions deployment/cdk-solution-helper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ After build script run:
"Properties": {
"Code": {
"S3Bucket": "solutions",
"S3Key": "trademarked-solution-name/v1.0.3/asset.d513e93e266931de36e1c7e79c27b196f84ab928fce63d364d9152ca501551f7.zip"
"S3Key": "trademarked-solution-name/v1.0.4/asset.d513e93e266931de36e1c7e79c27b196f84ab928fce63d364d9152ca501551f7.zip"
}, ...
"Handler": "assetd513e93e266931de36e1c7e79c27b196f84ab928fce63d364d9152ca501551f7/index.handler"
```
Expand All @@ -91,7 +91,7 @@ After CloudFormation deployment:
"Properties": {
"Code": {
"S3Bucket": "solutions-us-east-1",
"S3Key": "trademarked-solution-name/v1.0.3/asset.d513e93e266931de36e1c7e79c27b196f84ab928fce63d364d9152ca501551f7.zip"
"S3Key": "trademarked-solution-name/v1.0.4/asset.d513e93e266931de36e1c7e79c27b196f84ab928fce63d364d9152ca501551f7.zip"
}, ...
"Handler": "assetd513e93e266931de36e1c7e79c27b196f84ab928fce63d364d9152ca501551f7/index.handler"
```
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setuptools.setup(
name="connected-mobility-solution-on-aws",
version="1.0.3",
version="1.0.4",
description="The administrative module to deploy all CMS modules and assets",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion source/backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Basic usage should stay within the free tier.

## Collection of Operational Metrics

This solution collects anonymous operational metrics to help AWS improve
This solution collects anonymized operational metrics to help AWS improve
the quality and features of the solution. For more information, including
how to disable this capability, please see the
[implementation guide](https://docs.aws.amazon.com/solutions/latest/connected-mobility-solution-on-aws/operational-metrics.html).
Expand Down
2 changes: 1 addition & 1 deletion source/backstage/backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.19.5"
"version": "1.23.3"
}
6 changes: 2 additions & 4 deletions source/backstage/cdk/source/config/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ class BackstageConstantsClass:
SOLUTION_NAME: str = "Connected Mobility Solution on AWS"
APPLICATION_TYPE: str = "AWS-Solutions"
SOLUTION_ID: str = "SO0241"
SOLUTION_VERSION: str = "v1.0.3"
SOLUTION_VERSION: str = "v1.0.4"
CAPABILITY_ID = "CMS.6"
USER_AGENT_STRING: str = (
f"AWSSOLUTION/{SOLUTION_ID}/{SOLUTION_VERSION} AWSSOLUTION-CAPABILITY/{CAPABILITY_ID}/{SOLUTION_VERSION}"
)
USER_AGENT_STRING: str = f"AWSSOLUTION/{SOLUTION_ID}/{SOLUTION_VERSION} AWSSOLUTION-CAPABILITY/{CAPABILITY_ID}/{SOLUTION_VERSION}"


BackstageConstants = BackstageConstantsClass()
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"commands": [
"cd cdk",
"pipenv install --dev",
"STACK_TARGET=\"cms-backstage-$STAGE\" pipenv run cdk deploy --context \"backstage-image-tag\"=\"$CODEBUILD_RESOLVED_SOURCE_VERSION\" --require-approval never"
"STACK_TARGET=\"cms-backstage-$STAGE\" pipenv run cdk deploy --context \"backstage-image-tag\"=\"s3_$CODEBUILD_RESOLVED_SOURCE_VERSION\" --require-approval never"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"echo \"Building from $(pwd) [Docker Buildkit: $DOCKER_BUILDKIT - Node: $(node --version) - NPM: $(npm --version) - TSC: $(yarn tsc --version)]\"",
"yarn build:backend",
"yarn build-image",
"docker tag backstage:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_NAME:$CODEBUILD_RESOLVED_SOURCE_VERSION",
"docker tag backstage:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_NAME:s3_$CODEBUILD_RESOLVED_SOURCE_VERSION",
"docker tag backstage:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_NAME:$IMAGE_TAG"
]
},
"post_build": {
"commands": [
"aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com",
"docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_NAME:$CODEBUILD_RESOLVED_SOURCE_VERSION",
"docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_NAME:s3_$CODEBUILD_RESOLVED_SOURCE_VERSION",
"docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_NAME:$IMAGE_TAG"
]
}
Expand Down
29 changes: 13 additions & 16 deletions source/backstage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cms-backstage",
"version": "1.0.0",
"version": "1.0.4",
"private": true,
"license": "Apache-2.0",
"description": "Backstage implementation preconfigured to work with CMS",
Expand Down Expand Up @@ -31,29 +31,26 @@
]
},
"devDependencies": {
"@backstage/cli": "^0.23.1",
"@spotify/prettier-config": "^15.0.0",
"@backstage/cli": "^0.25.2",
"@types/supertest": "^2.0.14",
"concurrently": "^8.0.1",
"lerna": "^7.1.5",
"node-gyp": "^9.3.1",
"prettier": "3",
"typescript": "^5.1.6",
"node-gyp": "^10.0.0",
"prettier": "^3",
"typescript": "^5.3.2",
"xml2js": "^0.5.0",
"yaml": "^2.2.2"
},
"resolutions": {
"@types/react": "^17",
"@babel/traverse": "^7.23.2",
"browserify-sign": "^4.2.2",
"@octokit/webhooks": "^10.9.2",
"octokit": "^3.1.2",
"follow-redirects": "^1.15.4",
"swagger-ui-react": "5.10.5",
"ip": "2.0.1",
"@backstage/backend-app-api": "^0.5.11"
"@types/react": "^18",
"@types/react-dom": "^18",
"@backstage/plugin-home": "^0.6.2",
"@backstage/backend-app-api": "^0.5.13",
"@backstage/backend-common": "^0.21.2",
"@backstage/backend-plugin-api": "^0.6.12",
"@backstage/core-components": "^0.14.0",
"@backstage/theme": "^0.5.1"
},
"prettier": "@spotify/prettier-config",
"lint-staged": {
"*.{js,jsx,ts,tsx,mjs,cjs}": [
"eslint --fix",
Expand Down
Loading

0 comments on commit cd43bc0

Please sign in to comment.