From 93da1a1938d18b10a7ce320b597443f927d9fe3f Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Wed, 15 May 2024 09:44:22 -0400 Subject: [PATCH 1/9] chore: update changelog for release Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com> --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44cb58397e..d9ecf8b731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,24 @@ This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.42.0](https://github.com/flipt-io/flipt/releases/tag/v1.42.0) - 2024-05-15 + +### Added + +- logout redirect to cloud issuer (#3082) +- add banner about cloud offering (#3077) +- Cloud support (#2998) + +### Changed + +- `integration`: add failing case for rules with no distributions (#3078) + +### Fixed + +- nightly and snapshot builds (mage) (#3084) +- `storage`: make OCI reauthentication with AWS ECR (#3044) +- `migrations`: change the order of queries for mysql (#3039) + ## [v1.41.2](https://github.com/flipt-io/flipt/releases/tag/v1.41.2) - 2024-05-14 ### Fixed From 5ac6a4f16e8ac9d0eb931486b06fbddc62857d0d Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Wed, 15 May 2024 09:45:16 -0400 Subject: [PATCH 2/9] chore: rm already fixed issue in changelog Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com> --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ecf8b731..d7d4cfe307 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - nightly and snapshot builds (mage) (#3084) -- `storage`: make OCI reauthentication with AWS ECR (#3044) - `migrations`: change the order of queries for mysql (#3039) ## [v1.41.2](https://github.com/flipt-io/flipt/releases/tag/v1.41.2) - 2024-05-14 From 26ff952b0b2883d19d508c1b1e259622385d3f0f Mon Sep 17 00:00:00 2001 From: George MacRorie Date: Tue, 21 May 2024 10:37:58 +0100 Subject: [PATCH 3/9] chore: update go work sum Signed-off-by: George MacRorie --- go.work.sum | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/go.work.sum b/go.work.sum index a93618c678..b136ec9766 100644 --- a/go.work.sum +++ b/go.work.sum @@ -35,6 +35,8 @@ cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/ cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= +cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= +cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/contactcenterinsights v1.13.0/go.mod h1:ieq5d5EtHsu8vhe2y3amtZ+BE+AQwX5qAy7cpo0POsI= cloud.google.com/go/container v1.33.0/go.mod h1:u5QBBv/V9dVNK/NtTppCf6T4P8gzp+dQSwx2DqPnAKc= @@ -297,6 +299,7 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50/go.mod h1:5e1+Vvlzido69INQaVO6d87Qn543Xr6nooe9Kz7oBFM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -1270,8 +1273,6 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1358,6 +1359,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go. google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c/go.mod h1:VQW3tUculP/D4B+xVCo+VgSq8As6wA9ZjHl//pmk+6s= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:vh/N7795ftP0AkN1w8XKqN4w1OdUKXW5Eummda+ofv8= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240311132316-a219d84964c2/go.mod h1:vh/N7795ftP0AkN1w8XKqN4w1OdUKXW5Eummda+ofv8= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= @@ -1375,6 +1377,7 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240311132316-a219d84964c2/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240415141817-7cd4c1c1f9ec/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -1395,6 +1398,7 @@ google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFL google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= From b36e3f14e740f57594a68f846ada11ecdaae41a2 Mon Sep 17 00:00:00 2001 From: George MacRorie Date: Tue, 21 May 2024 10:38:36 +0100 Subject: [PATCH 4/9] perf(fs/git): only fetch known or newly requested references Signed-off-by: George MacRorie --- internal/storage/fs/git/store.go | 32 +++++++++---- internal/storage/fs/git/store_test.go | 68 ++++++++++++++++++++++----- 2 files changed, 78 insertions(+), 22 deletions(-) diff --git a/internal/storage/fs/git/store.go b/internal/storage/fs/git/store.go index 72289b3749..88d9ced70b 100644 --- a/internal/storage/fs/git/store.go +++ b/internal/storage/fs/git/store.go @@ -3,7 +3,9 @@ package git import ( "context" "errors" + "fmt" "io/fs" + "slices" "sync" "github.com/go-git/go-git/v5" @@ -136,7 +138,7 @@ func NewSnapshotStore(ctx context.Context, logger *zap.Logger, url string, opts } // do an initial fetch to setup remote tracking branches - if _, err := store.fetch(ctx); err != nil { + if _, err := store.fetch(ctx, store.snaps.References()); err != nil { return nil, err } @@ -180,8 +182,13 @@ func (s *SnapshotStore) View(ctx context.Context, storeRef storage.Reference, fn return fn(snap) } + refs := s.snaps.References() + if !slices.Contains(refs, ref) { + refs = append(refs, ref) + } + // force attempt a fetch to get the latest references - if _, err := s.fetch(ctx); err != nil { + if _, err := s.fetch(ctx, refs); err != nil { return err } @@ -202,7 +209,7 @@ func (s *SnapshotStore) View(ctx context.Context, storeRef storage.Reference, fn // HEAD updates to a new revision, it builds a snapshot and updates it // on the store. func (s *SnapshotStore) update(ctx context.Context) (bool, error) { - if updated, err := s.fetch(ctx); !(err == nil && updated) { + if updated, err := s.fetch(ctx, s.snaps.References()); !(err == nil && updated) { // either nothing updated or err != nil return updated, err } @@ -223,16 +230,23 @@ func (s *SnapshotStore) update(ctx context.Context) (bool, error) { return true, errors.Join(errs...) } -func (s *SnapshotStore) fetch(ctx context.Context) (bool, error) { +func (s *SnapshotStore) fetch(ctx context.Context, heads []string) (bool, error) { s.mu.Lock() defer s.mu.Unlock() + refSpecs := []config.RefSpec{ + "+refs/tags/*:refs/tags/*", + } + + for _, head := range heads { + refSpecs = append(refSpecs, + config.RefSpec(fmt.Sprintf("+refs/heads/%[1]s:refs/heads/%[1]s", head)), + ) + } + if err := s.repo.FetchContext(ctx, &git.FetchOptions{ - Auth: s.auth, - RefSpecs: []config.RefSpec{ - "+refs/heads/*:refs/heads/*", - "+refs/tags/*:refs/tags/*", - }, + Auth: s.auth, + RefSpecs: refSpecs, }); err != nil { if !errors.Is(err, git.NoErrAlreadyUpToDate) { return false, err diff --git a/internal/storage/fs/git/store_test.go b/internal/storage/fs/git/store_test.go index b03df90d57..8758371f10 100644 --- a/internal/storage/fs/git/store_test.go +++ b/internal/storage/fs/git/store_test.go @@ -172,7 +172,7 @@ flags: require.NoError(t, fi.Close()) // commit changes - _, err = tree.Commit("chore: update features.yml", &git.CommitOptions{ + _, err = tree.Commit("chore: update features.yml add foo and bar", &git.CommitOptions{ All: true, Author: &object.Signature{Email: "dev@flipt.io", Name: "dev"}, }) @@ -185,18 +185,6 @@ flags: RefSpecs: []config.RefSpec{"refs/heads/new-branch:refs/heads/new-branch"}, })) - // wait until the snapshot is updated or - // we timeout - select { - case <-ch: - case <-time.After(time.Minute): - t.Fatal("timed out waiting for snapshot") - } - - require.NoError(t, err) - - t.Log("received new snapshot") - require.NoError(t, store.View(ctx, "", func(s storage.ReadOnlyStore) error { _, err := s.GetFlag(ctx, storage.NewResource("production", "bar")) require.Error(t, err, "flag should not be found in default revision") @@ -209,11 +197,65 @@ flags: return nil })) + // should be able to fetch flag from previously unfetched reference require.NoError(t, store.View(ctx, "new-branch", func(s storage.ReadOnlyStore) error { _, err := s.GetFlag(ctx, storage.NewResource("production", "bar")) require.NoError(t, err, "flag should be present on new-branch") return nil })) + + // flag bar should not yet be present + require.NoError(t, store.View(ctx, "new-branch", func(s storage.ReadOnlyStore) error { + _, err := s.GetFlag(ctx, storage.NewResource("production", "baz")) + require.Error(t, err, "flag should not be found in explicitly named new-branch revision") + return nil + })) + + // update features.yml, now with the bar flag + fi, err = workdir.OpenFile("features.yml", os.O_TRUNC|os.O_RDWR, os.ModePerm) + require.NoError(t, err) + + updated = []byte(`namespace: production +flags: + - key: foo + name: Foo + - key: bar + name: Bar + - key: baz + name: Baz`) + + _, err = fi.Write(updated) + require.NoError(t, err) + require.NoError(t, fi.Close()) + + // commit changes + _, err = tree.Commit("chore: update features.yml add baz", &git.CommitOptions{ + All: true, + Author: &object.Signature{Email: "dev@flipt.io", Name: "dev"}, + }) + require.NoError(t, err) + + // push new commit + require.NoError(t, repo.Push(&git.PushOptions{ + Auth: &http.BasicAuth{Username: "root", Password: "password"}, + RemoteName: "origin", + RefSpecs: []config.RefSpec{"refs/heads/new-branch:refs/heads/new-branch"}, + })) + + // we should expect to see a modified event now because + // the new reference should be tracked + select { + case <-ch: + case <-time.After(time.Minute): + t.Fatal("timed out waiting for fetch") + } + + // should be able to fetch flag bar now that it has been pushed + require.NoError(t, store.View(ctx, "new-branch", func(s storage.ReadOnlyStore) error { + _, err := s.GetFlag(ctx, storage.NewResource("production", "baz")) + require.NoError(t, err, "flag should be present on new-branch") + return nil + })) } func Test_Store_View_WithSemverRevision(t *testing.T) { From 421d20599e4e11a9a0e22559ed99817fac3c3365 Mon Sep 17 00:00:00 2001 From: George MacRorie Date: Tue, 21 May 2024 12:35:11 +0100 Subject: [PATCH 5/9] perf(fs/git): fetch single branch only Signed-off-by: George MacRorie --- .../storage/fs/git/reference_resolvers.go | 12 +-- .../fs/git/reference_resolvers_test.go | 10 +-- internal/storage/fs/git/store.go | 86 ++++++++++++++----- internal/storage/fs/git/store_test.go | 2 +- internal/storage/fs/store/store.go | 11 ++- 5 files changed, 82 insertions(+), 39 deletions(-) diff --git a/internal/storage/fs/git/reference_resolvers.go b/internal/storage/fs/git/reference_resolvers.go index c9580316a3..68f1107014 100644 --- a/internal/storage/fs/git/reference_resolvers.go +++ b/internal/storage/fs/git/reference_resolvers.go @@ -8,11 +8,11 @@ import ( "github.com/go-git/go-git/v5/plumbing" ) -// ReferenceResolver is a function type used to describe reference resolver functions. -type ReferenceResolver func(repo *git.Repository, ref string) (plumbing.Hash, error) +// referenceResolver is a function type used to describe reference resolver functions. +type referenceResolver func(repo *git.Repository, ref string) (plumbing.Hash, error) -// StaticResolver is a resolver which just resolve static references. -func StaticResolver() ReferenceResolver { +// staticResolver is a resolver which just resolve static references. +func staticResolver() referenceResolver { return func(repo *git.Repository, ref string) (plumbing.Hash, error) { if plumbing.IsHash(ref) { return plumbing.NewHash(ref), nil @@ -27,8 +27,8 @@ func StaticResolver() ReferenceResolver { } } -// SemverResolver is a resolver which resolver semantic versioning references for tags. -func SemverResolver() ReferenceResolver { +// semverResolver is a resolver which resolver semantic versioning references for tags. +func semverResolver() referenceResolver { return func(repo *git.Repository, ref string) (plumbing.Hash, error) { constraint, err := semver.NewConstraint(ref) if err != nil { diff --git a/internal/storage/fs/git/reference_resolvers_test.go b/internal/storage/fs/git/reference_resolvers_test.go index bebf0d222e..07cb83bf4d 100644 --- a/internal/storage/fs/git/reference_resolvers_test.go +++ b/internal/storage/fs/git/reference_resolvers_test.go @@ -17,7 +17,7 @@ import ( func TestStaticResolver(t *testing.T) { t.Run("should resolve static references correctly", func(t *testing.T) { repo := newGitRepo(t) - resolver := StaticResolver() + resolver := staticResolver() commitHash := repo.createCommit(t) resolvedHash, err := resolver(repo.repo, "main") @@ -38,7 +38,7 @@ func TestStaticResolver(t *testing.T) { func TestSemverResolver(t *testing.T) { t.Run("should resolve semver tags correctly when the reference is a constraint", func(t *testing.T) { repo := newGitRepo(t) - resolver := SemverResolver() + resolver := semverResolver() constraint := "v0.1.*" commitHash := repo.createCommit(t) @@ -61,7 +61,7 @@ func TestSemverResolver(t *testing.T) { t.Run("should resolve semver tags correctly when the reference is not a constraint", func(t *testing.T) { repo := newGitRepo(t) - resolver := SemverResolver() + resolver := semverResolver() commitHash := repo.createCommit(t) repo.createTag(t, "v0.1.0", commitHash) @@ -74,7 +74,7 @@ func TestSemverResolver(t *testing.T) { t.Run("should resolve semver tags correctly when there is non compliant semver tags", func(t *testing.T) { repo := newGitRepo(t) - resolver := SemverResolver() + resolver := semverResolver() commitHash := repo.createCommit(t) repo.createTag(t, "non-semver-tag", commitHash) @@ -90,7 +90,7 @@ func TestSemverResolver(t *testing.T) { t.Run("should return an error when no matching tag was found", func(t *testing.T) { repo := newGitRepo(t) - resolver := SemverResolver() + resolver := semverResolver() commitHash := repo.createCommit(t) repo.createTag(t, "v0.1.0", commitHash) diff --git a/internal/storage/fs/git/store.go b/internal/storage/fs/git/store.go index 88d9ced70b..a8f2a67175 100644 --- a/internal/storage/fs/git/store.go +++ b/internal/storage/fs/git/store.go @@ -37,7 +37,8 @@ type SnapshotStore struct { logger *zap.Logger url string baseRef string - referenceResolver ReferenceResolver + refTypeTag bool + referenceResolver referenceResolver directory string auth transport.AuthMethod insecureSkipTLS bool @@ -60,10 +61,11 @@ func WithRef(ref string) containers.Option[SnapshotStore] { } } -// WithRefResolver configures how the reference will be resolved for the repository. -func WithRefResolver(resolver ReferenceResolver) containers.Option[SnapshotStore] { +// WithSemverResolver configures how the reference will be resolved for the repository. +func WithSemverResolver() containers.Option[SnapshotStore] { return func(s *SnapshotStore) { - s.referenceResolver = resolver + s.refTypeTag = true + s.referenceResolver = semverResolver() } } @@ -116,7 +118,7 @@ func NewSnapshotStore(ctx context.Context, logger *zap.Logger, url string, opts logger: logger.With(zap.String("repository", url)), url: url, baseRef: "main", - referenceResolver: StaticResolver(), + referenceResolver: staticResolver(), } containers.ApplyAll(store, opts...) @@ -127,19 +129,58 @@ func NewSnapshotStore(ctx context.Context, logger *zap.Logger, url string, opts return nil, err } - store.repo, err = git.Clone(memory.NewStorage(), nil, &git.CloneOptions{ - Auth: store.auth, - URL: store.url, - CABundle: store.caBundle, - InsecureSkipTLS: store.insecureSkipTLS, - }) - if err != nil { - return nil, err - } + if !plumbing.IsHash(store.baseRef) { + // if the base ref is not an explicit SHA then + // attempt to clone either the explicit branch + // or all references for tag based semver + cloneOpts := &git.CloneOptions{ + Auth: store.auth, + URL: store.url, + CABundle: store.caBundle, + InsecureSkipTLS: store.insecureSkipTLS, + } - // do an initial fetch to setup remote tracking branches - if _, err := store.fetch(ctx, store.snaps.References()); err != nil { - return nil, err + // if our reference is a branch type then we can assume it exists + // and attempt to only clone from this branch initially + if !store.refTypeTag { + cloneOpts.ReferenceName = plumbing.NewBranchReferenceName(store.baseRef) + cloneOpts.SingleBranch = true + } + + store.repo, err = git.Clone(memory.NewStorage(), nil, cloneOpts) + if err != nil { + return nil, err + } + + // do an initial fetch to setup remote tracking branches + if _, err := store.fetch(ctx, store.snaps.References()); err != nil { + return nil, err + } + } else { + // fetch single reference + store.repo, err = git.InitWithOptions(memory.NewStorage(), nil, git.InitOptions{ + DefaultBranch: plumbing.Main, + }) + if err != nil { + return nil, err + } + + if _, err = store.repo.CreateRemote(&config.RemoteConfig{ + Name: "origin", + URLs: []string{store.url}, + }); err != nil { + return nil, err + } + + if err := store.repo.FetchContext(ctx, &git.FetchOptions{ + Auth: store.auth, + Depth: 1, + RefSpecs: []config.RefSpec{ + config.RefSpec(fmt.Sprintf("%[1]s:%[1]s", store.baseRef)), + }, + }); err != nil { + return nil, err + } } // fetch base ref snapshot at-least once before returning store @@ -234,8 +275,10 @@ func (s *SnapshotStore) fetch(ctx context.Context, heads []string) (bool, error) s.mu.Lock() defer s.mu.Unlock() - refSpecs := []config.RefSpec{ - "+refs/tags/*:refs/tags/*", + refSpecs := []config.RefSpec{} + + if s.refTypeTag { + refSpecs = append(refSpecs, "+refs/tags/*:refs/tags/*") } for _, head := range heads { @@ -245,8 +288,9 @@ func (s *SnapshotStore) fetch(ctx context.Context, heads []string) (bool, error) } if err := s.repo.FetchContext(ctx, &git.FetchOptions{ - Auth: s.auth, - RefSpecs: refSpecs, + Auth: s.auth, + RemoteURL: s.url, + RefSpecs: refSpecs, }); err != nil { if !errors.Is(err, git.NoErrAlreadyUpToDate) { return false, err diff --git a/internal/storage/fs/git/store_test.go b/internal/storage/fs/git/store_test.go index 8758371f10..d9e7cfdc2f 100644 --- a/internal/storage/fs/git/store_test.go +++ b/internal/storage/fs/git/store_test.go @@ -274,7 +274,7 @@ func Test_Store_View_WithSemverRevision(t *testing.T) { ch := make(chan struct{}) store, skip := testStore(t, gitRepoURL, WithRef("v0.1.*"), - WithRefResolver(SemverResolver()), + WithSemverResolver(), WithPollOptions( fs.WithInterval(time.Second), fs.WithNotify(t, func(modified bool) { diff --git a/internal/storage/fs/store/store.go b/internal/storage/fs/store/store.go index f76d6a1ed2..83cbc0583a 100644 --- a/internal/storage/fs/store/store.go +++ b/internal/storage/fs/store/store.go @@ -32,14 +32,9 @@ import ( func NewStore(ctx context.Context, logger *zap.Logger, cfg *config.Config) (_ storage.Store, err error) { switch cfg.Storage.Type { case config.GitStorageType: - refResolver := git.StaticResolver() - if cfg.Storage.Git.RefType == config.GitRefTypeSemver { - refResolver = git.SemverResolver() - } - opts := []containers.Option[git.SnapshotStore]{ git.WithRef(cfg.Storage.Git.Ref), - git.WithRefResolver(refResolver), + git.WithSemverResolver(), git.WithPollOptions( storagefs.WithInterval(cfg.Storage.Git.PollInterval), ), @@ -47,6 +42,10 @@ func NewStore(ctx context.Context, logger *zap.Logger, cfg *config.Config) (_ st git.WithDirectory(cfg.Storage.Git.Directory), } + if cfg.Storage.Git.RefType == config.GitRefTypeSemver { + opts = append(opts, git.WithSemverResolver()) + } + if cfg.Storage.Git.CaCertBytes != "" { opts = append(opts, git.WithCABundle([]byte(cfg.Storage.Git.CaCertBytes))) } else if cfg.Storage.Git.CaCertPath != "" { From d8a29e11b24c08f0a2a614ff14e588bc5bb838ff Mon Sep 17 00:00:00 2001 From: George MacRorie Date: Tue, 21 May 2024 12:47:26 +0100 Subject: [PATCH 6/9] fix(fs/git): rely on default original remote for fetch Signed-off-by: George MacRorie --- internal/storage/fs/git/store.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/storage/fs/git/store.go b/internal/storage/fs/git/store.go index a8f2a67175..075727bc5d 100644 --- a/internal/storage/fs/git/store.go +++ b/internal/storage/fs/git/store.go @@ -288,9 +288,8 @@ func (s *SnapshotStore) fetch(ctx context.Context, heads []string) (bool, error) } if err := s.repo.FetchContext(ctx, &git.FetchOptions{ - Auth: s.auth, - RemoteURL: s.url, - RefSpecs: refSpecs, + Auth: s.auth, + RefSpecs: refSpecs, }); err != nil { if !errors.Is(err, git.NoErrAlreadyUpToDate) { return false, err From e1cff0f4cd8a0a84b3e0e8b9b8c2cb9384036484 Mon Sep 17 00:00:00 2001 From: George MacRorie Date: Tue, 21 May 2024 13:56:53 +0100 Subject: [PATCH 7/9] fix(fs/git): remove accidental WithSemverResolver in fs.NewStore Signed-off-by: George MacRorie --- internal/storage/fs/git/store.go | 12 +++++++----- internal/storage/fs/store/store.go | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/storage/fs/git/store.go b/internal/storage/fs/git/store.go index 075727bc5d..eeb729cfe2 100644 --- a/internal/storage/fs/git/store.go +++ b/internal/storage/fs/git/store.go @@ -149,12 +149,12 @@ func NewSnapshotStore(ctx context.Context, logger *zap.Logger, url string, opts store.repo, err = git.Clone(memory.NewStorage(), nil, cloneOpts) if err != nil { - return nil, err + return nil, fmt.Errorf("performing initial clone: %w", err) } // do an initial fetch to setup remote tracking branches - if _, err := store.fetch(ctx, store.snaps.References()); err != nil { - return nil, err + if _, err := store.fetch(ctx, []string{store.baseRef}); err != nil { + return nil, fmt.Errorf("performing initial fetch: %w", err) } } else { // fetch single reference @@ -173,8 +173,10 @@ func NewSnapshotStore(ctx context.Context, logger *zap.Logger, url string, opts } if err := store.repo.FetchContext(ctx, &git.FetchOptions{ - Auth: store.auth, - Depth: 1, + Auth: store.auth, + CABundle: store.caBundle, + InsecureSkipTLS: store.insecureSkipTLS, + Depth: 1, RefSpecs: []config.RefSpec{ config.RefSpec(fmt.Sprintf("%[1]s:%[1]s", store.baseRef)), }, diff --git a/internal/storage/fs/store/store.go b/internal/storage/fs/store/store.go index 83cbc0583a..edcb86ce0a 100644 --- a/internal/storage/fs/store/store.go +++ b/internal/storage/fs/store/store.go @@ -34,7 +34,6 @@ func NewStore(ctx context.Context, logger *zap.Logger, cfg *config.Config) (_ st case config.GitStorageType: opts := []containers.Option[git.SnapshotStore]{ git.WithRef(cfg.Storage.Git.Ref), - git.WithSemverResolver(), git.WithPollOptions( storagefs.WithInterval(cfg.Storage.Git.PollInterval), ), From bdcb8a14e2237acd7e7093f37a7044fc05ed2b70 Mon Sep 17 00:00:00 2001 From: George MacRorie Date: Tue, 21 May 2024 16:58:44 +0100 Subject: [PATCH 8/9] chore: update changelog for v1.42.1 Signed-off-by: George MacRorie --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7d4cfe307..a770ef59f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.42.1](https://github.com/flipt-io/flipt/releases/tag/v1.42.1) - 2024-05-21 + +### Changed + +- Optimized the Git backend to only fetch explicitly required references (#3100) + ## [v1.42.0](https://github.com/flipt-io/flipt/releases/tag/v1.42.0) - 2024-05-15 ### Added From 68ea081510736d5c55c4046fa75cc600fb4317b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 15:08:07 -0400 Subject: [PATCH 9/9] chore(deps-dev): bump @babel/preset-typescript in /ui (#3088) Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.23.3 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- ui/package-lock.json | 234 +++++++++++++++++++++---------------------- ui/package.json | 2 +- 2 files changed, 118 insertions(+), 118 deletions(-) diff --git a/ui/package-lock.json b/ui/package-lock.json index 02e6880863..dcea9e9cc3 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -46,7 +46,7 @@ "yup": "^1.4.0" }, "devDependencies": { - "@babel/preset-typescript": "^7.23.3", + "@babel/preset-typescript": "^7.24.1", "@playwright/test": "^1.44.0", "@tailwindcss/forms": "^0.5.7", "@types/jest": "^29.5.12", @@ -278,19 +278,19 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.6.tgz", - "integrity": "sha512-cBXU1vZni/CpGF29iTu4YRbOZt3Wat6zCoMDxRF1MayiEc4URxOj31tT65HUM0CRpMowA3HCJaAOVOUnMf96cw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.5.tgz", + "integrity": "sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.24.5", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", + "@babel/helper-replace-supers": "^7.24.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-split-export-declaration": "^7.24.5", "semver": "^6.3.1" }, "engines": { @@ -380,12 +380,12 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", - "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.5.tgz", + "integrity": "sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA==", "dev": true, "dependencies": { - "@babel/types": "^7.23.0" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -435,9 +435,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -462,13 +462,13 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", - "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", + "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-member-expression-to-functions": "^7.23.0", "@babel/helper-optimise-call-expression": "^7.22.5" }, "engines": { @@ -503,30 +503,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1041,12 +1041,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", - "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", + "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1158,12 +1158,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", - "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", + "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1430,13 +1430,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz", - "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz", + "integrity": "sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==", "dev": true, "dependencies": { "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-simple-access": "^7.22.5" }, "engines": { @@ -1780,15 +1780,15 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz", - "integrity": "sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.5.tgz", + "integrity": "sha512-E0VWu/hk83BIFUWnsKZ4D81KXjN5L3MobvevOHErASk9IPwKHOkTgvqzvNo1yP/ePJWqqK2SpUR5z+KQbl6NVw==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.23.6", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-typescript": "^7.23.3" + "@babel/helper-create-class-features-plugin": "^7.24.5", + "@babel/helper-plugin-utils": "^7.24.5", + "@babel/plugin-syntax-typescript": "^7.24.1" }, "engines": { "node": ">=6.9.0" @@ -1954,16 +1954,16 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz", - "integrity": "sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.24.1.tgz", + "integrity": "sha512-1DBaMmRDpuYQBPWD8Pf/WEwCrtgRHxsZnP4mIy9G/X+hFfbI47Q2G4t1Paakld84+qsk2fSsUPMKg71jkoOOaQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", - "@babel/plugin-syntax-jsx": "^7.23.3", - "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-typescript": "^7.23.3" + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-validator-option": "^7.23.5", + "@babel/plugin-syntax-jsx": "^7.24.1", + "@babel/plugin-transform-modules-commonjs": "^7.24.1", + "@babel/plugin-transform-typescript": "^7.24.1" }, "engines": { "node": ">=6.9.0" @@ -2025,13 +2025,13 @@ } }, "node_modules/@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -14013,19 +14013,19 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.6.tgz", - "integrity": "sha512-cBXU1vZni/CpGF29iTu4YRbOZt3Wat6zCoMDxRF1MayiEc4URxOj31tT65HUM0CRpMowA3HCJaAOVOUnMf96cw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.5.tgz", + "integrity": "sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.24.5", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.20", + "@babel/helper-replace-supers": "^7.24.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-split-export-declaration": "^7.24.5", "semver": "^6.3.1" } }, @@ -14088,12 +14088,12 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", - "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.5.tgz", + "integrity": "sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA==", "dev": true, "requires": { - "@babel/types": "^7.23.0" + "@babel/types": "^7.24.5" } }, "@babel/helper-module-imports": { @@ -14128,9 +14128,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true }, "@babel/helper-remap-async-to-generator": { @@ -14146,13 +14146,13 @@ } }, "@babel/helper-replace-supers": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", - "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", + "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-member-expression-to-functions": "^7.23.0", "@babel/helper-optimise-call-expression": "^7.22.5" } }, @@ -14175,24 +14175,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "requires": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" } }, "@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true }, "@babel/helper-validator-option": { @@ -14533,12 +14533,12 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", - "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", + "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" } }, "@babel/plugin-syntax-logical-assignment-operators": { @@ -14614,12 +14614,12 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", - "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", + "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" } }, "@babel/plugin-transform-arrow-functions": { @@ -14784,13 +14784,13 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz", - "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz", + "integrity": "sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-simple-access": "^7.22.5" } }, @@ -15002,15 +15002,15 @@ } }, "@babel/plugin-transform-typescript": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz", - "integrity": "sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.5.tgz", + "integrity": "sha512-E0VWu/hk83BIFUWnsKZ4D81KXjN5L3MobvevOHErASk9IPwKHOkTgvqzvNo1yP/ePJWqqK2SpUR5z+KQbl6NVw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.23.6", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-typescript": "^7.23.3" + "@babel/helper-create-class-features-plugin": "^7.24.5", + "@babel/helper-plugin-utils": "^7.24.5", + "@babel/plugin-syntax-typescript": "^7.24.1" } }, "@babel/plugin-transform-unicode-escapes": { @@ -15143,16 +15143,16 @@ } }, "@babel/preset-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz", - "integrity": "sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.24.1.tgz", + "integrity": "sha512-1DBaMmRDpuYQBPWD8Pf/WEwCrtgRHxsZnP4mIy9G/X+hFfbI47Q2G4t1Paakld84+qsk2fSsUPMKg71jkoOOaQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", - "@babel/plugin-syntax-jsx": "^7.23.3", - "@babel/plugin-transform-modules-commonjs": "^7.23.3", - "@babel/plugin-transform-typescript": "^7.23.3" + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-validator-option": "^7.23.5", + "@babel/plugin-syntax-jsx": "^7.24.1", + "@babel/plugin-transform-modules-commonjs": "^7.24.1", + "@babel/plugin-transform-typescript": "^7.24.1" } }, "@babel/regjsgen": { @@ -15199,13 +15199,13 @@ } }, "@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" } }, diff --git a/ui/package.json b/ui/package.json index 2598973af5..f128b6d8c8 100644 --- a/ui/package.json +++ b/ui/package.json @@ -52,7 +52,7 @@ "yup": "^1.4.0" }, "devDependencies": { - "@babel/preset-typescript": "^7.23.3", + "@babel/preset-typescript": "^7.24.1", "@playwright/test": "^1.44.0", "@tailwindcss/forms": "^0.5.7", "@types/jest": "^29.5.12",