GithubHelp home page GithubHelp logo

gemini-oss / starfleet Goto Github PK

View Code? Open in Web Editor NEW
41.0 3.0 7.0 3.5 MB

Whole-infrastructure automation tooling for AWS

Home Page: https://gemini-oss.github.io/starfleet/

License: Apache License 2.0

Python 99.86% CSS 0.04% Dockerfile 0.10%
aws aws-accounts aws-config aws-organizations lambda python

starfleet's People

Contributors

brettkempf avatar chaudim avatar dependabot[bot] avatar ericwestfall avatar mikegrima avatar vinayabb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

starfleet's Issues

Slack needs retry

Slack needs to have the retry decorator added to it to prevent workers from failing even though they are successful.

Config Worker Improvements - Support for exclusionByResourceTypes

There is some improvements that can be made to the config worker:

  1. Log out a diff of each change state so it's more clear on what is different
  2. Add logic to only care about specific fields for comparison to shield against future API changes. This should be done for all the fields, not just configuration recorders (just now applied)
  3. Support the new exclusionByResourceTypes field that was recently introduced

Stale Account Index Cache

One potential issue that can arise is that our singletons may contain stale cached data. AWS Lambda will periodically rotate out the container running the lambda function but until it does, there could be stale data affecting workloads.

This can particularly be an issue with the Account Index and the Starbase. The following scenario can happen:

  1. The Starbase runs and loads the account index
  2. A new AWS account is created and added to the organization
  3. At this point, the account index is now stale - both on S3 and the cached singletons
  4. Eventually, the AccountIndexGeneratorShip runs to update the account index in S3
  5. The Starbase may still have a lingering Lambda function or 2 primed up with the stale index cached
  6. A new task appears and workers need to be tasked
  7. An older Starbase lambda is running the logic to task the workers - the workers are not tasked on the new account because the cached account index on the Starbase doesn't see it yet
  8. After a while, AWS Lambda rotates out the old Starbase lambdas and new ones are invoked and run with the latest index
  9. The task runs again (eventually via an EventBridge CRON if set) and the workers are tasked with the newly created account - all is well now

Eventually, everything will iron itself out. However, I can see value in having the default account index keep a timestamp variable of when it was last instantiated and have it refresh after maybe 30 minutes after that timestamp has passed. That would reduce the likelihood staleness in the Starbase.

Account Index Generator Crashes in Organizations with Nested OUs

Description

The AccountIndexGeneratorShip experiences an unhandled KeyError exception and subsequent fatal crash when attempting to generate the account inventory when deployed in an organization with a nested OU hierarchy.

Root (r-olgb)
├── Core Infrastructure (ou-olgb-q97w37sn)
│   ├── Prod (ou-olgb-7puk9u2d)
│   │   ├── secops-account-prod (123456789012)
├── Workloads (ou-olgb-e604f59w)
│   ├── Prod (ou-olgb-q8z9vop9)
│   │   ├── auth-service-account-prod (123456789033)
│   ├── Non-Prod (ou-olgb-nndadfrq)
├── org-managment-account-prod (123456789441)

Fig 1. An example organization structure with a valid nested OU hierarchy.

Expected Behavior

The AccountIndexGeneratorShip should be capable of successfully generating an account inventory when deployed in any valid environment that adheres to AWS Organizations standards and service quota limits.

Actual Behavior

With the AccountIndexGeneratorShip deployed correctly in an organization that includes a nested OU hierarchy (see Figure 1 above), executing the starfleet account-inventory generate command throws an unhandled KeyError exception resulting in a fatal crash of the AccountIndexGeneratorShip and no account inventory output.

starfleet on main [$] is 📦 v0.0.1 via 🐍 v3.9.16 (starfleet) on ☁️  aws-security-research-lab-secops-admin (us-east-2)
❯ starfleet account-inventory generate \
  --commit \
  --payload SaveAccountInventory.yaml

