Skip to content

Compress MgCommandMetadata.json to reduce whitespace/package size for Microsoft.Graph.Authentication #3346

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

sean-r-williams
Copy link

@sean-r-williams sean-r-williams commented Jun 18, 2025

Fixes #3345.

Changes proposed in this pull request

Adds -Compress to ConvertTo-Json calls in post-generation tools:

  • AuthModuleMetadata
  • NewCommandMetadata

These tools appear to operate on MgCommandMetadata.json, which has nearly 6MB of unnecessary whitespace. About 13.9% of Microsoft.Graph.Authentication's unpacked size on-disk is wasted by formatting characters that JSON parsers ignore anyways.

Certainly welcome to feedback on this PR - these files don't appear to be getting auto-updated by CI, and I was looking for specifically the MgCommandMetadata.json filename. I'm not sure if there are other AutoREST directives/generator tools that need updating as well.

@sean-r-williams sean-r-williams requested a review from a team as a code owner June 18, 2025 02:06
@sean-r-williams
Copy link
Author

sean-r-williams commented Jul 2, 2025

@ramsessanchez @timayabi2020 Can someone from your team take a look at this PR please? It's been two weeks.

As it stands, we're unable to ship MSGraph into our Lambda functions because the size of the modules is over Lambda's maximum dependency size.

@sean-r-williams
Copy link
Author

@microsoftgraph/msgraph-powershell-team What's needed to move the needle on this PR? The changes here remove JSON space that parsers (like PowerShell's ConvertFrom-Json) are required to ignore anyways, and doing so reduces the size of Microsoft.Graph.Authentication by over 10%.

It's been over a month with no feedback on this PR or on #3345. I don't know what else I can do as an external contributor.

@sean-r-williams sean-r-williams changed the title Compress MgCommandMetadata.json to reduce whitespace/package size Compress MgCommandMetadata.json to reduce whitespace/package size for Microsoft.Graph.Authentication Jul 18, 2025
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.

Microsoft.Graph.Authentication: 5+ MB of whitespace in MgCommandMetadata.json
1 participant