Skip to content

Commit

Permalink
Merge pull request #515 from aws-solutions/release/v2.1.6
Browse files Browse the repository at this point in the history
update to v2.1.6
  • Loading branch information
svozza authored Feb 22, 2024
2 parents 44d314a + ca96072 commit 91e36ff
Show file tree
Hide file tree
Showing 29 changed files with 801 additions and 109 deletions.
36 changes: 22 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project are documented in this file.
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).

## [2.1.6] - 2024-2-22

### Fixed

- Null error when exporting to draw.io [458](https://github.com/aws-solutions/workload-discovery-on-aws/issues/458)
- Security [vulnerability](https://github.com/advisories/GHSA-78xj-cgh5-2h22) in `ip`.
- Security [vulnerability](https://github.com/advisories/GHSA-3787-6prv-h9w3) in `undici`.

## [2.1.5] - 2024-1-25

### Fixed
Expand Down Expand Up @@ -32,31 +40,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Comma in Service Name Results causes GraphQL type error [491](https://github.com/aws-solutions/workload-discovery-on-aws/issues/491)

### Changed
- Frequency at which the scheduled discovery process ECS task runs is now configurable via a CloudFormation parameter.
- Frequency at which the scheduled discovery process ECS task runs is now configurable via a CloudFormation parameter.

## [2.1.2] - 2023-11-14

### Fixed

- Throttle `ListAccounts` API to prevent rate limiting from stopping the Discovery process discover accounts
in large organisation. [478](https://github.com/aws-solutions/workload-discovery-on-aws/issues/478)
- Throttle `ListAccounts` API to prevent rate limiting from stopping the Discovery process discover accounts
in large organisation. [478](https://github.com/aws-solutions/workload-discovery-on-aws/issues/478)
- Only attempt to discover accounts from provided OU and its children, rather than whole organization.
- Throttle `SelectAggregateResourceConfig` API to prevent rate limiting from stopping discovery process from reading from the Config aggregator.
- Remove Retain on organization-wide StackSet so IAM roles are no longer left in organization's accounts after solution is uninstalled.
- Handle error message difference between AppSync VTL resolvers and JS resolvers that prevented discovery process from retrying
requests to DB if payload was too large.
- Handle error message difference between AppSync VTL resolvers and JS resolvers that prevented discovery process from retrying
requests to DB if payload was too large.

### Changed
- Move GraphQL queries that queried whole Neptune database to use DynamoDB, significantly reducing load on Neptune and
improving rendering times on the frontend.
- Move GraphQL queries that queried whole Neptune database to use DynamoDB, significantly reducing load on Neptune and
improving rendering times on the frontend.
- Retrieve the following resource types from AWS Config advanced query rather than `ListAggregateDiscoveredResources`
and `BatchGetAggregateResourceConfig`.
- `AWS::EC2::LaunchTemplate`
- `AWS::EC2::TransitGateway`
- `AWS::EC2::TransitGatewayAttachment`
- `AWS::EC2::TransitGatewayRouteTable`
- `AWS::Kinesis::Stream`
- `AWS::MSK::Cluster`
and `BatchGetAggregateResourceConfig`.
- `AWS::EC2::LaunchTemplate`
- `AWS::EC2::TransitGateway`
- `AWS::EC2::TransitGatewayAttachment`
- `AWS::EC2::TransitGatewayRouteTable`
- `AWS::Kinesis::Stream`
- `AWS::MSK::Cluster`
- Ensure OAC name length does not exceed 64 characters. [462](https://github.com/aws-solutions/workload-discovery-on-aws/issues/462)
- No longer ingest resources with status `ResourceNotRecorded`.
- Improve performance of `getResourceChanges` function in Discovery process from O(n<sup>2</sup>) to O(n).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workload Discovery on AWS (v2.1.5)
# Workload Discovery on AWS (v2.1.6)

Workload Discovery on AWS is a tool that quickly visualizes AWS Cloud workloads as architecture diagrams.
You can use the solution to build, customize, and share detailed workload visualizations based on live data from AWS.
Expand Down
2 changes: 1 addition & 1 deletion solution-manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: SO0075
name: workload-discovery-on-aws
version: v2.1.5
version: v2.1.6
regions:
commercial:
- us-east-1
Expand Down
20 changes: 10 additions & 10 deletions source/backend/discovery/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions source/backend/discovery/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wd-discovery",
"version": "2.1.5",
"version": "2.1.6",
"description": "This contains the code that forms the discovery process for AWS Perspective.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -44,7 +44,7 @@
"iterare": "1.2.1",
"p-throttle": "4.0.0",
"ramda": "0.28.0",
"undici": "5.27.2",
"undici": "6.6.2",
"winston": "3.3.3"
},
"devDependencies": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wd-import-templates",
"version": "2.1.5",
"version": "2.1.6",
"description": "Lambda function that serves cfn templates for account and region importing",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/backend/functions/cost-parser/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/backend/functions/cost-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wd-cost",
"version": "2.1.5",
"version": "2.1.6",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/backend/functions/cur-setup/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/backend/functions/cur-setup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "perspective-cur-setup",
"version": "2.1.5",
"version": "2.1.6",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
41 changes: 9 additions & 32 deletions source/backend/functions/drawio/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ class Node:
- Edge = Connection info for nodes, produce arrows
"""

def __init__(self, node_id, node_type, label, title, level, center_x, center_y, is_end_node):
def __init__(self, node_id, node_type, label, title, center_x, center_y, is_end_node):
self.node_id = node_id
self.node_type = node_type
self.label = label
self.title = title
self.level = level
self.center_x = center_x
self.center_y = center_y
self.style = types[self.node_type]['style']
Expand Down Expand Up @@ -140,25 +139,6 @@ def get_xml_object(self):
return obj


# this function mutates the items in the list passed in to it
def add_level_to_nodes(nodes):
node_dict = {node['id']: node for node in nodes}

def get_level(node):
if 'parent' not in node:
return 0

parent = node_dict[node['parent']]

if 'level' not in parent:
return get_level(parent) + 1
else:
return parent['level'] + 1

for node in nodes:
node['level'] = get_level(node)


def handler(event, _):
"""
Main Lambda Handler
Expand All @@ -169,29 +149,26 @@ def handler(event, _):
nodes = args.get('nodes', [])
edges = args.get('edges', [])

add_level_to_nodes(nodes)

for node in nodes:
node_id, node_type, label, level, title, position = \
itemgetter('id', 'type', 'label', 'level', 'title', 'position')(node)
node_id, node_type, label, title, position = \
itemgetter('id', 'type', 'label', 'title', 'position')(node)

if node_type == 'resource' and 'image' in node:
node_type = node['image'].split('/')[-1].split('.')[0]

x = position['x']
y = position['y']
is_end_node = node['type'] == 'resource'
parent = node.get('parent')
node = Node(node_id, node_type, label, title, level, x, y, is_end_node)
node = Node(node_id, node_type, label, title, x, y, is_end_node)
node_dict[node_id] = node

if parent and parent in node_dict:
node_dict[parent].add_child(node)
for node in nodes:
node_id = node['id']
parent = node.get('parent')
if parent:
node_dict[parent].add_child(node_dict[node_id])

elements = list(node_dict.values())
# if the elements aren't sorted by level, it causes null errors when
# creating the XML
elements.sort(key=lambda x: x.level)

for edge in edges:
edge_id, source, target = itemgetter('id', 'source', 'target')(edge)
Expand Down
Loading

0 comments on commit 91e36ff

Please sign in to comment.