[...]
[🆗] Template OK: Executing worker: AccountIndexGeneratorShip...
2023-05-08 17:52:15,401 - INFO - [📡] Reaching out to the Orgs API to get the list of AWS accounts in account: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py - execute:61
2023-05-08 17:52:17,325 - INFO - [📡] Reaching out to the Orgs API to get the list of all OUs in the org... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py - execute:68
2023-05-08 17:52:18,375 - INFO - [🚚] Fetching tags and enabled regions for each account... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py - execute:76
[...]
2023-05-08 17:52:20,706 - DEBUG - [👪] Fetching parents for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:81
Traceback (most recent call last):
  File "/Users/erwestfa/.pyenv/versions/starfleet/bin/starfleet", line 8, in <module>
    sys.exit(cli())
  File "/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py", line 120, in generate
    worker.execute(commit=commit)
  File "/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py", line 77, in execute
    fetch_additional_details(
  File "/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py", line 168, in fetch_additional_details
    parent_ous.append({"Id": parent["Id"], "Type": parent["Type"], "Name": all_ous[parent["Id"]]})
KeyError: 'ou-olgb-q8z9vop9'

Fig 2. Account inventory generate command output showing unhandled exception.

Steps to Reproduce

  1. In the target environment where Starfleet will be deployed, ensure the organization has at least one member account that is contained within a nested OU hierarchy with a minimum of 2 levels of OU nesting (see Figure 1 above for more detail).

  2. Deploy Starfleet to a delegated member account in accordance with the installation guide.

  3. Using the CLI, trigger a new account inventory generation tasking:

    starfleet account-inventory generate \
       --commit \
       --payload SaveAccountInventory.yaml

Root Cause

The AccountIndexGeneratorShip executes the AWS Organizations ListOrganizationalUnitsForParent API call, passing the organization root ID to the ParentId request parameter, which returns only the top-level OUs under the root. However, the AccountIndexGeneratorShip never recursively checks if the top-level OUs contain any nested OUs.

# Fetch the list of org OUs:
LOGGER.info("[📡] Reaching out to the Orgs API to get the list of all OUs in the org...")
all_ous = list_organizational_units_for_parent( # pylint: disable=no-value-for-parameter
ParentId=config["OrgRootId"], account_number=config["OrgAccountId"], assume_role=config["OrgAccountAssumeRole"]
)
ou_map = {ou["Id"]: ou["Name"] for ou in all_ous} # noqa # Reformat the data into a nice map
ou_map[config["OrgRootId"]] = "ROOT" # Add the root in

The results of this API call are then used to generate a map of OU names keyed to their respective OU identifiers. This map is passed to an asynchronous utility function fetch_additional_details() that retrieves additional metadata about member accounts. As this function iterates over member accounts, it references the map to retrieve the friendly name of the OU that contains the account, assuming the identifier exists in the map.

for result in tag_and_parent_results:
all_accounts[result[0]]["Tags"] = result[1]
parent_ous = []
has_root = False # If the Root wasn't added in, then we will append it so that there is a full chain up to the Root.
for parent in result[2]:
if parent["Type"] == "ROOT":
has_root = True
parent_ous.append({"Id": parent["Id"], "Type": parent["Type"], "Name": all_ous[parent["Id"]]})
# If Root wasn't there, then append it:
if not has_root:
parent_ous.append({"Id": root_id, "Type": "ROOT", "Name": "ROOT"})
all_accounts[result[0]]["Parents"] = parent_ous

In the scenario where the member account is contained in an OU that is nested one or more levels below the top-level OUs under the root, the OU identifier that contains the member account will not be in the map, resulting in the unhandled KeyError exception.

Additional Information and Context

starfleet on main [$] is 📦 v0.0.1 via 🐍 v3.9.16 (starfleet) on ☁️  aws-security-research-lab-secops-admin (us-east-2)
❯ starfleet account-inventory generate \
  --commit \
  --payload SaveAccountInventory.yaml

                _/                              _/_/  _/                        _/
     _/_/_/  _/_/_/_/    _/_/_/  _/  _/_/    _/      _/    _/_/      _/_/    _/_/_/_/
  _/_/        _/      _/    _/  _/_/      _/_/_/_/  _/  _/_/_/_/  _/_/_/_/    _/
     _/_/    _/      _/    _/  _/          _/      _/  _/        _/          _/
_/_/_/        _/_/    _/_/_/  _/          _/      _/    _/_/_/    _/_/_/      _/_/

2023-05-08 17:52:15,218 - DEBUG - [📄] Loading the base configuration from /Users/erwestfa/projects/oss/starfleet/src/starfleet/configuration_files... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/configuration.py - load_base_configuration:43
2023-05-08 17:52:15,218 - DEBUG - [⚙️] Processing configuration file: configuration.yaml... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/configuration.py - load_base_configuration:49
2023-05-08 17:52:15,223 - DEBUG - [⚙️] Successfully loaded configuration file: configuration.yaml - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/configuration.py - load_base_configuration:56
2023-05-08 17:52:15,225 - DEBUG - [🪵] Configuring the logger for the rest of the application... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/configuration.py - load_base_configuration:74
2023-05-08 17:52:15,225 - DEBUG - [🆗️] Base configuration loaded successfully - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/configuration.py - load_base_configuration:83
2023-05-08 17:52:15,225 - DEBUG - [📦] Loading worker ship plugins... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/loader.py - load_all_plugins:44
2023-05-08 17:52:15,225 - DEBUG - [🏗️] Loading plugins in the ['/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins'] location... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:40
2023-05-08 17:52:15,226 - DEBUG - [⚙️] Processing module named: starfleet.worker_ships.plugins.account_index_generator - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:42
2023-05-08 17:52:15,242 - DEBUG - [👍] Found 1 plugins in ['/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins'] - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:61
2023-05-08 17:52:15,242 - DEBUG - [⚙️] Processing module named: starfleet.worker_ships.plugins.aws_config - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:42
2023-05-08 17:52:15,296 - DEBUG - [👍] Found 1 plugins in ['/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins'] - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:61
2023-05-08 17:52:15,296 - DEBUG - [⚙️] Processing module named: starfleet.worker_ships.plugins.github_sync - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:42
2023-05-08 17:52:15,398 - DEBUG - [👍] Found 1 plugins in ['/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins'] - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:61
2023-05-08 17:52:15,398 - DEBUG - [🔧] Configuring worker ship: AccountIndexGeneratorShip - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/loader.py - load_all_plugins:48
2023-05-08 17:52:15,398 - DEBUG - [👍] Worker ship: AccountIndexGeneratorShip is properly configured and ENABLED. - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/loader.py - load_all_plugins:65
2023-05-08 17:52:15,398 - DEBUG - [🔧] Configuring worker ship: AwsConfigWorkerShip - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/loader.py - load_all_plugins:48
2023-05-08 17:52:15,399 - DEBUG - [⏭️] Worker ship: AwsConfigWorkerShip has no discovered configuration. Skipping...  - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/loader.py - load_all_plugins:68
2023-05-08 17:52:15,399 - DEBUG - [🔧] Configuring worker ship: GitHubSyncWorkerShip - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/loader.py - load_all_plugins:48
2023-05-08 17:52:15,399 - DEBUG - [⏭️] Worker ship: GitHubSyncWorkerShip has no discovered configuration. Skipping...  - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/loader.py - load_all_plugins:68
2023-05-08 17:52:15,399 - DEBUG - [🚀] Completed loading 1 worker ships - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/loader.py - load_all_plugins:79
2023-05-08 17:52:15,399 - DEBUG - [🖥️] Loading CLIs (which are just plugins)... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/cli/components.py - load_clis:43
2023-05-08 17:52:15,399 - DEBUG - [🏗️] Loading plugins in the ['/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins'] location... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:40
2023-05-08 17:52:15,399 - DEBUG - [⚙️] Processing module named: starfleet.worker_ships.plugins.account_index_generator - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:42
2023-05-08 17:52:15,399 - DEBUG - [👍] Found 1 plugins in ['/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins'] - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:61
2023-05-08 17:52:15,399 - DEBUG - [⚙️] Processing module named: starfleet.worker_ships.plugins.aws_config - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:42
2023-05-08 17:52:15,399 - DEBUG - [👍] Found 1 plugins in ['/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins'] - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:61
2023-05-08 17:52:15,399 - DEBUG - [⚙️] Processing module named: starfleet.worker_ships.plugins.github_sync - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:42
2023-05-08 17:52:15,399 - DEBUG - [👍] Found 1 plugins in ['/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins'] - /Users/erwestfa/projects/oss/starfleet/src/starfleet/utils/plugin_loader.py - find_plugins:61
2023-05-08 17:52:15,399 - DEBUG - [🖥️] Completed loading 3 CLIs - /Users/erwestfa/projects/oss/starfleet/src/starfleet/cli/components.py - load_clis:48
[🛃] Validating the template...
[🆗] Template OK: Executing worker: AccountIndexGeneratorShip...
2023-05-08 17:52:15,401 - INFO - [📡] Reaching out to the Orgs API to get the list of AWS accounts in account: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py - execute:61
2023-05-08 17:52:17,325 - INFO - [📡] Reaching out to the Orgs API to get the list of all OUs in the org... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py - execute:68
2023-05-08 17:52:18,375 - INFO - [🚚] Fetching tags and enabled regions for each account... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py - execute:76
2023-05-08 17:52:19,894 - DEBUG - [🏷️] Fetching tags for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:70
2023-05-08 17:52:19,895 - DEBUG - [🌍️] Fetching enabled regions for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_regions:91
2023-05-08 17:52:19,898 - DEBUG - [🏷️] Fetching tags for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:70
2023-05-08 17:52:19,899 - DEBUG - [🌍️] Fetching enabled regions for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_regions:91
2023-05-08 17:52:19,899 - DEBUG - [🏷️] Fetching tags for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:70
2023-05-08 17:52:19,906 - DEBUG - [🌍️] Fetching enabled regions for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_regions:91
2023-05-08 17:52:19,907 - DEBUG - [🏷️] Fetching tags for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:70
2023-05-08 17:52:19,910 - DEBUG - [🌍️] Fetching enabled regions for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_regions:91
2023-05-08 17:52:19,911 - DEBUG - [🏷️] Fetching tags for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:70
2023-05-08 17:52:19,915 - DEBUG - [🌍️] Fetching enabled regions for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_regions:91
2023-05-08 17:52:19,921 - DEBUG - [🏷️] Fetching tags for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:70
2023-05-08 17:52:19,927 - DEBUG - [🌍️] Fetching enabled regions for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_regions:91
2023-05-08 17:52:19,930 - DEBUG - [🏷️] Fetching tags for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:70
2023-05-08 17:52:19,931 - DEBUG - [🌍️] Fetching enabled regions for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_regions:91
2023-05-08 17:52:20,630 - DEBUG - [👪] Fetching parents for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:81
2023-05-08 17:52:20,633 - DEBUG - [👪] Fetching parents for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:81
2023-05-08 17:52:20,666 - DEBUG - [👪] Fetching parents for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:81
2023-05-08 17:52:20,700 - DEBUG - [👪] Fetching parents for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:81
2023-05-08 17:52:20,702 - DEBUG - [👪] Fetching parents for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:81
2023-05-08 17:52:20,705 - DEBUG - [👪] Fetching parents for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:81
2023-05-08 17:52:20,706 - DEBUG - [👪] Fetching parents for account id: <REDACTED>... - /Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py - fetch_tags_and_parents:81
Traceback (most recent call last):
  File "/Users/erwestfa/.pyenv/versions/starfleet/bin/starfleet", line 8, in <module>
    sys.exit(cli())
  File "/Users/erwestfa/.pyenv/versions/3.9.16/envs/starfleet/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/erwestfa/.pyenv/versions/3.9.16/envs/starfleet/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/erwestfa/.pyenv/versions/3.9.16/envs/starfleet/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/erwestfa/.pyenv/versions/3.9.16/envs/starfleet/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/cli_utils.py", line 137, in invoke
    return super().invoke(ctx)
  File "/Users/erwestfa/.pyenv/versions/3.9.16/envs/starfleet/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/erwestfa/.pyenv/versions/3.9.16/envs/starfleet/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/erwestfa/.pyenv/versions/3.9.16/envs/starfleet/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py", line 120, in generate
    worker.execute(commit=commit)
  File "/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/ship.py", line 77, in execute
    fetch_additional_details(
  File "/Users/erwestfa/projects/oss/starfleet/src/starfleet/worker_ships/plugins/account_index_generator/utils.py", line 168, in fetch_additional_details
    parent_ous.append({"Id": parent["Id"], "Type": parent["Type"], "Name": all_ous[parent["Id"]]})
KeyError: 'ou-olgb-q8z9vop9'

Fig 3. Full stack trace of Starfleet account inventory generation command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.