Skip to content

Conversation

alevyinroc
Copy link
Contributor

Type of Change

  • Bug fix (non-breaking change, fixes Export output should be standardized #4704 )
  • New feature (non-breaking change, adds functionality)
  • Breaking change (effects multiple commands or functionality)
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Nunit test is included
  • Documentation
  • Build system

Purpose

To standardize the directory that the Export-Dba* functions default their output to.

Approach

  1. Create a dbatools config setting for the export path, defaulted to My Documents (or equivalent)
  2. Default the Path parameter for all Export-Dba* functions to use the config setting above

Commands to test

Export-Dba*

@sqllensman
Copy link
Contributor

Can we also consider a configuration for the TimeNow calculation that gets added to created names in some commands? While one country in world likes mmddyyyy format it would be nice to not force that on the other 190+ countries.

@sqllensman
Copy link
Contributor

Is there a reason for mixing Join- Path and Join-DbaPath in the various changes?

@alevyinroc
Copy link
Contributor Author

@sqllensman No reason other than haste; I was trying to wrap up the changes very quickly and didn't review my previous work to be consistent. I've revised my changes to use Join-DbaPath in all the sections I touched

@wsmelton
Copy link
Member

Only problem I have with this is it breaks cross platform support.

@wsmelton
Copy link
Member

This is also to big of a change to publish right now and I would recommend pushing this to the pre-release branch for 1.0 release.

@alevyinroc
Copy link
Contributor Author

What breaks cross-platform support? Join-DbaPath or [Environment]::GetFolderPath("MyDocuments") ? The latter returns a path on PS Core on Mac OS and PS 5.1 on Windows.

@wsmelton
Copy link
Member

Ok. I don't have anything but windows to verify.

@potatoqualitee potatoqualitee changed the base branch from development to prerelease May 17, 2019 09:18
@wsmelton
Copy link
Member

@alevyinroc will you be able to resolve the conflict in this PR so we can get it merged?

@potatoqualitee
Copy link
Member

Thanks Shawn, I would like to get it merged as well 👍

@potatoqualitee
Copy link
Member

i think i fixed it. wish us luck! 😬

@alevyinroc
Copy link
Contributor Author

I don't quite understand why the tests are failing, will have to check things out tomorrow when I'm back on a Windows machine

@wsmelton
Copy link
Member

Moved all these test to the instance2 so they are in the same group. Not sure if that is the reasoning but it puts them in a smaller group for test.

@wsmelton
Copy link
Member

Well test still failed but at least it is all in one place to reference 😁

@wsmelton
Copy link
Member

I pulled the current prerelease branch into this PR because the import process changed and this didn't have the latest updates for it. Not sure if that caused any issues but just cover all bases right now.

@alevyinroc
Copy link
Contributor Author

I am not going to be able to look at the latest test failures until June 1 at the absolute earliest

@potatoqualitee
Copy link
Member

thanks for the update, i'll take a closer look

@wsmelton
Copy link
Member

Ok. So all I can say on this one @alevyinroc is just save the branch and code for after we get 1.0 done.

How these test have ever passed previously I don't know because the one just for Login has bad logic that is not right the way I read it all. I think it just needs to be reworked and once we start working on upgrading to the latest Pester release all of our test will have to be touched anyway.

I'm just going to close this one for now.

@wsmelton wsmelton closed this May 23, 2019
@alevyinroc
Copy link
Contributor Author

@wsmelton sounds good to me. I'll take a look at it over the summer when there's a bit more time to step back, look at all the pieces, and maybe break it into smaller PRs to make fixing the tests & conflicts easier

@potatoqualitee
Copy link
Member

wait wait, this standardization is required for 1.0. I'd rather them not have integration tests than not get upgraded. I'll reopen, skip the failing integration tests, and merge.

@potatoqualitee
Copy link
Member

GREEEEEEEEEEEEEEEEEEEEEEN!

@potatoqualitee potatoqualitee merged commit 201a661 into dataplat:prerelease May 23, 2019
@potatoqualitee
Copy link
Member

Thank you, everyone, for your time 🙇

@alevyinroc alevyinroc deleted the StandardExportDir-4704 branch May 24, 2019 01:32
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.

Export output should be standardized
4 participants