-
Notifications
You must be signed in to change notification settings - Fork 585
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
Port Legacy SQL Server to FAKE 5 Module #2074
Port Legacy SQL Server to FAKE 5 Module #2074
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution.
I tried to pinpoint some places which might help to get this ready.
The only thing I'm a bit worried is getting the signatures right (as this introduces a lot of public API).
Regarding the tests: On circle-ci we can use any docker-container we might need, for other CI systems I'd assume there are other solutions. We just need to make sure we keep the build time low or move long running tests to other run configurations.
help/redirects/sqlserver.md
Outdated
@@ -0,0 +1,6 @@ | |||
# Packaging and Deploying SQL Databases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need a redirection page as it didn't exist previously. We mainly have those to not break old links.
@@ -0,0 +1,24 @@ | |||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<PropertyGroup> | |||
<TargetFramework>netstandard2.0</TargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is why the api docs are missing, we need <TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
(ie one target for the full framework) in order to generate docs. This is because FSharp.Formatting is not yet compatible with netstandard assemblies.
let dropAndCreateDatabase connectionString = | ||
connectionString | ||
|> getServerInfo | ||
|> dropDb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this are the signatures we want (ie returning ServerInfo
instead of unit
). This makes those methods weird to use on their own and you need |> ignore
everywhere?
Not sure just my thinking around that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not decide which way to go either, so I stuck with the signatures the old module had.
I like returning the ServerInfo record from attach
, detach
, killAllProcesses
because it indicates that something on the serverInfo
record changed. The underlying calls to serverInfo.Server.<Attach/Detach/KillAllProcesses>
read like they modify the serverInfo.Server
object.
I see that those functions could return unit
instead because serverInfo
is already changed by serverInfo.Server
mutating, and usually unit
indicates some side effect happened.
Now that I write this all out, it sounds like returning unit
is a clearer signature with the bonus of less |> ignore
. I will get going on that and hopefully push it today.
Current status - making some integration tests for this on appveyor. |
|
||
type ServerInfo = { | ||
Server: Server | ||
ConnBuilder: SqlConnectionStringBuilder } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow I don't like this mutable design, but if you can persuade this that this improves the API/design or is needed for some reason I'm happy to merge it (we might consider adding that as comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ported what FAKE 4 had, and I also do not like it. I will try some things out in a branch to not hold up this PR if that is ok.
Yes that would be nice indeed, however if that turns out to be too complicated feel free to tell so. Maybe we can add some small docs on how to test this manually. |
Should we release this as is? Can you resolve the conflicts? |
7c11ec7
to
2ee1519
Compare
My build fails for the same reason as the build for Release 5.7.2 did. Is that something I should fix? I agree about merging this. I won't hold this up with integration tests either. Turns out they were tough to get working on the CI. |
Ah yes sorry I'm just in the process of getting it green again :( |
Wait, somehow your commits disappeared? |
Yikes, I am not doing well here. Let me get them back up. |
- rebase on older good commit aa803f5
2ee1519
to
336abd7
Compare
Here is the rundown:
|
Feel free to open a PR to improve visibility.
Feel free to add a Readme to the test project and a note linking to the readme in the contributors page. |
I re-started the PR as it looked like some temporary thing, will merge when green |
Thanks for taking care of this :) |
@gfritz Just to let you know. @BlythMeister informed me that apparently we cannot release this because of #2007 ... |
Well crud, I did not run into this. Wish I could have caught it earlier. |
Description
Ports SqlServer from FAKE 4 to a FAKE 5 module.
TODO
help/markdown
)help/templates/template.cshtml
, linking to the API-reference is fine.dotnet sln Fake.sln add src/app/Fake.*/Fake.*.fsproj
)New (API-)documentation for new features exist
I could use some advice on how to get the new module to appear in the apidocs. I think I followed what Sql.DacPac did, but I cannot get Sql.SqlServer to appear.
Unit or integration test exist
If there is a SQL Server edition installed on the build server, I would be interested in trying to get some integration tests working. I don't think testing this module makes much sense without an instance of SQL Server to use.