Skip to content

Composable templates#2736

Merged
EmilienM merged 2 commits intogophercloud:masterfrom
dverbeir:composable_templates
Sep 6, 2023
Merged

Composable templates#2736
EmilienM merged 2 commits intogophercloud:masterfrom
dverbeir:composable_templates

Conversation

@dverbeir
Copy link
Copy Markdown
Contributor

This PR introduces a test where multiple templates are composed, using relative paths. This test currently fails as explained in issue #2735. A second commit fixes the issue.

Fixes #2735

@github-actions github-actions bot added the semver:patch No API change label Aug 29, 2023
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first PR! Be sure that we will be looking at it but keep in mind
this sometimes takes a while.
Please let the maintainers know if your PR has not got enough attention after a few days.
If any doubt, please consult our PR tutorial.

@EmilienM
Copy link
Copy Markdown
Contributor

Thanks for your first contribution ! This looks good to me at a first quick look but I'll come back to it when tests have all passed.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 79.115% (-0.02%) from 79.131% when pulling 5a0f2ac on dverbeir:composable_templates into 4fdecbb on gophercloud:master.

EmilienM
EmilienM previously approved these changes Aug 30, 2023
@EmilienM
Copy link
Copy Markdown
Contributor

cc @pierreprinetti for a second pair of eyes just in case I missed something in term of best practices.

Copy link
Copy Markdown
Member

@pierreprinetti pierreprinetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not versed into Heat templates unfortunately. Short of being able to comment what the code does, I have commented how it does it

Add a test that uses a template which itself uses another template,
whith templates in different directories so we test the fact that
template references are supposed to be relative to the template in
which a child template is used (without this, templates wouldn't be
composable).

Signed-off-by: David Verbeiren <david.verbeiren@tessares.net>
In order for composable stack templates to work, the following changes
are needed:

* a child template URL must be interpreted as relative to its parent
  template, not to the base URL
* the child templates and 'get_file' of child templates must also be
  included in the stack create request
* the references within child templates (to other templates or files)
  must be resolved so the correct URLs are provided, matching the files
  provided in the OS stack create request, just like is done for the
  top-level template.

Signed-off-by: David Verbeiren <david.verbeiren@tessares.net>
@dverbeir dverbeir force-pushed the composable_templates branch from 5a0f2ac to 8ec15c2 Compare August 30, 2023 10:39
@github-actions github-actions bot added semver:patch No API change and removed semver:patch No API change labels Aug 30, 2023
@dverbeir
Copy link
Copy Markdown
Contributor Author

dverbeir commented Sep 5, 2023

Thanks for the reviews. I believe I have addressed or responded to the comments.

I see the tests on OpenStack master have failed. Since the tests on older releases all passed, I assume the problem is rather with OpenStack master. Maybe you want to relaunch the tests?

Let me know if there is still something I can do.

@EmilienM
Copy link
Copy Markdown
Contributor

EmilienM commented Sep 6, 2023

tests fail on devstack master because we need to update the version of ubuntu, this is WIP.
the rest LGTM

@EmilienM EmilienM merged commit ecad1a2 into gophercloud:master Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch No API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orchestration: composable templates with realtive paths not working

4 participants