Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instead of using Portfolios/Components, use Products and Portfolios separately #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xmik
Copy link

@xmik xmik commented Jun 27, 2021

Reason for this PR

Without this change, creating the Service Catalog Products results in the following error in servicecatalog-factory-pipeline:

[Container] 2021/06/25 10:25:56 Entering phase BUILD
[Container] 2021/06/25 10:25:56 Running command servicecatalog-factory --info generate-via-luigi portfolios/
INFO MainThread Generating
INFO MainThread Loading portfolio: portfolios//scp.yaml
INFO MainThread Checking for external config
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.7.10/bin/servicecatalog-factory", line 8, in <module>
    sys.exit(cli())
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/servicecatalog_factory/cli.py", line 38, in generate_via_luigi
    core.generate_via_luigi(p)
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/servicecatalog_factory/core.py", line 162, in generate_via_luigi
    portfolios = generate_portfolios(portfolios_file_path)
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/servicecatalog_factory/core.py", line 96, in generate_portfolios
    portfolio, portfolio_file_name, "Components
  File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/servicecatalog_factory/core.py", line 105, in check_for_external_definitions_for
    for component in portfolio.get(type, []):
AttributeError: 'str' object has no attribute 'get'
[Container] 2021/06/25 10:25:56 Command did not exit successfully servicecatalog-factory --info generate-via-luigi portfolios/ exit status 1
[Container] 2021/06/25 10:25:56 Phase complete: BUILD State: FAILED
[Container] 2021/06/25 10:25:56 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: servicecatalog-factory --info generate-via-luigi portfolios/. Reason: exit status 1
[Container] 2021/06/25 10:25:56 Entering phase POST_BUILD

Environment:

aws-service-catalog-factory==0.60.0

Description of changes

  1. The portfolio file, instead of starting it with:
Schema: factory-2019-04-01
Portfolios:
  Components:

let's start with:

Schema: factory-2019-04-01
Products:

and end with

Portfolios:
  1. I also changed the BranchName: master for the 2 Service Catalog Products here to BranchName: v1 to align with the documentation

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants