saltstack-formulas / php-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
57 stars 231 forks source link

Conflicting ids with the latest release #188

Closed n-rodriguez closed 5 years ago

n-rodriguez commented 5 years ago

When I run this formula I got this error :

[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/php/ng/fpm/install.sls:
include:
  - php.ng.deprecated

# -*- coding: utf-8 -*-
# vim: ft=jinja

include:
  - php.ng.deprecated

php_install_fpm:
  pkg.installed:
    - name: fpm
    - pkgs: ["php7.0-fpm"]

[CRITICAL] Rendering SLS 'base:php.ng.fpm.install' failed: while constructing a mapping
  in "<unicode string>", line 1, column 1
found conflicting ID 'include'
  in "<unicode string>", line 11, column 1

My pillars:

php:
  ng:
    version:
      - '7.0'
    modules:
      - curl
      - gd
      - mcrypt
      - mysql

My state states/base/install/php.sls :

{% set roles = salt['config.get']('jbox_server:roles', []) %}

{% if 'php-server' in roles %}
include:
  - php.ng.fpm.install
  - php.ng.fpm.config
  - php.ng.fpm.pools_config
  - php.ng.modules
  - php.ng.fpm.service
{% endif %}

If I quote php.ng.fpm.install and php.ng.fpm.service it works :

{% set roles = salt['config.get']('jbox_server:roles', []) %}

{% if 'php-server' in roles %}
include:
  # - php.ng.fpm.install
  - php.ng.fpm.config
  - php.ng.fpm.pools_config
  - php.ng.modules
  # - php.ng.fpm.service
{% endif %}
myii commented 5 years ago

@n-rodriguez Confirmed with test case: https://travis-ci.org/myii/php-formula/builds/569880654. The question is, did this work before? If so, at what point?

myii commented 5 years ago

I've repushed that commit in the branch on top of an earlier commit (08cd563, just after v0.37.0) to see if that still triggers it:

myii commented 5 years ago

While each run is failing, it's not due the bug reported here, so this bug is something that has been introduced more recently.

As for the failures, they are further bugs to be fixed.

myii commented 5 years ago

@n-rodriguez Got a bit of time to look further -- disabling these lines work:

So it looks like an issue when including alongside {% include ... %}.

myii commented 5 years ago

@n-rodriguez #189 fixes this as seen here:

Please confirm the fix and merge that PR if you're satisfied.

saltstack-formulas-travis commented 5 years ago

:tada: This issue has been resolved in version 0.39.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

n-rodriguez commented 5 years ago

Please confirm the fix and merge that PR if you're satisfied.

sorry for this late answer but it works :) thank you! :+1: