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

Azure uses YAML. Please finally add ConvertFrom-Yaml, ConvertTo-Yaml #16785

Closed
5 tasks done
schittli opened this issue Jan 20, 2022 · 3 comments
Closed
5 tasks done

Azure uses YAML. Please finally add ConvertFrom-Yaml, ConvertTo-Yaml #16785

schittli opened this issue Jan 20, 2022 · 3 comments
Labels
Needs-Triage The issue is new and needs to be triaged by a work group. Resolution-Duplicate The issue is a duplicate.

Comments

@schittli
Copy link

Prerequisites

Steps to reproduce

  1. Start using PowerShell and Azure Pipelines with YAML
  2. Now Microsoft expects that customers have to install uncontrolled opensource modules just so PowerShell can work with YAML
  3. For us, this is extremely unexpected
  4. And it's a pain for many years that M$ has no inner motivation to keep the PowerShell technology stack up to date.

Expected behavior

Get-Content 'config.yaml' | ConvertFrom-Json
# of course, ConvertTo-Yaml is missing too.

# It's a shame that we have to explain it.

Actual behavior

# 1. Search an open Source PowerShell module that handles yaml
# 2. make a review to be sure it has no security issues
# 3. Install and test the module
# 4. Search the next module, test it
# 5. If you finally have a Module, install and use it.
# 6. For each Modul-Update, restart at step 3.

Error details

No response

Environment data

# Rel. 7.x must have yaml support
# Rel. 5.x should have yaml support

Name                           Value
----                           -----
PSVersion                      5.1.19041.1023
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1023
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Visuals

No response

@schittli schittli added the Needs-Triage The issue is new and needs to be triaged by a work group. label Jan 20, 2022
@iSazonov
Copy link
Collaborator

iSazonov commented Jan 21, 2022

Conclusion "Won't fix" was made by WG-Cmdlets in Aug,2021 #3607 (comment)

It seems .Net hasn't plans to implement YAML so close as duplication.

@iSazonov iSazonov added the Resolution-Duplicate The issue is a duplicate. label Jan 21, 2022
@jhoneill
Copy link

jhoneill commented Jan 21, 2022

To put everything in one place here is what was said in 3607

@PowerShell/wg-powershell-cmdlets has been discussing this issue, and despite the extremely high demand (and my own personal desire to have strong, canonical YAML cmdlets), we're unfortunately going to have to close it (for now) as Won't Fix. The reasoning is two-fold:

(1) While the PowerShell package is already fairly large, we're doing our best not to add new dependencies to the package so that we don't continue to grow our size unfettered, and because we believe that pulling modules from the PowerShell Gallery (or an internal trusted Gallery, having been vetted appropriately by an enterprise) should be a standard part of a PS7 workflow.
(2) As a team, we simply don't have the capacity to build a .NET YAML parser from scratch, nor do we have the capacity to vet, support, and service a 3rd party library for which the security implications are high-stakes.
If .NET were to officially support a YAML library, we (as Microsoft) could potentially look into supporting a YAML module on the Gallery. But until that point, the existing community modules will have to suffice.

The community module referred to has been downloaded 18 million times. It is based on YamDotNet has been download from Nuget 36 Million times. But as the quote above says the team don't have the capacity to "vet support and service" it (I'm not sure what happened with NewonSoftJson before .NET added native JSON support).

We have a classic case of different Microsoft teams ignoring each other .

  • Azure Pipelines team YAML Is new and shiny let's be the first to use it!!! BTW despite the title Azure generally uses JSON and only pipelines use YAML.
  • PowerShell team Customers want us to do more things than Microsoft gives resource for. We can't write parsers for JSON, XML, YAML etc. (or validate 3rd party ones) we need .NET to do that. A module which uses a community parser needs to be a community module.
  • .NET team We don't see the need to support every markup as it is invented, and there are good community libraries.

and customers like the OP say they don't want "community" stuff they want everything to come from Microsoft. (Though from the use of "M$" I assume the OP doesn't like paying for it).

@ghost
Copy link

ghost commented Jan 22, 2022

This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage The issue is new and needs to be triaged by a work group. Resolution-Duplicate The issue is a duplicate.
Projects
None yet
Development

No branches or pull requests

3 participants