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

Add a new test for report.extension_data #3481

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

DrChat
Copy link
Member

@DrChat DrChat commented Sep 5, 2023

Summary of the Pull Request

Adds a new (failing) test for using report.extension_data in a notification template.

PR Checklist

  • Applies to work item: Cannot access report.extension_data inside of an ADO Scriban template #3485
  • CLA signed. If not, go over here and sign the CLI.
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

AdamL-Microsoft and others added 11 commits August 29, 2023 19:57
* Remove the retention policy setting (microsoft#3452)

---------

Co-authored-by: Cheick Keita <chkeita@microsoft.com>
* Redo-8.7.1-hotfix

---------

Co-authored-by: Cheick Keita <chkeita@microsoft.com>
…t#3467)

* Add field to ado config for checking duplicate work items

* Make duplicate fields nullable and add it to python models

* Update broken tests

* Update docs to include new ado_duplicate_fields property
Co-authored-by: Adam <103067949+AdamL-Microsoft@users.noreply.github.com>
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.30.0 to 1.32.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.30.0...tokio-1.32.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.30.0 to 1.32.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.30.0...tokio-1.32.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [elsa](https://github.com/manishearth/elsa) from 1.8.1 to 1.9.0.
- [Commits](Manishearth/elsa@v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: elsa
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.7.1 to 3.8.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](Stebalien/tempfile@v3.7.1...v3.8.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.7.1 to 3.8.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](Stebalien/tempfile@v3.7.1...v3.8.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@DrChat
Copy link
Member Author

DrChat commented Sep 5, 2023

Looks like this is going to be a massive PITA to fix.
Basically, Scriban doesn't support JsonElement in any capacity for their little ScriptObject helper. So we can't pass JsonElement in any capacity to them.
Additionally, ScriptObject.Import supports filtering and renaming fields, but not converting them :\

It looks like Newtonsoft.Json may be a better choice for deserializing JSON, as they have full support for converting JSON to arbitrary C# objects (dynamic) instead of just JsonElement (reference)

I've also found this solution for using System.Text.Json to convert arbitrary JSON to a tree of dynamic objects: https://dotnetfiddle.net/1Y6hI6

See here for more context: scriban/scriban#148

@DrChat DrChat force-pushed the user/jusmoore/reportext branch 2 times, most recently from 0c9d589 to e007b3d Compare September 6, 2023 15:06
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.

4 participants