Skip to content
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

Split monolithic state into multiple entities #1626

Closed
Tracked by #1614
dbanck opened this issue Feb 12, 2024 · 2 comments
Closed
Tracked by #1614

Split monolithic state into multiple entities #1626

dbanck opened this issue Feb 12, 2024 · 2 comments

Comments

@dbanck
Copy link
Member

dbanck commented Feb 12, 2024


Split the current Module struct into three smaller structs: Module, Vars, Common (names TBD)

type Module struct {
Path string
ModManifest *datadir.ModuleManifest
ModManifestErr error
ModManifestState op.OpState
TerraformVersion *version.Version
TerraformVersionErr error
TerraformVersionState op.OpState
InstalledProviders InstalledProviders
InstalledProvidersErr error
InstalledProvidersState op.OpState
ProviderSchemaErr error
ProviderSchemaState op.OpState
PreloadEmbeddedSchemaState op.OpState
RefTargets reference.Targets
RefTargetsErr error
RefTargetsState op.OpState
RefOrigins reference.Origins
RefOriginsErr error
RefOriginsState op.OpState
VarsRefOrigins reference.Origins
VarsRefOriginsErr error
VarsRefOriginsState op.OpState
ParsedModuleFiles ast.ModFiles
ParsedVarsFiles ast.VarsFiles
ModuleParsingErr error
VarsParsingErr error
Meta ModuleMetadata
MetaErr error
MetaState op.OpState
ModuleDiagnostics ast.SourceModDiags
ModuleDiagnosticsState ast.DiagnosticSourceState
VarsDiagnostics ast.SourceVarsDiags
VarsDiagnosticsState ast.DiagnosticSourceState
}

  • Modules
    • Directory Path
    • Collected Reference Targets
    • Collected Reference Origins
    • Parsed Module Files
    • Diagnostics for Module Files
    • Metadata
  • Vars
    • Directory Path
    • Collected Variable Definition Reference Origins
    • Parsed Variable Definition Files
    • Diagnostics for Variable Definition Files
  • Common
    • Directory Path
    • Module Manifest (parsed .terraform/modules/modules.json)
    • Installed Terraform Version
    • Installed Providers

In the future this will allow us to create more state structs for more languages, like test or stacks.

@dbanck
Copy link
Member Author

dbanck commented Jun 11, 2024

Closed via #1667

@dbanck dbanck closed this as completed Jun 11, 2024
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant