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

fix: PowerShell formatting - 4 spaces tab alignment #2471

Merged
merged 6 commits into from
Jul 5, 2024

Conversation

eriqua
Copy link
Contributor

@eriqua eriqua commented Jun 19, 2024

Description

Disable editor.detectIndentation vscode setting for PowerShell files to allow 4 spaces tab to be effective
Reformat all .ps1 files

Note: only contains formatting changes

Pipeline Reference

Pipeline
avm.res.network.nat-gateway
avm.res.compute.virtual-machine-scale-set
avm.res.analysis-services.server

Type of Change

  • Update to CI Environment or utilities (Non-module affecting changes)
  • Azure Verified Module updates:
    • Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in version.json:
      • Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description.
      • The bug was found by the module author, and no one has opened an issue to report it yet.
    • Feature update backwards compatible feature updates, and I have bumped the MINOR version in version.json.
    • Breaking changes and I have bumped the MAJOR version in version.json.
    • Update to documentation

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • I have run Set-AVMModule locally to generate the supporting module files.
  • My corresponding pipelines / checks run clean and green without any errors or warnings

@eriqua eriqua added Class: Resource Module 📦 This is a resource module Class: Pattern Module 📦 This is a pattern module Needs: Core Team 🧞 This item needs the AVM Core Team to review it Type: CI 🚀 This issue is related to the AVM CI labels Jun 19, 2024
@eriqua eriqua self-assigned this Jun 19, 2024
@eriqua eriqua requested review from a team as code owners June 19, 2024 00:06
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Jun 19, 2024

Important

The "Needs: Triage 🔍" label must be removed once the triage process is complete!

Tip

For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue label Jun 19, 2024
@eriqua eriqua enabled auto-merge (squash) June 19, 2024 00:20
AlexanderSehr
AlexanderSehr previously approved these changes Jun 19, 2024
@AlexanderSehr
Copy link
Contributor

Hey @eriqua, just one comment/suggestion. Looks good

@eriqua eriqua removed the Needs: Triage 🔍 Maintainers need to triage still label Jun 19, 2024
@eriqua
Copy link
Contributor Author

eriqua commented Jun 21, 2024

Hey @eriqua, just one comment/suggestion. Looks good

I don't know why but this requires finops pattern to recompile the main.json to not fail its static validation. Will move to draft until further investigation

@eriqua eriqua marked this pull request as draft June 21, 2024 18:52
auto-merge was automatically disabled June 21, 2024 18:52

Pull request was converted to draft

@eriqua
Copy link
Contributor Author

eriqua commented Jun 24, 2024

Hey @eriqua, just one comment/suggestion. Looks good

I don't know why but this requires finops pattern to recompile the main.json to not fail its static validation. Will move to draft until further investigation

@AlexanderSehr got it, waiting for #2498 to be merged as that is regenerating the main.json for all modules already. I believe this is due to the new Bicep version, e.g. if you look at this diff you'll see a different way \r and \n are managed

@AlexanderSehr
Copy link
Contributor

Hey @eriqua, just one comment/suggestion. Looks good

I don't know why but this requires finops pattern to recompile the main.json to not fail its static validation. Will move to draft until further investigation

@AlexanderSehr got it, waiting for #2498 to be merged as that is regenerating the main.json for all modules already. I believe this is due to the new Bicep version, e.g. if you look at this diff you'll see a different way \r and \n are managed

I wonder if we can also manage that via a VSCode setting - or if it's an issue of the utility and must be tackled there...

krbar
krbar previously approved these changes Jun 27, 2024
@eriqua eriqua dismissed stale reviews from krbar and AlexanderSehr via 7975512 July 5, 2024 11:26
eriqua and others added 2 commits July 5, 2024 13:38
@eriqua eriqua marked this pull request as ready for review July 5, 2024 12:01
AlexanderSehr
AlexanderSehr previously approved these changes Jul 5, 2024
@eriqua eriqua enabled auto-merge (squash) July 5, 2024 12:59
avm/bicepconfig.json Outdated Show resolved Hide resolved
@eriqua eriqua merged commit 1ccb706 into Azure:main Jul 5, 2024
4 checks passed
@AlexanderSehr AlexanderSehr deleted the fix/ps-formatting branch July 5, 2024 13:09
@sebassem
Copy link
Contributor

sebassem commented Jul 9, 2024

Hey @eriqua, just one comment/suggestion. Looks good

I don't know why but this requires finops pattern to recompile the main.json to not fail its static validation. Will move to draft until further investigation

Hi @eriqua , I notice this every time pipeline runs for my pattern modules(finops and sub-vending) which run PowerShell deployment scripts, usually on compile spaces in the script are translated to \r\n instead of \n so I usually have to remove the spaces and re-run it. Any thoughts on which setting might be causing this ?

@eriqua
Copy link
Contributor Author

eriqua commented Jul 9, 2024

Hey @eriqua, just one comment/suggestion. Looks good

I don't know why but this requires finops pattern to recompile the main.json to not fail its static validation. Will move to draft until further investigation

Hi @eriqua , I notice this every time pipeline runs for my pattern modules(finops and sub-vending) which run PowerShell deployment scripts, usually on compile spaces in the script are translated to \r\n instead of \n so I usually have to remove the spaces and re-run it. Any thoughts on which setting might be causing this ?

Hi @sebassem, not sure, I just noticed the static validation failing for both finops and sub-vending starting from Bicep version 0.28.1, independently of the latest vscode settings update. @AlexanderSehr anything from your side on this?

@AlexanderSehr
Copy link
Contributor

AlexanderSehr commented Jul 9, 2024

Hey @eriqua, sub-vending looks green to me (now) 😄
Fin-Ops on the other hand has a apparently a \r\n vs \n issue. So both had the same error I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Class: Pattern Module 📦 This is a pattern module Class: Resource Module 📦 This is a resource module Needs: Core Team 🧞 This item needs the AVM Core Team to review it Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: CI 🚀 This issue is related to the AVM CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants