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

Use dynamic configuration model in bundles #1098

Merged
merged 142 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
ab894fa
Work on convert.FromTyped
pietern Oct 31, 2023
d23e201
More work on ToTyped
pietern Oct 31, 2023
36ea807
More tests
pietern Oct 31, 2023
b9191a4
Cleanup
pietern Oct 31, 2023
7968bcb
wip
pietern Oct 31, 2023
9b1ed86
Function to merge two instances of config.Value
pietern Oct 31, 2023
effb185
Merge branch 'config-merge' into bundle-use-new-config-framework
pietern Oct 31, 2023
314ab30
tmp
pietern Nov 1, 2023
d9d71c3
Merge remote-tracking branch 'origin/main' into bundle-use-new-config…
pietern Nov 15, 2023
bacac76
Rename variable bundle -> b
pietern Nov 15, 2023
33f5e75
Replace direct calls with bundle.Apply
pietern Nov 15, 2023
e7091f5
Merge branch 'bundle-apply' into bundle-use-new-config-framework
pietern Nov 15, 2023
bf54271
Tmp
pietern Nov 15, 2023
a68f134
Add IsValid function to config.Value
pietern Nov 24, 2023
a93b508
Populate struct field with `config.Value` instance if possible
pietern Nov 24, 2023
1dad855
Merge remote-tracking branch 'origin/main' into bundle-use-new-config…
pietern Nov 24, 2023
41658d4
Fix
pietern Nov 24, 2023
c8f02dc
Merge branch 'config-add-isvalid' into bundle-use-new-config-framework
pietern Nov 24, 2023
0d2d4b8
Merge branch 'config-set-value-on-struct' into bundle-use-new-config-…
pietern Nov 24, 2023
ca5d5d4
Merge remote-tracking branch 'origin/main' into bundle-use-new-config…
pietern Dec 18, 2023
f18ba50
Add config walker
pietern Dec 18, 2023
f7b3290
Capabilities to walk the config tree
pietern Dec 18, 2023
21006e5
Mutator tests pass
pietern Dec 18, 2023
97908b6
Construct path from string
pietern Dec 20, 2023
4543d2d
wip
pietern Dec 20, 2023
875454d
Functionality to walk a config.Value tree
pietern Dec 20, 2023
89cae7c
Comments
pietern Dec 20, 2023
5695e03
Merge branch 'value-path' into bundle-use-new-config-framework
pietern Dec 20, 2023
ad3b62b
wip
pietern Dec 20, 2023
4347007
wip
pietern Dec 20, 2023
bd64d1d
Fix job with spark conf test
pietern Dec 20, 2023
962fa96
Merge remote-tracking branch 'origin/main' into bundle-use-new-config…
pietern Dec 21, 2023
40e1425
Address comments
pietern Dec 22, 2023
9ee9233
Merge branch 'value-path' into bundle-use-new-config-framework
pietern Dec 22, 2023
fb7ec6b
Rename libs/config -> libs/dyn
pietern Dec 22, 2023
b71d8d4
Merge branch 'rename-config-dyn' into bundle-use-new-config-framework
pietern Dec 22, 2023
8fc3ab5
Finalize package rename
pietern Dec 22, 2023
3dbadb4
More renaming
pietern Dec 22, 2023
8a11cee
Use string path in bundletest.SetLocation
pietern Dec 22, 2023
69370c4
Return empty map for non-nil structs
pietern Dec 22, 2023
cdbea58
Use resource key as name in permissions code
pietern Dec 22, 2023
21cf860
Merge branch 'permissions-use-resource-key' into bundle-use-new-confi…
pietern Dec 22, 2023
643ae8d
Merge remote-tracking branch 'origin/main' into bundle-use-new-config…
pietern Dec 27, 2023
892b344
Merge remote-tracking branch 'origin/main' into bundle-use-new-config…
pietern Jan 3, 2024
68135cb
wip git
pietern Jan 4, 2024
b50cc8a
More dyn work
pietern Jan 4, 2024
2f36c7e
remove nop
pietern Jan 4, 2024
aa19b48
Consolidate functions to convert `dyn.Value` to native types
pietern Jan 4, 2024
0213861
Inline
pietern Jan 4, 2024
8f3cd2e
Define dyn.InvalidValue
pietern Jan 4, 2024
4470722
Merge branch 'dyn-underlying' into bundle-use-dyn
pietern Jan 4, 2024
1cf75ee
Merge branch 'dyn-invalid' into bundle-use-dyn
pietern Jan 4, 2024
83fb21c
dyn wip
pietern Jan 4, 2024
d80a8ce
More dyn work
pietern Jan 4, 2024
b825ccd
More dyn work
pietern Jan 4, 2024
fab40b1
Update mutators to use new dyn functionality
pietern Jan 4, 2024
2ab8065
wip
pietern Jan 10, 2024
47eb229
comment
pietern Jan 10, 2024
c9330a4
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Jan 12, 2024
b3113d6
dynvar
pietern Jan 17, 2024
335d3de
More dynvar
pietern Jan 19, 2024
b9ea101
Comment
pietern Jan 23, 2024
9000bcb
Make variable tests pass
pietern Jan 23, 2024
ab42361
.
pietern Jan 23, 2024
a95be0f
wip: make variable resolution work through dyn
pietern Jan 24, 2024
d0d7536
Add functionality to visit values in `dyn.Value` tree
pietern Jan 24, 2024
af0e3e2
Add `dynvar` package for variable resolution with a `dyn.Value` tree
pietern Jan 24, 2024
37bd8f1
Comments
pietern Jan 24, 2024
a7348d5
Remove path and key from ref
pietern Jan 24, 2024
b739338
Merge branch 'dynvar' into bundle-use-dyn
pietern Jan 24, 2024
a20a7f9
Restore variable initialization
pietern Jan 24, 2024
36eb46e
Fixes
pietern Jan 24, 2024
764489e
Use mocks in pipeline glob test
pietern Jan 24, 2024
48e2737
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Jan 25, 2024
b6ade6c
Remove file
pietern Jan 25, 2024
0b79685
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Jan 31, 2024
1b70822
Fix test
pietern Jan 31, 2024
71f326f
Remove mergo dependency
pietern Jan 31, 2024
2dec864
Make linter happy
pietern Jan 31, 2024
1fbed61
Always reset typed config after running mutator
pietern Feb 2, 2024
01a8b20
Clean paths in test for sync path rewrites
pietern Feb 5, 2024
fc9c31c
Use dyn.Map for sync section
pietern Feb 5, 2024
cdcf875
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 5, 2024
055a10e
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 5, 2024
afd7450
Clean paths in sync override test
pietern Feb 5, 2024
b6b3e07
Factor out function to merge elements by key
pietern Feb 5, 2024
20d5380
Rename
pietern Feb 5, 2024
c445d19
Revert commented out scripts section
pietern Feb 5, 2024
6b78191
No new var
pietern Feb 5, 2024
9c88a7e
Newline
pietern Feb 5, 2024
36666d8
Include PR link
pietern Feb 5, 2024
6b5fcb7
Undo
pietern Feb 5, 2024
eb0b6a2
Ensure every variable reference is passed to lookup function
pietern Feb 6, 2024
49b9681
Add test for variable reference resolution
pietern Feb 6, 2024
ac07608
Interpolate correct Terraform resource references
pietern Feb 6, 2024
98f8344
.
pietern Feb 6, 2024
44e7914
Use FromSlash for Windows compat
pietern Feb 6, 2024
4f2c288
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 6, 2024
f7b3253
Rewrite sync paths after selecting target
pietern Feb 6, 2024
5f85d59
Update relative path test to select a target
pietern Feb 6, 2024
7bf5abf
Empty struct should yield empty map in `convert.FromTyped`
pietern Feb 7, 2024
9b60240
Zero destination struct in `convert.ToTyped`
pietern Feb 7, 2024
e330189
Merge branch 'dyn-empty-struct' into bundle-use-dyn
pietern Feb 7, 2024
879959a
Merge branch 'dyn-clear-to-typed' into bundle-use-dyn
pietern Feb 7, 2024
d5c710f
Fix integration test
pietern Feb 7, 2024
f97fd5f
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 7, 2024
3cd824a
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 8, 2024
4406361
Omitempty for Git fields
pietern Feb 8, 2024
061d57b
Use allowlist for Git-related fields to include in metadata
pietern Feb 8, 2024
61bc57e
Merge branch 'metadata-skip-git-fields' into bundle-use-dyn
pietern Feb 8, 2024
245b481
Clean up
pietern Feb 8, 2024
978f313
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 8, 2024
7154f36
Eliminate panics
pietern Feb 8, 2024
1c1fc57
Hide DynamicValue from output
pietern Feb 8, 2024
36646e8
Remove imdario/mergo from NOTICE
pietern Feb 8, 2024
d1f558f
Retain partially valid structs in `convert.Normalize`
pietern Feb 13, 2024
160c371
Merge branch 'dyn-retain-invalid-structs' into bundle-use-dyn
pietern Feb 13, 2024
727beca
Add debug logging of configuration diagnostics on validate
pietern Feb 13, 2024
938423f
Wrap config mutations in bundle.ApplyFunc calls
pietern Feb 13, 2024
8738ad6
Rename
pietern Feb 13, 2024
1a45a8c
Rename
pietern Feb 13, 2024
be21195
Drop 'environments' key after rewrite
pietern Feb 13, 2024
0c47f4d
Move merge mutators to initialize phase
pietern Feb 13, 2024
f8e701d
Include merge mutators in test helper
pietern Feb 13, 2024
b72c75d
Rename
pietern Feb 14, 2024
60bd1ec
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 14, 2024
0d59f4f
Wrap profile setter in bundle.ApplyFunc call
pietern Feb 14, 2024
2fd8f7e
Add option to include fields present in the type but not in the value
pietern Feb 15, 2024
e6fc04f
Merge branch 'dyn-normalize-missing-fields' into bundle-use-dyn
pietern Feb 15, 2024
8774a96
Skip instead of panic
pietern Feb 15, 2024
c7ab94b
Merge branch 'dyn-normalize-missing-fields' into bundle-use-dyn
pietern Feb 15, 2024
c2cd815
Enable variable lookup of fields present in the type but not in the d…
pietern Feb 15, 2024
6495c10
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 15, 2024
3521d02
Adapt updated origin/main
pietern Feb 15, 2024
dcc4990
Avoid infinite recursion when normalizing a recursive type
pietern Feb 15, 2024
22f8a8e
Merge branch 'dyn-normalize-recursion' into bundle-use-dyn
pietern Feb 15, 2024
9d17138
Add coverage in Terraform interpolation test
pietern Feb 16, 2024
184907c
Fix issue where interpolating a new ref would rewrite unrelated fields
pietern Feb 16, 2024
2fa4e11
Merge branch 'dynvar-bug' into bundle-use-dyn
pietern Feb 16, 2024
b740ec7
Fix issue where interpolating a new ref would rewrite unrelated fields
pietern Feb 16, 2024
4e5605f
Merge branch 'dynvar-bug' into bundle-use-dyn
pietern Feb 16, 2024
89961be
Merge remote-tracking branch 'origin/main' into bundle-use-dyn
pietern Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ google/uuid - https://github.com/google/uuid
Copyright (c) 2009,2014 Google Inc. All rights reserved.
License - https://github.com/google/uuid/blob/master/LICENSE

imdario/mergo - https://github.com/imdario/mergo
Copyright (c) 2013 Dario Castañé. All rights reserved.
Copyright (c) 2012 The Go Authors. All rights reserved.
License - https://github.com/imdario/mergo/blob/master/LICENSE

manifoldco/promptui - https://github.com/manifoldco/promptui
Copyright (c) 2017, Arigato Machine Inc. All rights reserved.
License - https://github.com/manifoldco/promptui/blob/master/LICENSE.md
Expand Down
4 changes: 2 additions & 2 deletions bundle/config/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

type Artifacts map[string]*Artifact

func (artifacts Artifacts) SetConfigFilePath(path string) {
func (artifacts Artifacts) ConfigureConfigFilePath() {
for _, artifact := range artifacts {
artifact.ConfigFilePath = path
artifact.ConfigureConfigFilePath()
}
}

Expand Down
4 changes: 2 additions & 2 deletions bundle/config/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type Git struct {
BundleRootPath string `json:"bundle_root_path,omitempty" bundle:"readonly"`

// Inferred is set to true if the Git details were inferred and weren't set explicitly
Inferred bool `json:"-" bundle:"readonly"`
Inferred bool `json:"inferred,omitempty" bundle:"readonly"`

// The actual branch according to Git (may be different from the configured branch)
ActualBranch string `json:"-" bundle:"readonly"`
ActualBranch string `json:"actual_branch,omitempty" bundle:"readonly"`
}
254 changes: 0 additions & 254 deletions bundle/config/interpolation/interpolation.go

This file was deleted.

Loading
Loading