-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Add better error when k=v syntax is used with YAML in tasks #41754
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
samdoran
force-pushed
the
issue/27210-kv-syntax-error
branch
from
June 20, 2018 20:15
9b9fdfd
to
fed98b2
Compare
ansibot
added
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
needs_triage
Needs a first human triage before being processed.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
test
This PR relates to tests.
labels
Jun 20, 2018
samdoran
force-pushed
the
issue/27210-kv-syntax-error
branch
from
June 20, 2018 20:18
fed98b2
to
d57efba
Compare
samdoran
removed
the
needs_triage
Needs a first human triage before being processed.
label
Jun 20, 2018
The test
|
ansibot
added
the
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
label
Jun 20, 2018
ansibot
added
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
and removed
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
labels
Jun 30, 2018
ansibot
removed
the
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
label
Aug 15, 2018
gundalow
approved these changes
Aug 15, 2018
I like it, think we can get this into 2.7? |
@gundalow We need to get some more reviewers to make sure I did this properly. Please ping some folks. |
ansibot
added
the
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
label
Aug 28, 2018
thaumos
moved this from To Do - Backlog only. Anything Can be here.
to Approved - This contains prioritised work that will block the release. It will contained assigned work.
in Ansible 2.8
Oct 10, 2018
ansibot
added
needs_rebase
https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
support:community
This issue/PR relates to code supported by the Ansible community.
labels
Oct 16, 2018
Find the correct line, column, and position for k=v errors since they are different than the position reported initially. Document bug in quoting syntax check.
Since the error still exists, switch to present tense rather than past tense.
samdoran
force-pushed
the
issue/27210-kv-syntax-error
branch
from
November 5, 2018 20:43
86271fa
to
fc07b62
Compare
ansibot
removed
the
needs_rebase
https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html
label
Nov 5, 2018
ansibot
added
core_review
In order to be merged, this PR must follow the core review workflow.
and removed
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
labels
Nov 5, 2018
ansibot
added
the
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
label
Nov 13, 2018
gundalow
approved these changes
Nov 16, 2018
ansibot
removed
the
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
label
Nov 16, 2018
ansibot
added
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
and removed
core_review
In order to be merged, this PR must follow the core review workflow.
labels
Nov 19, 2018
rebuild_merge |
ansibot
added
core_review
In order to be merged, this PR must follow the core review workflow.
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
and removed
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
labels
Dec 4, 2018
kbreit
pushed a commit
to kbreit/ansible
that referenced
this pull request
Jan 11, 2019
…41754) * Add error message for k=v and YAML in a single task Find the correct line, column, and position for k=v errors since they are different than the position reported initially. Document bug in quoting syntax check. * Change tense or error message Since the error still exists, switch to present tense rather than past tense. * Remove double spaces after periods in error messages. http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html * Add changelog fragment * Add tests for new error message * Fix tests * Add clarifying comments to unit test
bcoca
moved this from Approved - This contains prioritised work that will block the release. It will contained assigned work.
to Done - This means done, tests, integration, everything... obvi.
in Ansible 2.8
Jan 29, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
support:community
This issue/PR relates to code supported by the Ansible community.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
test
This PR relates to tests.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Detect and report an error when Ansible
k=v
syntax is use with a task formatted as YAML as well as when=
are used in YAML tasks rather than:
.Add unit tests for new error message.
Examples of syntax that causes this error:
Example output:
Fixes #27210
ISSUE TYPE
COMPONENT NAME
lib/ansible/errors/__init__.py
lib/ansible/errors/yaml_strings.py
ANSIBLE VERSION