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

fix(tests): fix usage of unsafe conditional #334

Closed
wants to merge 2 commits into from
Closed

Conversation

rrey
Copy link
Collaborator

@rrey rrey commented Dec 9, 2023

Variable expension in conditionals is now forbidden. porting guide is here: https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_9.html#playbook

SUMMARY

tests fails with following error:

fatal: [testhost]: FAILED! => {"msg": "The conditional check 'result.msg == 'Dashboard {{ result.uid }} deleted'' failed. The error was: Conditional is marked as unsafe, and cannot be evaluated."}

Applying a fix based on porting guide.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

grafana_dashboard

@rrey rrey requested a review from seuf as a code owner December 9, 2023 09:25
@rrey rrey self-assigned this Dec 9, 2023
Copy link

codecov bot commented Dec 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e7e65b) 70.84% compared to head (5d8f2b5) 70.84%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #334   +/-   ##
=======================================
  Coverage   70.84%   70.84%           
=======================================
  Files          18       18           
  Lines        1883     1883           
  Branches      327      327           
=======================================
  Hits         1334     1334           
  Misses        405      405           
  Partials      144      144           
Flag Coverage Δ
integration 69.47% <0.00%> (ø)
sanity 23.52% <0.00%> (ø)
units 65.15% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rrey rrey force-pushed the fix_unsafe_var_use branch from 0a35ecf to 45ad20b Compare December 9, 2023 09:33
@rrey
Copy link
Collaborator Author

rrey commented Dec 9, 2023

grafana_dashboard do not return a status changed when importing a dashboard from url.

@rrey rrey force-pushed the fix_unsafe_var_use branch from e05b4aa to 45ad20b Compare December 9, 2023 14:57
@rrey
Copy link
Collaborator Author

rrey commented Dec 9, 2023

This is not a regression introduced by the Grafana version bumped.

@Nemental
Copy link
Collaborator

Nemental commented Jan 2, 2024

I think this is already covered in #331
Can be closed?

@Nemental
Copy link
Collaborator

Conflicts resolved, no changes left, all integration checks successful -> closed

@Nemental Nemental closed this Jan 11, 2024
@rndmh3ro rndmh3ro deleted the fix_unsafe_var_use branch January 11, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants