Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Migrating notification templates #2486

Merged

Conversation

tevoinea
Copy link
Member

@tevoinea tevoinea commented Oct 4, 2022

Summary of the Pull Request

What is this about?

Adds support for migrating our jinja templates to scriban on the fly.

PR Checklist

Info on Pull Request

What does this include?

  • Detect whether a template is a jinja template
  • Convert our jinja templates to scriban template
  • Tests
  • Small docs improvement for NodeDisposalStrategy

Validation Steps Performed

How does someone test & validate?

Test ADO/github/teams notification creation with an old jinja template (so long as the template is not very complicated).

The tests that are added in this PR are testing the jinja template features we use in prod (if, for, and a combination of the 2).

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2022

Codecov Report

Merging #2486 (82996f7) into main (f6a680b) will decrease coverage by 5.11%.
The diff coverage is 90.90%.

@@            Coverage Diff             @@
##             main    #2486      +/-   ##
==========================================
- Coverage   29.97%   24.86%   -5.12%     
==========================================
  Files         288      119     -169     
  Lines       35385    12143   -23242     
==========================================
- Hits        10606     3019    -7587     
+ Misses      24779     9124   -15655     
Impacted Files Coverage Δ
src/ApiService/ApiService/OneFuzzTypes/Enums.cs 30.98% <ø> (ø)
...vice/onefuzzlib/notifications/NotificationsBase.cs 0.00% <0.00%> (ø)
...e/onefuzzlib/notifications/JinjaTemplateAdapter.cs 100.00% <100.00%> (ø)
src/agent/stacktrace-parser/src/lib.rs
src/agent/coverage/src/pe.rs
src/agent/onefuzz-agent/src/heartbeat.rs
src/agent/input-tester/src/logging.rs
src/agent/srcview/src/report.rs
src/agent/onefuzz-agent/src/scheduler.rs
...rc/agent/input-tester/src/test_result/fast_fail.rs
... and 163 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tevoinea tevoinea enabled auto-merge (squash) October 5, 2022 14:08
@tevoinea tevoinea merged commit 124c627 into microsoft:main Oct 5, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants