lowlydba / lowlydba.sqlserver

:spoon: A cross-platform Ansible collection using PowerShell to configure and maintain SQL Server.
https://galaxy.ansible.com/ui/repo/published/lowlydba/sqlserver
GNU General Public License v3.0
19 stars 12 forks source link

Feature: get/add/remove roles #162

Closed jkrilov closed 11 months ago

jkrilov commented 1 year ago

Description

New module to add/remove roles for a DB user.

How Has This Been Tested?

Integration tests

Types of changes

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -4.21% :warning:

Comparison is base (104572c) 93.81% compared to head (96a62a0) 89.60%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #162 +/- ## ========================================== - Coverage 93.81% 89.60% -4.21% ========================================== Files 64 54 -10 Lines 2198 1453 -745 ========================================== - Hits 2062 1302 -760 - Misses 136 151 +15 ``` | [Flag](https://app.codecov.io/gh/lowlydba/lowlydba.sqlserver/pull/162/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=John+McCall) | Coverage Δ | | |---|---|---| | [sanity](https://app.codecov.io/gh/lowlydba/lowlydba.sqlserver/pull/162/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=John+McCall) | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=John+McCall#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/lowlydba/lowlydba.sqlserver/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=John+McCall) | Coverage Δ | | |---|---|---| | [plugins/modules/role\_member.py](https://app.codecov.io/gh/lowlydba/lowlydba.sqlserver/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=John+McCall#diff-cGx1Z2lucy9tb2R1bGVzL3JvbGVfbWVtYmVyLnB5) | `100.00% <100.00%> (ø)` | | | [plugins/modules/role\_member\_info.py](https://app.codecov.io/gh/lowlydba/lowlydba.sqlserver/pull/162?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=John+McCall#diff-cGx1Z2lucy9tb2R1bGVzL3JvbGVfbWVtYmVyX2luZm8ucHk=) | `100.00% <100.00%> (ø)` | | ... and [15 files with indirect coverage changes](https://app.codecov.io/gh/lowlydba/lowlydba.sqlserver/pull/162/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=John+McCall)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jkrilov commented 1 year ago

@lowlydba I'm seeing intermittent failures of sp_whoisactive.

Edit: Now I'm seeing the error every time on the Windows runners. I'll take a look this afternoon to see if I can determine the cause.

lowlydba commented 1 year ago

@lowlydba I'm seeing intermittent failures of sp_whoisactive.

Edit: Now I'm seeing the error every time on the Windows runners. I'll take a look this afternoon to see if I can determine the cause.

Yeah I saw some of those flake test runs as well - will look into them when I get a chance.

jkrilov commented 1 year ago

@lowlydba I'm seeing intermittent failures of sp_whoisactive. Edit: Now I'm seeing the error every time on the Windows runners. I'll take a look this afternoon to see if I can determine the cause.

Yeah I saw some of those flake test runs as well - will look into them when I get a chance.

So it's just parsing the releases to download the latest zip. Not sure why it would get 403 intermittently, unless the action runners are being throttled or something. May be worth providing a local file for the integration tests to avoid the outside dependency.

https://github.com/dataplat/dbatools/blob/b8fe96052245edab3e568c11bd43c468a8b0fc8a/functions/Save-DbaCommunitySoftware.ps1#L157

lowlydba commented 1 year ago

@Joey40 If you rebase from main, I removed the EOL 2.11 version so there are fewer jobs now. Github support indicated its a rate limit issue mostly (per hour) so if this continues to be a problem giving a 60 minute cooloff should help the jobs to work.

jkrilov commented 1 year ago

Sounds good. Sorry I've been quiet for a couple weeks with the holidays and new year. I'll see if I can get this completed next week.

Jvekka commented 1 year ago

This was actually something I was starting to build, but I noticed it already existed here. Can I help with something to get going again?

jkrilov commented 1 year ago

This was actually something I was starting to build, but I noticed it already existed here.

Can I help with something to get going again?

I'll look this over today. I had some other work to do and honestly forgot to finish this.

If there's something you'd like that I haven't added feel free to let me know. I'd be happy to have the help.

lowlydba commented 11 months ago

Going to close this for now as it is a bit stale, but feel free to re-open if you want to resume it.