SqlServerDsc icon indicating copy to clipboard operation
SqlServerDsc copied to clipboard

SQLRS: Various improvements

Open randomnote1 opened this issue 3 years ago • 40 comments

Pull Request (PR) description

  • Added Power BI Report Server support
  • Added the ability to change the service account
  • Added the ability to define the database name

This Pull Request (PR) fixes the following issues

  • Fixes #148
  • Fixes #149
  • Fixes #587
  • Fixes #626
  • Fixes #860
  • Fixes #936

Task list

  • [x] Added an entry to the change log under the Unreleased section of the file CHANGELOG.md. Entry should say what was changed and how that affects users (if applicable), and reference the issue being resolved (if applicable).
  • [x] Resource documentation updated in the resource's README.md.
  • [x] Resource parameter descriptions updated in schema.mof.
  • [x] Comment-based help updated, including parameter descriptions.
  • [x] Localization strings updated.
  • [x] Examples updated.
  • [x] Unit tests updated. See DSC Community Testing Guidelines.
  • [ ] Integration tests updated (where possible). See DSC Community Testing Guidelines.
  • [x] Code changes adheres to DSC Community Style Guidelines.

This change is Reviewable

randomnote1 avatar Jun 14 '22 20:06 randomnote1

Codecov Report

Merging #1758 (04685ba) into main (c780423) will decrease coverage by 7%. The diff coverage is 35%.

:exclamation: Current head 04685ba differs from pull request most recent head 3b225a3. Consider uploading reports for the commit 3b225a3 to get more accurate results

Impacted file tree graph

@@          Coverage Diff           @@
##           main   #1758     +/-   ##
======================================
- Coverage    92%     85%     -7%     
======================================
  Files        85      36     -49     
  Lines      7640    6490   -1150     
======================================
- Hits       7038    5533   -1505     
- Misses      602     957    +355     
Flag Coverage Δ
unit 85% <35%> (-7%) :arrow_down:
Impacted Files Coverage Δ
source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1 40% <35%> (-60%) :arrow_down:
...dules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 98% <100%> (-1%) :arrow_down:

... and 49 files with indirect coverage changes

codecov[bot] avatar Jun 14 '22 20:06 codecov[bot]

I'm waiting for the build workers to get the Windows patch for DSC so the integration tests can run. I will review then.

johlju avatar Jul 19 '22 07:07 johlju

Looks like my Azure VMs started working again last week, so, hopefully soon!

randomnote1 avatar Jul 19 '22 13:07 randomnote1

/AzurePipelines run

johlju avatar Jul 27 '22 07:07 johlju

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 27 '22 07:07 azure-pipelines[bot]

@randomnote1 the integration test runs now - there are some failing tests in integration and unit tests. Let me know when they pass and I review.

johlju avatar Jul 27 '22 16:07 johlju

@johlju, how do we log into the build servers to troubleshoot what is wrong? I recall seeing something somewhere, but I don't remember where!

randomnote1 avatar Jul 27 '22 17:07 randomnote1

It is not possible with the Azure DevOps build servers. It was possible way back when we used AppVeyor. I usually add debug verbose messages to see how far it comes before it throws to locate the line that fails. Not optimal, but often only way to find the issue if unit tests don’t catch it.

johlju avatar Jul 27 '22 17:07 johlju

/AzurePipelines run

randomnote1 avatar Jul 28 '22 15:07 randomnote1

Commenter does not have sufficient privileges for PR 1758 in repo dsccommunity/SqlServerDsc

azure-pipelines[bot] avatar Jul 28 '22 15:07 azure-pipelines[bot]

@johlju, looks like the only failure in the pipelines was well before SqlRs was attempted. Can you re-start the pipeline to verify?

randomnote1 avatar Jul 28 '22 15:07 randomnote1

Restarted.

johlju avatar Jul 28 '22 16:07 johlju

AzurePipelines run

johlju avatar Jul 28 '22 18:07 johlju

Restart all jobs again because SQL2016 for one job only ran for 10 minutes before failing without stopping the pipeline.

johlju avatar Jul 28 '22 18:07 johlju

/AzurePipelines run

johlju avatar Jul 28 '22 18:07 johlju

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 28 '22 18:07 azure-pipelines[bot]

Now both jobs for SQL2016 seems to fail on the same spot.

johlju avatar Jul 29 '22 08:07 johlju

All right, thanks. I'll continue troubleshooting

randomnote1 avatar Jul 29 '22 11:07 randomnote1

@johlju, what's going on with the build right now? I keep getting this from AppVeyor:

The build phase is set to "MSBuild" mode (default), but no Visual Studio project or solution files were found in the root directory. If you are not building Visual Studio project switch build mode to "Script" and provide your custom build command.

randomnote1 avatar Jul 29 '22 18:07 randomnote1

@randomnote1 I added Appveyor as a build job for debug purpose. If it helps you. Haven't merged the README.md yet (but as soon as the tests passes), but you can read here: https://github.com/dsccommunity/SqlServerDsc/blob/03f4a281044a950f43f7b7fd25f2234924e5653a/tests/Integration/README.md#debugging

johlju avatar Jul 29 '22 18:07 johlju

I just merged the appveyor.yml so you won't get the above error.

johlju avatar Jul 29 '22 18:07 johlju

You have to rebase to get that though. 🙂

johlju avatar Jul 29 '22 18:07 johlju

Awesome, you're the man! Thanks!

randomnote1 avatar Jul 29 '22 18:07 randomnote1

You have to uncomment a row in appveyor.yml to have the build worker online after the tests finishes. I didn't want to do that by default since for each commit it would hold up other builds that use AppVeyor still.

johlju avatar Jul 29 '22 18:07 johlju

Saw that it doesn't work to add $blockRdp = $true to the init: step. Must add this in appveyor.yml to paus the build at the end of the run. I will update the file on main-branch.

on_finish:
  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

johlju avatar Jul 29 '22 19:07 johlju

@randomnote1 how does it go finding the cause of the failing tests? Would of course be great if this worked for all versions , but if you see that there is an issue getting this to work for the Reporting Services 2016 should we just add logic that if it is 2016 then it uses the previous (simpler) functionality? Then we could try to get the SQL 2016 moved to new functionality in a new PR? Just a suggestion to unblock you, you decide. Let me know if I can help with anything.

johlju avatar Aug 03 '22 14:08 johlju

I found where and why the issue is occurring. I just haven't had time to think through resolutions yet.

randomnote1 avatar Aug 03 '22 19:08 randomnote1

@randomnote1 you need to rebase this PR so it runs the tests again. 🙂

johlju avatar Aug 15 '22 15:08 johlju

Yup, working on it. The changes to the rebase conflict resolution in VS Code is weird. Probably gonna have to manually fix the ChangeLog

randomnote1 avatar Aug 15 '22 15:08 randomnote1

@randomnote1 was hoping to get in this PR before release next major release. Do you think it is gonna take a while to get the tests to pass (to fix this issue) so I should just release a new version?

johlju avatar Aug 27 '22 08:08 johlju