Skip to content

AzurePowershellV5: Suppress output from Az-functions #19674

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

Closed
wants to merge 3 commits into from
Closed

AzurePowershellV5: Suppress output from Az-functions #19674

wants to merge 3 commits into from

Conversation

mortenlerudjordet
Copy link
Contributor

@mortenlerudjordet mortenlerudjordet commented Mar 22, 2024

Task name: AzurePowershellV5, Common/VstsAzureHelpers_

Description:

  • Suppress output from Connect-AzAccount & Set-AzContext
  • Fix output display for hashtable used in write-host (helper function)

Documentation changes required: (Y/N) No

Added unit tests: (Y/N) No

Attached related issue: (Y/N) #19672

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

@v-mohithgc
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@LeftTwixWand
Copy link
Contributor

Hello @mortenlerudjordet, thank you so much for this contribution.
The PR looks good, but before it can be merged, please bump the task version to 5.237.8 the patch version 7 is reserved.

Also, you need to do the next steps:
Install node.js v10.
Clone the repository and call the next commands from your CLI:

npm i
node make.js build --task AzurePowerShellV5

You would see a bunch of generated files in the git status.
Please, add them to this PR - they are required.

@mortenlerudjordet
Copy link
Contributor Author

mortenlerudjordet commented Mar 25, 2024

@LeftTwixWand : I ran the npm commands on node.js v10 and merged the files generated into this PR.
Hopefully the expected additional files are now included.

Sorry I missed this the first time around.

@mortenlerudjordet
Copy link
Contributor Author

@v-mohithgc or @LeftTwixWand, please run the pipeline again with the new changes added to the PR.

@mortenlerudjordet
Copy link
Contributor Author

@LeftTwixWand ; I have merged in the changes done on master,
Do I need to bump the patch number to 9 before this can be merged in as 8 now is taken?

@mortenlerudjordet
Copy link
Contributor Author

@vincentdass : as code owner for Common/VstsAzureHelpers_ can you review the change I have proposed?

@v-mohithgc
Copy link
Contributor

Hi @mortenlerudjordet , the PR checks are expected to fail as the task version isnt bumped.
please increase the minor version of this task to 238 and patch to 0, in task.json file and then run the build command (node make.js build --task AzurePowerShellV5) and then commit the changes.

@mortenlerudjordet
Copy link
Contributor Author

mortenlerudjordet commented Mar 26, 2024

@v-mohithgc : I changed minor to 238 and patch to 0. Ran build and added the files to this PR.
Can see build changed version bak to minor 237 and patch 10, presume this is the correct behavior.

Thanks for guiding me

@v-mohithgc
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mortenlerudjordet
Copy link
Contributor Author

mortenlerudjordet commented Mar 26, 2024

@v-mohithgc : Will I have to bump version on all these other tasks also?

Tried to run build on all in the error msg from the pipeline, but not all task in the list gets files under _generated after build complete.
Only see files generated for:
AzureFileCopyV2
AzureFileCopyV3
AzureFileCopyV4
AzureFileCopyV5
AzureFileCopyV6
AzurePowerShellV4

For the other tasks seems like the reason from the build logs is this:
Unable to find package.json file for AzureCloudPowerShellDeploymentV2 in _generated folder or Tasks folder, using default node 10.

For the tasks not having a package.json I just incremented patch number by one.
All got patch: 6, AzurePowershellV2 got patch: 7

If changing the version number for these other tasks is required for approval, I can add these build onto the PR.
I have it waiting on another branch if needed.

See pipelines are failing on:

The following tasks should have their versions bumped due to changes in common: AzureCloudPowerShellDeploymentV1,AzureCloudPowerShellDeploymentV2,AzureFileCopyV1,AzureFileCopyV2,AzureFileCopyV3,AzureFileCopyV4,AzureFileCopyV5,AzureFileCopyV6,AzurePowerShellV2,AzurePowerShellV3,AzurePowerShellV4,SqlAzureDacpacDeploymentV1

@mortenlerudjordet
Copy link
Contributor Author

I will remove the change to Common/VstsAzureHelpers_ and create a new PR without to make it simpler to approve

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.

4 participants