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

Conversation

@tevoinea
Copy link
Member

@tevoinea tevoinea commented Feb 14, 2023

Summary of the Pull Request

What is this about?

Closes #2837

We should validate notification configs at creation time that they can be safely rendered by scriban.

  • Move some scriban conversion utility functions to JinjaTemplateAdapter.cs
  • Validate templates are compatible with scriban at notification creation time by:
    • Seeing if we need to apply any migrations to it
    • It can be rendered by scriban without throwing
  • Update integration tests to support using feature flags

@codecov-commenter
Copy link

codecov-commenter commented Feb 14, 2023

Codecov Report

Merging #2834 (beb7fd3) into main (21374b3) will decrease coverage by 0.03%.
The diff coverage is 43.67%.

@@            Coverage Diff             @@
##             main    #2834      +/-   ##
==========================================
- Coverage   29.87%   29.84%   -0.03%     
==========================================
  Files         324      324              
  Lines       39062    39130      +68     
==========================================
+ Hits        11671    11680       +9     
- Misses      27391    27450      +59     
Impacted Files Coverage Δ
...ApiService/ApiService/Functions/ValidateScriban.cs 0.00% <0.00%> (ø)
...e/onefuzzlib/notifications/JinjaTemplateAdapter.cs 44.82% <43.04%> (-55.18%) ⬇️
...ce/ApiService/onefuzzlib/NotificationOperations.cs 28.71% <66.66%> (+1.16%) ⬆️
.../ApiService/Functions/Migrations/JinjaToScriban.cs 80.00% <100.00%> (-12.40%) ⬇️

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

@tevoinea tevoinea merged commit e9f5a6a into microsoft:main Feb 15, 2023
@mgreisen mgreisen mentioned this pull request Mar 3, 2023
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.

Validate notification config templates at creation time

3 participants