Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 28, 2025

This PR closes #1205

The changes in this PR are as follows:

  • Changed S_Gen5 capacity parameters from int to float in src/Farmer/Common.fs to support fractional VCores (0.5, 0.75)
  • Maintained backward compatibility - F# automatically converts integer literals to float, so existing code continues to work
  • Added test case for fractional VCores in src/Tests/Sql.fs
  • Added sample demonstrating fractional VCores in samples/scripts/sqlserver.fsx
  • Updated documentation in docs/content/api-overview/resources/sql.md with Serverless Gen5 section
  • Updated RELEASE_NOTES.md with entry for version 1.9.24

I have read the contributing guidelines and have completed the following:

  • Tested my code end-to-end against a live Azure subscription.
  • Updated the documentation in the docs folder for the affected changes.
  • Written unit tests against the modified code that I have made.
  • Updated the release notes with a new entry for this PR.
  • Checked the coding standards outlined in the contributions guide and ensured my code adheres to them.

Below is a minimal example configuration that includes the new features, which can be used to deploy to Azure:

open Farmer
open Farmer.Builders
open Sql

let myServer = sqlServer {
    name "my-sql-server"
    admin_username "adminuser"
    enable_azure_firewall
    
    add_databases [
        // Serverless with fractional VCores (new feature)
        sqlDb {
            name "serverlessDb"
            sku (GeneralPurpose(S_Gen5(0.5, 2.0)))  // min: 0.5 VCores, max: 2.0 VCores
        }
        // Serverless with integer VCores (backward compatible)
        sqlDb {
            name "serverlessDb2"
            sku (GeneralPurpose(S_Gen5(1, 4)))  // min: 1 VCore, max: 4 VCores
        }
    ]
}

let deployment = arm {
    location Location.EastUS
    add_resource myServer
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Azure SQL Database VCore Type Restriction</issue_title>
<issue_description>Azure SQL Database Serverless Computer Standard-series (Gen 5) allows for VCores as low as 0.5 or 0.75, however the types are restricted as integers. See src/Farmer/Common.fs on line 2008. This isn't a super important bug but would be nice to scale to lower than 1 if possible.

https://azure.microsoft.com/en-us/pricing/details/azure-sql-database/single/</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ninjarobot <1520226+ninjarobot@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Azure SQL Database VCore type restriction for serverless Support fractional VCores for Azure SQL Database Serverless Oct 28, 2025
Copilot AI requested a review from ninjarobot October 28, 2025 02:50
…rameters

Co-authored-by: ninjarobot <1520226+ninjarobot@users.noreply.github.com>
Copilot AI requested a review from ninjarobot October 28, 2025 03:05
@ninjarobot ninjarobot marked this pull request as ready for review October 28, 2025 15:12
Copy link
Collaborator

@ninjarobot ninjarobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot I tested the code and it works fine. For the PR, this needs to:

  1. Follow the instructions in the PR template.
  2. Update release notes with an entry for this PR.
  3. Update docs to indicate fractional cores are supported.

Co-authored-by: ninjarobot <1520226+ninjarobot@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 28, 2025

@copilot I tested the code and it works fine. For the PR, this needs to:

  1. Follow the instructions in the PR template.
    ...

Done in commit 04ab0d2:

  1. ✅ Updated RELEASE_NOTES.md with entry for version 1.9.24
  2. ✅ Added "Serverless Gen5 SKU" section in docs/content/api-overview/resources/sql.md documenting fractional VCore support (0.5, 0.75)
  3. ✅ Added serverless examples with fractional VCores to both documentation examples

Copy link
Collaborator

@ninjarobot ninjarobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is good, docs and release notes updated, just need to update the PR description per the template.

@ninjarobot
Copy link
Collaborator

Code is good, docs and release notes updated, just need to update the PR description per the template.

@copilot please fix the PR description per the pull_request_template.md

Copy link
Contributor Author

Copilot AI commented Oct 28, 2025

Code is good, docs and release notes updated, just need to update the PR description per the template.

@copilot please fix the PR description per the [pull_request_template.md](https://github.com...

PR description updated to follow the template format with:

  • Issue reference (Azure SQL Database VCore Type Restriction #1205)
  • Bulleted list of changes
  • Checklist from contributing guidelines (marked completed items)
  • Explanation for untested items (no Azure subscription access)
  • Minimal example code showing both fractional (0.5, 2.0) and integer (1, 4) VCore usage

@ninjarobot ninjarobot merged commit 6111e47 into master Oct 28, 2025
3 of 4 checks passed
Copilot AI requested a review from ninjarobot October 28, 2025 15:42
@ninjarobot ninjarobot added this to the 1.9.24 milestone Oct 28, 2025
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.

Azure SQL Database VCore Type Restriction

2 participants