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

🐛(redirect) fix routes base template path #233

Merged
merged 2 commits into from
Jan 22, 2019

Conversation

jmaupetit
Copy link
Contributor

Purpose

The redirect application deployment fails with the following traceback:

The task includes an option with an undefined variable. The error was: No first item, sequence was empty.
         
The error appears to have been in '/app/tasks/deploy_get_stamp_from_route.yml': line 9, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

# deploy_stamp we are looking for.
- name: Get route for application {{ app.name }} with prefix {{ prefix }}
  ^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes.  Always quote template expression brackets when they
start a value. For instance:

    with_items:
      - {{ foo }}

Should be written as:

    with_items:
      - "{{ foo }}"

Proposal

Since we now declare explicitly routes for an application by creating one (or many) route*.yml.j2 template(s) for each application service, the redirect app base template was consider as a route and not a generic route template used for redirections. Now that this template is considered as private (prefixed with an underscore), it is ignored when trying to create or patch routes.

Since we now declare explicitly routes for an application by creating
one (or many) route*.yml.j2 template(s) for each application service,
the redirect app base template was consider as a route and not a
generic route template used for redirections. Now that this template is
considered as private (prefixed with an underscore), it is ignored when
trying to create or patch routes.
In some cases, it is usefull to force Route object substitution
(delete & create) as somes fields for this kind of object are immutable
(e.g. url). This behavior is now configurable in deployments and
defaults to false.
@jmaupetit jmaupetit merged commit 90a4aa4 into master Jan 22, 2019
@jmaupetit jmaupetit deleted the fix-redirect-app-routes branch January 22, 2019 11:46
jmaupetit added a commit that referenced this pull request Jan 22, 2019
This is our first stable release 🚀

Added:

- Allow to force route substitution (delete & create) using the force_route
  variable.

Fixed:

- The redirect application deployment was failing due to a side effect in route
  objects creation refactoring (#233).
jmaupetit added a commit that referenced this pull request Jan 22, 2019
This is our first stable release 🚀

Added:

- Allow to force route substitution (delete & create) using the force_route
  variable.

Fixed:

- The redirect application deployment was failing due to a side effect in route
  objects creation refactoring (#233).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants