From fc4427ddd84b3ecf8b9c4ba04c52b3b4affa4478 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 20:31:45 +0000 Subject: [PATCH 1/5] chore: bump entgo.io/ent from 0.13.1 to 0.14.1 in /api Bumps [entgo.io/ent](https://github.com/ent/ent) from 0.13.1 to 0.14.1. - [Release notes](https://github.com/ent/ent/releases) - [Commits](https://github.com/ent/ent/compare/v0.13.1...v0.14.1) --- updated-dependencies: - dependency-name: entgo.io/ent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- api/go.mod | 5 ++--- api/go.sum | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/go.mod b/api/go.mod index acaa99e0bc..af46e539af 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,12 +1,11 @@ module github.com/chanzuckerberg/happy/api go 1.22.0 - -toolchain go1.22.10 +toolchain go1.23.5 require ( entgo.io/contrib v0.5.0 - entgo.io/ent v0.13.1 + entgo.io/ent v0.14.1 github.com/aws/aws-sdk-go-v2 v1.34.0 github.com/aws/aws-sdk-go-v2/config v1.18.44 github.com/blang/semver v3.5.1+incompatible diff --git a/api/go.sum b/api/go.sum index bf114f040b..7c0931a1ae 100644 --- a/api/go.sum +++ b/api/go.sum @@ -6,8 +6,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= entgo.io/contrib v0.5.0 h1:M4IqodImfUm327RDwNAITLNz3PsxVeC3rD4DPeVA8Gs= entgo.io/contrib v0.5.0/go.mod h1:q8dXQCmzqpSlVdT2bWDydjgznGcy3y4zmsYmVFC9V/U= -entgo.io/ent v0.13.1 h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE= -entgo.io/ent v0.13.1/go.mod h1:qCEmo+biw3ccBn9OyL4ZK5dfpwg++l1Gxwac5B1206A= +entgo.io/ent v0.14.1 h1:fUERL506Pqr92EPHJqr8EYxbPioflJo6PudkrEA8a/s= +entgo.io/ent v0.14.1/go.mod h1:MH6XLG0KXpkcDQhKiHfANZSzR55TJyPL5IGNpI8wpco= github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= From 2f5b68516949b6c78d9951a37fcb1d6d8072cc5e Mon Sep 17 00:00:00 2001 From: Alex Lokshin Date: Tue, 28 Jan 2025 17:15:47 -0500 Subject: [PATCH 2/5] Update go.mod --- api/go.mod | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/go.mod b/api/go.mod index e927cf8c23..76d89e72f7 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,6 +1,7 @@ module github.com/chanzuckerberg/happy/api -go 1.22.0 +go 1.23.0 + toolchain go1.23.5 require ( From 600d968dbb30842fbe894b4ab3190b390c5ce2bd Mon Sep 17 00:00:00 2001 From: alexlokshin-czi Date: Tue, 28 Jan 2025 22:44:19 +0000 Subject: [PATCH 3/5] ci - update ent schema --- api/pkg/ent/appconfig_query.go | 21 +++++++++++---------- api/pkg/ent/ent.go | 2 +- api/pkg/ent/runtime/runtime.go | 4 ++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/api/pkg/ent/appconfig_query.go b/api/pkg/ent/appconfig_query.go index 9dd97e9845..8a917ece68 100644 --- a/api/pkg/ent/appconfig_query.go +++ b/api/pkg/ent/appconfig_query.go @@ -7,6 +7,7 @@ import ( "fmt" "math" + "entgo.io/ent" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" @@ -60,7 +61,7 @@ func (acq *AppConfigQuery) Order(o ...appconfig.OrderOption) *AppConfigQuery { // First returns the first AppConfig entity from the query. // Returns a *NotFoundError when no AppConfig was found. func (acq *AppConfigQuery) First(ctx context.Context) (*AppConfig, error) { - nodes, err := acq.Limit(1).All(setContextOp(ctx, acq.ctx, "First")) + nodes, err := acq.Limit(1).All(setContextOp(ctx, acq.ctx, ent.OpQueryFirst)) if err != nil { return nil, err } @@ -83,7 +84,7 @@ func (acq *AppConfigQuery) FirstX(ctx context.Context) *AppConfig { // Returns a *NotFoundError when no AppConfig ID was found. func (acq *AppConfigQuery) FirstID(ctx context.Context) (id uint, err error) { var ids []uint - if ids, err = acq.Limit(1).IDs(setContextOp(ctx, acq.ctx, "FirstID")); err != nil { + if ids, err = acq.Limit(1).IDs(setContextOp(ctx, acq.ctx, ent.OpQueryFirstID)); err != nil { return } if len(ids) == 0 { @@ -106,7 +107,7 @@ func (acq *AppConfigQuery) FirstIDX(ctx context.Context) uint { // Returns a *NotSingularError when more than one AppConfig entity is found. // Returns a *NotFoundError when no AppConfig entities are found. func (acq *AppConfigQuery) Only(ctx context.Context) (*AppConfig, error) { - nodes, err := acq.Limit(2).All(setContextOp(ctx, acq.ctx, "Only")) + nodes, err := acq.Limit(2).All(setContextOp(ctx, acq.ctx, ent.OpQueryOnly)) if err != nil { return nil, err } @@ -134,7 +135,7 @@ func (acq *AppConfigQuery) OnlyX(ctx context.Context) *AppConfig { // Returns a *NotFoundError when no entities are found. func (acq *AppConfigQuery) OnlyID(ctx context.Context) (id uint, err error) { var ids []uint - if ids, err = acq.Limit(2).IDs(setContextOp(ctx, acq.ctx, "OnlyID")); err != nil { + if ids, err = acq.Limit(2).IDs(setContextOp(ctx, acq.ctx, ent.OpQueryOnlyID)); err != nil { return } switch len(ids) { @@ -159,7 +160,7 @@ func (acq *AppConfigQuery) OnlyIDX(ctx context.Context) uint { // All executes the query and returns a list of AppConfigs. func (acq *AppConfigQuery) All(ctx context.Context) ([]*AppConfig, error) { - ctx = setContextOp(ctx, acq.ctx, "All") + ctx = setContextOp(ctx, acq.ctx, ent.OpQueryAll) if err := acq.prepareQuery(ctx); err != nil { return nil, err } @@ -181,7 +182,7 @@ func (acq *AppConfigQuery) IDs(ctx context.Context) (ids []uint, err error) { if acq.ctx.Unique == nil && acq.path != nil { acq.Unique(true) } - ctx = setContextOp(ctx, acq.ctx, "IDs") + ctx = setContextOp(ctx, acq.ctx, ent.OpQueryIDs) if err = acq.Select(appconfig.FieldID).Scan(ctx, &ids); err != nil { return nil, err } @@ -199,7 +200,7 @@ func (acq *AppConfigQuery) IDsX(ctx context.Context) []uint { // Count returns the count of the given query. func (acq *AppConfigQuery) Count(ctx context.Context) (int, error) { - ctx = setContextOp(ctx, acq.ctx, "Count") + ctx = setContextOp(ctx, acq.ctx, ent.OpQueryCount) if err := acq.prepareQuery(ctx); err != nil { return 0, err } @@ -217,7 +218,7 @@ func (acq *AppConfigQuery) CountX(ctx context.Context) int { // Exist returns true if the query has elements in the graph. func (acq *AppConfigQuery) Exist(ctx context.Context) (bool, error) { - ctx = setContextOp(ctx, acq.ctx, "Exist") + ctx = setContextOp(ctx, acq.ctx, ent.OpQueryExist) switch _, err := acq.FirstID(ctx); { case IsNotFound(err): return false, nil @@ -449,7 +450,7 @@ func (acgb *AppConfigGroupBy) Aggregate(fns ...AggregateFunc) *AppConfigGroupBy // Scan applies the selector query and scans the result into the given value. func (acgb *AppConfigGroupBy) Scan(ctx context.Context, v any) error { - ctx = setContextOp(ctx, acgb.build.ctx, "GroupBy") + ctx = setContextOp(ctx, acgb.build.ctx, ent.OpQueryGroupBy) if err := acgb.build.prepareQuery(ctx); err != nil { return err } @@ -497,7 +498,7 @@ func (acs *AppConfigSelect) Aggregate(fns ...AggregateFunc) *AppConfigSelect { // Scan applies the selector query and scans the result into the given value. func (acs *AppConfigSelect) Scan(ctx context.Context, v any) error { - ctx = setContextOp(ctx, acs.ctx, "Select") + ctx = setContextOp(ctx, acs.ctx, ent.OpQuerySelect) if err := acs.prepareQuery(ctx); err != nil { return err } diff --git a/api/pkg/ent/ent.go b/api/pkg/ent/ent.go index 2b059e01e8..99e065a577 100644 --- a/api/pkg/ent/ent.go +++ b/api/pkg/ent/ent.go @@ -69,7 +69,7 @@ var ( columnCheck sql.ColumnCheck ) -// columnChecker checks if the column exists in the given table. +// checkColumn checks if the column exists in the given table. func checkColumn(table, column string) error { initCheck.Do(func() { columnCheck = sql.NewColumnCheck(map[string]func(string) bool{ diff --git a/api/pkg/ent/runtime/runtime.go b/api/pkg/ent/runtime/runtime.go index 0ce118f64a..5b9903cdb1 100644 --- a/api/pkg/ent/runtime/runtime.go +++ b/api/pkg/ent/runtime/runtime.go @@ -34,6 +34,6 @@ func init() { } const ( - Version = "v0.13.1" // Version of ent codegen. - Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen. + Version = "v0.14.1" // Version of ent codegen. + Sum = "h1:fUERL506Pqr92EPHJqr8EYxbPioflJo6PudkrEA8a/s=" // Sum of ent codegen. ) From 77f6cde64da8091c005a248f8a27da728f3b4f1d Mon Sep 17 00:00:00 2001 From: Alex Lokshin Date: Wed, 29 Jan 2025 14:21:47 -0500 Subject: [PATCH 4/5] bump --- docs/Gemfile | 4 ++- docs/Gemfile.lock | 77 ++++++++++++++++++++++++++++++++++++----------- 2 files changed, 63 insertions(+), 18 deletions(-) diff --git a/docs/Gemfile b/docs/Gemfile index 1dcb897f80..3b0a092130 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -34,4 +34,6 @@ gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] gem "webrick", "~> 1.8" -gem "just-the-docs", "~> 0.8.2" \ No newline at end of file +gem "just-the-docs", "~> 0.8.2" + +gem 'bundler', '~> 2.0' \ No newline at end of file diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index a0f2557ed3..0a261cf203 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,15 +1,24 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.1.7.10) - concurrent-ruby (~> 1.0, >= 1.0.2) + activesupport (8.0.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) base64 (0.2.0) + benchmark (0.4.0) + bigdecimal (3.1.9) coffee-script (2.4.1) coffee-script-source execjs @@ -17,9 +26,11 @@ GEM colorator (1.1.0) commonmarker (0.23.11) concurrent-ruby (1.3.5) + connection_pool (2.5.0) dnsruby (1.72.3) base64 (~> 0.2.0) simpleidn (~> 0.2.1) + drb (2.2.1) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) @@ -27,12 +38,20 @@ GEM ffi (>= 1.15.0) eventmachine (1.2.7) execjs (2.10.0) - faraday (2.8.1) - base64 - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) - faraday-net_http (3.0.2) - ffi (1.17.1) + faraday (2.12.2) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-net_http (3.4.0) + net-http (>= 0.5.0) + ffi (1.17.1-aarch64-linux-gnu) + ffi (1.17.1-aarch64-linux-musl) + ffi (1.17.1-arm-linux-gnu) + ffi (1.17.1-arm-linux-musl) + ffi (1.17.1-arm64-darwin) + ffi (1.17.1-x86_64-darwin) + ffi (1.17.1-x86_64-linux-gnu) + ffi (1.17.1-x86_64-linux-musl) forwardable-extended (2.6.0) gemoji (4.1.0) github-pages (231) @@ -200,6 +219,7 @@ GEM gemoji (>= 3, < 5) html-pipeline (~> 2.2) jekyll (>= 3.0, < 5.0) + json (2.9.1) just-the-docs (0.8.2) jekyll (>= 3.8.5) jekyll-include-cache @@ -213,15 +233,30 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.5) mercenary (0.3.6) - mini_portile2 (2.8.8) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) minitest (5.25.4) - nokogiri (1.13.10) - mini_portile2 (~> 2.8.0) + net-http (0.6.0) + uri + nokogiri (1.18.2-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.2-x86_64-linux-musl) racc (~> 1.4) octokit (4.25.1) faraday (>= 1, < 3) @@ -236,7 +271,6 @@ GEM ffi (~> 1.0) rexml (3.4.0) rouge (3.30.0) - ruby2_keywords (0.0.5) rubyzip (2.4.1) safe_yaml (1.0.5) sass (3.7.4) @@ -247,6 +281,7 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) + securerandom (0.4.1) simpleidn (0.2.3) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) @@ -255,13 +290,21 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (1.8.0) + uri (1.0.2) webrick (1.9.1) - zeitwerk (2.6.18) PLATFORMS - ruby + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES + bundler (~> 2.0) github-pages (~> 231) http_parser.rb (~> 0.6.0) jekyll-feed (~> 0.12) @@ -273,4 +316,4 @@ DEPENDENCIES webrick (~> 1.8) BUNDLED WITH - 1.17.2 + 2.6.3 From ab8f0de3347403b329234c6e11228f2620537230 Mon Sep 17 00:00:00 2001 From: alexlokshin-czi Date: Wed, 29 Jan 2025 19:24:32 +0000 Subject: [PATCH 5/5] ci - update ent schema --- api/go.sum | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/api/go.sum b/api/go.sum index c0e167d403..120b82ed4e 100644 --- a/api/go.sum +++ b/api/go.sum @@ -4,14 +4,10 @@ cirello.io/dynamolock/v2 v2.1.0 h1:e6LzkovE5gNZwswiApUj/LPkLRguXvxgpRi/IO9dl5o= cirello.io/dynamolock/v2 v2.1.0/go.mod h1:HG0kb97+cRxO9Ce+3brresQgLGSGKPbnNLnJJr4ieYo= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -entgo.io/contrib v0.5.0 h1:M4IqodImfUm327RDwNAITLNz3PsxVeC3rD4DPeVA8Gs= -entgo.io/contrib v0.5.0/go.mod h1:q8dXQCmzqpSlVdT2bWDydjgznGcy3y4zmsYmVFC9V/U= -entgo.io/ent v0.14.1 h1:fUERL506Pqr92EPHJqr8EYxbPioflJo6PudkrEA8a/s= -entgo.io/ent v0.14.1/go.mod h1:MH6XLG0KXpkcDQhKiHfANZSzR55TJyPL5IGNpI8wpco= entgo.io/contrib v0.6.0 h1:xfo4TbJE7sJZWx7BV7YrpSz7IPFvS8MzL3fnfzZjKvQ= entgo.io/contrib v0.6.0/go.mod h1:3qWIseJ/9Wx2Hu5zVh15FDzv7d/UvKNcYKdViywWCQg= -entgo.io/ent v0.13.2-0.20240717044502-34158f2c129b h1:kC+uzL8UFWwtXQ+yY0wUdvVUgPlJPGU3Fx1uttM8PJA= -entgo.io/ent v0.13.2-0.20240717044502-34158f2c129b/go.mod h1:qCEmo+biw3ccBn9OyL4ZK5dfpwg++l1Gxwac5B1206A= +entgo.io/ent v0.14.1 h1:fUERL506Pqr92EPHJqr8EYxbPioflJo6PudkrEA8a/s= +entgo.io/ent v0.14.1/go.mod h1:MH6XLG0KXpkcDQhKiHfANZSzR55TJyPL5IGNpI8wpco= github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=