Skip to content

Conversation

@tobio
Copy link
Member

@tobio tobio commented Nov 20, 2025

No description provided.

@tobio tobio requested a review from nick-benoit November 20, 2025 02:58
@tobio tobio self-assigned this Nov 20, 2025
Copilot AI review requested due to automatic review settings November 20, 2025 02:58
Copy link
Contributor

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 introduces support for publishing experimental resources and datasources within the framework provider by implementing an opt-in mechanism controlled by the TF_ELASTICSTACK_INCLUDE_EXPERIMENTAL environment variable.

Key Changes:

  • Added environment variable-based feature flag to conditionally include experimental resources and datasources
  • Refactored provider methods to separate stable and experimental offerings
  • Created placeholder methods for experimental resources and datasources

datafeed_state.NewMLDatafeedStateResource,
}
}

Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The experimentalResources method should include a comment explaining its purpose and when/how experimental resources should be added. This helps future contributors understand where to add experimental features.

Suggested change
// experimentalResources returns a list of experimental resource constructors.
//
// Experimental resources are features that are not yet considered stable and may change or be removed in future releases.
// To add a new experimental resource, append its constructor to the returned slice.
// These resources will only be included in the provider if the environment variable
// TF_ELASTICSTACK_INCLUDE_EXPERIMENTAL is set to "true".
//
// This method helps contributors isolate experimental features from stable ones.

Copilot uses AI. Check for mistakes.
role_mapping.NewRoleMappingDataSource,
}
}

Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The experimentalDataSources method should include a comment explaining its purpose and when/how experimental datasources should be added. This helps future contributors understand where to add experimental features.

Suggested change
// experimentalDataSources returns a list of experimental datasource constructors.
// Experimental datasources are features that are not yet stable or officially supported.
// To include experimental datasources in the provider, add their constructors to the returned slice.
// These datasources will only be registered if the environment variable TF_ELASTICSTACK_INCLUDE_EXPERIMENTAL is set to "true".
// Future contributors should add new experimental datasources here before they are promoted to stable.

Copilot uses AI. Check for mistakes.

return resources
}

Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The resources method should include a comment explaining that it returns stable/non-experimental resources, distinguishing it from experimentalResources.

Suggested change
// resources returns only stable (non-experimental) resources for the provider.
// Experimental resources are returned separately by experimentalResources.

Copilot uses AI. Check for mistakes.
func (p *Provider) experimentalResources(ctx context.Context) []func() resource.Resource {
return []func() resource.Resource{}
}

Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The dataSources method should include a comment explaining that it returns stable/non-experimental datasources, distinguishing it from experimentalDataSources.

Suggested change
// dataSources returns the list of stable (non-experimental) datasources for the provider.
// Experimental datasources are returned by experimentalDataSources.

Copilot uses AI. Check for mistakes.
@tobio tobio merged commit a144f6b into main Nov 20, 2025
54 checks passed
@tobio tobio deleted the experimental-resources branch November 20, 2025 19:09
nick-benoit pushed a commit that referenced this pull request Nov 25, 2025
tobio added a commit that referenced this pull request Nov 27, 2025
…ata-view-resource

* origin/main: (32 commits)
  chore(deps): update kibana-openapi-spec digest to c99d51c (#1487)
  [Feature] Introduce elasticsearch alias resource with atomic write index management and nested attributes (#1343)
  Support setting solution for 8.16+ on Cloud (#1486)
  Refactor all Kibana connector acceptance tests to use ConfigDirectory pattern (#1484)
  Support .bedrock and .gen-ai connectors (#1467)
  Bump golang.org/x/crypto from 0.41.0 to 0.45.0 in /libs/go-kibana-rest (#1481)
  Bump golang.org/x/crypto from 0.42.0 to 0.45.0 (#1480)
  fix(deps): update module github.com/go-resty/resty/v2 to v2.17.0 (#1478)
  chore(deps): update kibana-openapi-spec digest to f1d0789 (#1479)
  chore(deps): update kibana-openapi-spec digest to 5841714 (#1477)
  chore(deps): update golang:1.25.4 docker digest to 6981837 (#1476)
  chore(deps): update kibana-openapi-spec digest to 67de5ef (#1475)
  chore(deps): update golangci/golangci-lint-action digest to e7fa5ac (#1474)
  chore(deps): update kibana-openapi-spec digest to b4553b6 (#1472)
  chore(deps): update actions/checkout action to v6 (#1470)
  Support publishing experimental resources/datasources within the framework provider (#1464)
  chore(deps): update actions/setup-go digest to 4dc6199 (#1466)
  fix(deps): update module github.com/elastic/elastic-transport-go/v8 to v8.8.0 (#1459)
  Prepare 0.12.2 Release (#1458)
  Support spaces for detection rules (#1457)
  ...
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.

3 participants