Giter VIP home page Giter VIP logo

Comments (7)

noopman avatar noopman commented on June 18, 2024 1

While having the comments posted into the gh pr is "fine" and good if the length is smaller <64k, I think you should give me a file reference to the whole log and allow me to make it an action run artifact instead! I can open the whole thing, no matter how many characters, as I please!

Here's a thought: Always give me the file reference so I can make it into an artifact, as mentioned, AND take the first 64k characters and put into the comment as you are attempting to do today - but also CLEARLY state that there is more which did not fit here.

I think it would be worse to start adding many gh pr comments, because it will be difficult to read and the length of it all makes it less useful. If the output is so lengthy, then it is better to use it as an artifact!

Does that make sense?

from azops.

noopman avatar noopman commented on June 18, 2024 1

That is excellent! I will try this out and let you know. I would propose you document how to turn that into an artefact! And I also propose you put as much as possible into on GH comment, but not multiple comments. I'd rather you reference the full file instead. I think multiple comments will look weird

from azops.

daltondhcp avatar daltondhcp commented on June 18, 2024 1

Sorry, that does not work. When the result is too long the file is NOT generated at all.

$mdOutput = 'WhatIf Results for {1}:{0} WhatIf is too large for comment field, for more details look at PR files to determine changes.' -f [environment]::NewLine, $resultHeadline

I get the message here from the if-statement. You are referring to a code line in the else section.

We'd need a code change to always generate the file content, regardless if it is too long for a GH comment!

You are right, apparently I was too quick when scrolling through the references yesterday. We'll make sure to fix that in our next release.

from azops.

daltondhcp avatar daltondhcp commented on June 18, 2024

Thanks for the feedback, @noopman.

The limitation is attributed to the ADO/GitHub comment constraints.
#417
https://github.com/orgs/community/discussions/41331

We are contemplating posting larger WhatIf outputs by dividing them into N comments instead of not posting at all. Your thoughts?

We do, in fact, create a file named output.json containing the raw WhatIf output. Consequently, if you wish, you have the option to upload and store that file elsewhere as well.
https://github.com/Azure/AzOps/blob/main/src/internal/functions/Set-AzOpsWhatIfOutput.ps1#L89

from azops.

noopman avatar noopman commented on June 18, 2024

I also find it weird that GH has not documented the comment length requirement.

from azops.

daltondhcp avatar daltondhcp commented on June 18, 2024

While having the comments posted into the gh pr is "fine" and good if the length is smaller <64k, I think you should give me a file reference to the whole log and allow me to make it an action run artifact instead! I can open the whole thing, no matter how many characters, as I please!

Here's a thought: Always give me the file reference so I can make it into an artifact, as mentioned, AND take the first 64k characters and put into the comment as you are attempting to do today - but also CLEARLY state that there is more which did not fit here.

I think it would be worse to start adding many gh pr comments, because it will be difficult to read and the length of it all makes it less useful. If the output is so lengthy, then it is better to use it as an artifact!

Does that make sense?

See my updated comment, we actually do have a hardcoded file reference for the output. We can certainly document this if it helps.
image

from azops.

RSMagnusMartensson avatar RSMagnusMartensson commented on June 18, 2024

Sorry, that does not work. When the result is too long the file is NOT generated at all.

$mdOutput = 'WhatIf Results for {1}:{0} WhatIf is too large for comment field, for more details look at PR files to determine changes.' -f [environment]::NewLine, $resultHeadline

I get the message here from the if-statement. You are referring to a code line in the else section.

We'd need a code change to always generate the file content, regardless if it is too long for a GH comment!

from azops.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.