Include issue with absolute and relative path result in conflicting IDs
Open
@dmurphy18 is already working on this.
Since Aug 12, 2019.
bug
Confirmed
severity-high
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
I think include does not work as expected when include relative and absolute path
Setup
- File salt/bug/init.sls :
include:
- .bug
- .include
- File salt/bug/bug.sls:
bug:
test.succeed_without_changes:
- name: bug
- File salt/bug/include.sls:
include:
- salt/bug/bug
include_bug:
test.succeed_without_changes:
- name: include_bug
- require:
- id: bug
Steps to Reproduce Issue
$ salt-call state.apply salt/bug
local:
Data failed to compile:
----------
Detected conflicting IDs, SLS IDs need to be globally unique.
The conflicting ID is 'bug' and is found in SLS 'base:salt/bug.bug' and SLS 'base:salt/bug/bug'
Now if I replace with full path in salt/bug/init.sls:
include:
- salt/bug/bug
- salt/bug/include
$ salt-call state.apply salt/bug
local:
----------
ID: bug
Function: test.succeed_without_changes
Result: True
Comment: Success!
Started: 10:20:43.032602
Duration: 0.0 ms
Changes:
----------
ID: include_bug
Function: test.succeed_without_changes
Result: True
Comment: Success!
Started: 10:20:43.033596
Duration: 0.0 ms
Changes:
Summary for local
------------
Succeeded: 2
Failed: 0
------------
Versions Report
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: 1.11.5
cherrypy: 17.4.1
dateutil: 2.7.5
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.10
ioflo: Not Installed
Jinja2: 2.10
libgit2: 0.28.2
libnacl: 1.6.1
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.17
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.28.2
Python: 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)]
python-gnupg: 0.4.3
PyYAML: 3.13
PyZMQ: 17.1.2
RAET: Not Installed
smmap: 2.0.5
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist:
locale: cp1252
machine: AMD64
release: 10
system: Windows
version: 10 10.0.18362 SP0 Multiprocessor Free
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.