Skip to content

Commit

Permalink
Merge pull request #913 from gofr-dev/release/v1.16.1
Browse files Browse the repository at this point in the history
Release v1.16.1
  • Loading branch information
srijan-27 authored Aug 6, 2024
2 parents a51f573 + d2b9038 commit cb21d5b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/gofr/gofr.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,11 @@ func (a *App) initTracer() {
}

func isValidConfig(logger logging.Logger, name, url, host, port string) bool {
if url == "" && name == "" {
logger.Debug("tracing is disabled, as configs are not provided")
return false
}

if url != "" && name == "" {
logger.Error("missing TRACE_EXPORTER config, should be provided with TRACER_URL to enable tracing")
return false
Expand Down
1 change: 1 addition & 0 deletions pkg/gofr/gofr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ func Test_initTracer(t *testing.T) {
config config.Config
expectedLogMessage string
}{
{"tracing disabled", config.NewMockConfig(nil), "tracing is disabled"},
{"zipkin exporter", mockConfig1, "Exporting traces to zipkin at http://localhost:2005/api/v2/spans"},
{"zipkin exporter with authkey", mockConfig2, "Exporting traces to zipkin at http://localhost:2005/api/v2/spans"},
{"jaeger exporter", mockConfig3, "Exporting traces to jaeger at localhost:4317"},
Expand Down
1 change: 1 addition & 0 deletions pkg/gofr/migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func Run(migrationsMap map[int64]Migrate, c *container.Container) {
sortkeys.Int64s(keys)

ds, mg, ok := getMigrator(c)
ds.Logger = c.Logger

// Returning with an error log as migration would eventually fail as No databases are initialized.
// Pub/Sub is considered as initialized if its configurations are given.
Expand Down
3 changes: 3 additions & 0 deletions pkg/gofr/migration/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ func TestMigrationRunClickhouseSuccess(t *testing.T) {
return err
}

d.Logger.Infof("Clickhouse Migration Ran Successfully")

return nil
}},
}
Expand All @@ -97,6 +99,7 @@ func TestMigrationRunClickhouseSuccess(t *testing.T) {
})

assert.Contains(t, logs, "Migration 1 ran successfully")
assert.Contains(t, logs, "Clickhouse Migration Ran Successfully")
}

func TestMigrationRunClickhouseMigrationFailure(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/gofr/version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package version

const Framework = "v1.16.0"
const Framework = "v1.16.1"

0 comments on commit cb21d5b

Please sign in to comment.