Skip to content

Conversation

@remyleone
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 11, 2025 17:48
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 1.71%. Comparing base (e00b6fe) to head (1a027f6).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
provider/sdkv2.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #3530      +/-   ##
=========================================
- Coverage    1.71%   1.71%   -0.01%     
=========================================
  Files         420     420              
  Lines       45909   45910       +1     
=========================================
  Hits          787     787              
- Misses      45035   45036       +1     
  Partials       87      87              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables markdown formatting as the default description kind for the entire Scaleway Terraform provider by setting the global schema.DescriptionKind variable to schema.StringMarkdown. This allows provider descriptions, documentation, and help text to be rendered with markdown formatting support.

  • Sets schema.DescriptionKind = schema.StringMarkdown to enable markdown descriptions throughout the provider

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 369 to +371
p.ConfigureContextFunc = func(ctx context.Context, data *schema.ResourceData) (any, diag.Diagnostics) {
terraformVersion := p.TerraformVersion
schema.DescriptionKind = schema.StringMarkdown
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

Setting the global variable schema.DescriptionKind inside ConfigureContextFunc is problematic. This function can be called multiple times (e.g., during provider reconfiguration or in test scenarios), and modifying a global variable inside it could lead to race conditions in concurrent usage scenarios.

The DescriptionKind should be set once during provider initialization, not during configuration. Consider moving this line to execute before the provider is returned, outside of the ConfigureContextFunc. For example, it could be placed right after addBetaResources(p) and before setting p.ConfigureContextFunc.

Suggested change
p.ConfigureContextFunc = func(ctx context.Context, data *schema.ResourceData) (any, diag.Diagnostics) {
terraformVersion := p.TerraformVersion
schema.DescriptionKind = schema.StringMarkdown
schema.DescriptionKind = schema.StringMarkdown
p.ConfigureContextFunc = func(ctx context.Context, data *schema.ResourceData) (any, diag.Diagnostics) {
terraformVersion := p.TerraformVersion

Copilot uses AI. Check for mistakes.
@remyleone remyleone marked this pull request as draft December 11, 2025 20:18
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.

2 participants