github i-love-flamingo/flamingo v3.4.0

latest releases: v3.11.0, v3.10.1, v3.10.0...
22 months ago

Version v3.4.0 (2022-11-03)

Features

Fixes

  • framework/web: Avoid error log pollution, switch context cancelled log level to debug (#294) (c1d6dc8)
  • framework/flamingo/log: added nil check for StdLogger and Logger (f636b7e)
  • framework: Add missing scheme property to the router cue config (#274) (3ee35cd)
  • router: allow config for public endpoint (3f47d25)
  • framework/systemendpoint: use real port information in systemendpoint (4f59dc4)
  • framework/prefixrouter: use real port information in ServerStartEvent (79ae6f9)
  • servemodule: use real port information in ServerStartEvent (c5209de)
  • oauth: correctly map access-token claims (5a7331f)
  • auth: add missing auth.Identity interface (#216) (27b93c1)
  • deps: exclude unmaintained redigo (#218) (6061f4a)
  • fix missing gob register (0c48898)

Tests

  • internalauth: add unittests (#258) (46341b4)
  • requestlogger: add unittests (c8c1847)
  • framework/opencensus: add tests (932299a)

Ops and CI/CD

  • adjust gloangci-lint config for github actions (bbabfc0)
  • make "new-from-rev" work for golangci-lint (258a7b5)
  • remove now unnecessary steps from main pipeline (dc2df28)
  • fix git rev (84ebd56)
  • add golangci-lint to pipeline (bf3eaea)
  • semanticore: add semanticore (a741f30)

Documentation

Chores and tidying

  • deps: update module github.com/coreos/go-oidc/v3 to v3.4.0 (#293) (f5a791f)
  • deps: update module github.com/google/go-cmp to v0.5.9 (#282) (8d546ca)
  • deps: update module github.com/openzipkin/zipkin-go to v0.4.1 (#286) (bf432c9)
  • deps: update module github.com/stretchr/testify to v1.8.1 (#292) (56ddf82)
  • deps: update irongut/codecoveragesummary action to v1.3.0 (#278) (2399c75)
  • bump to go 1.19 (#279) (da07d03)
  • deps: update module github.com/stretchr/testify to v1.8.0 (#271) (c81b322)
  • deps: update module github.com/golang-jwt/jwt/v4 to v4.4.2 (#272) (7dd9288)
  • deps: update module github.com/stretchr/testify to v1.7.2 (#270) (fb27119)
  • deps: update module go.uber.org/automaxprocs to v1.5.1 (2b868ee)
  • deps: update module github.com/openzipkin/zipkin-go to v0.4.0 (38acb05)
  • deps: update module github.com/golang-jwt/jwt/v4 to v4.4.1 (daf8fd7)
  • deps: update module github.com/hashicorp/golang-lru to v0.5.4 (2b8bd64)
  • gomod: go mod tidy (3e91126)
  • deps: update module github.com/coreos/go-oidc/v3 to v3.2.0 (0e52661)
  • deps: update dependency quay.io/dexidp/dex to v2.28.1 (2643bd0)
  • deps: update module contrib.go.opencensus.io/exporter/prometheus to v0.4.1 (5bd0be1)
  • deps: update module github.com/stretchr/testify to v1.7.1 (d643c92)
  • deps: update module github.com/google/go-cmp to v0.5.8 (559dea5)
  • deps: update module contrib.go.opencensus.io/exporter/zipkin to v0.1.2 (1153345)
  • deps: update actions/setup-go action to v3 (3592ea0)
  • deps: update actions/checkout action to v3 (c9d2f12)
  • deps: update module github.com/go-redis/redis/v8 to v8.11.5 (2b6581a)
  • deps: update module contrib.go.opencensus.io/exporter/jaeger to v0.2.1 (f7285f0)
  • deps: update dependency quay.io/keycloak/keycloak to v8.0.2 (58f1a27)
  • deps: update golang.org/x/oauth2 digest to 9780585 (bb60190)
  • deps: update github.com/golang/groupcache digest to 41bb18b (68a4f7e)
  • Update renovate.json (ca2c97b)
  • deps: add renovate.json (e0edaf2)
  • bump go version to 1.17, replace golint with staticcheck (#222) (ae2b39e)
  • auth: switch to github.com/gofrs/uuid (1854abc)

Other

  • continue-on-error for coverage pr comment (#288) (21b26df)
  • framework/flamingo: replace redis session backend (#219) (8451ed0)
  • core/auth: update to recent go-oidc v3, allow oidc issuer URL override (#212) (8607648)
  • add comment to StateEntry (a8be5d7)
  • allow multiple parallel state responses (d7b30a0)

Important Notes

  • core/internalauth:
    • switched from github.com/dgrijalva/jwt-go to github.com/golang-jwt/jwt/v4. this is a drop-in replacement

      use search and replace to change the import path or add a replace statement to your go.mod:

      replace (
          github.com/dgrijalva/jwt-go v3.2.0+incompatible => github.com/golang-jwt/jwt/v4 v4.1.0
      )
      

      More details can be found here: https://github.com/golang-jwt/jwt/blob/main/MIGRATION_GUIDE.md

  • core/auth:
    • oauth.Identity includes Identity. This is a backwards-incompatible break

v3.2.0

  • license:
    • Flamingo now uses the MIT license. The CLA has been removed.
  • core/auth:
    • Flamingo v3.2.0 provides a new auth package which makes authentication easier and more canonical.
    • the old core/oauth is deprecated and provides a compatibility layer for core/auth.
  • sessions:
    • web.SessionStore provides programmatic access to web.Session
    • flamingo.session.saveMode allows to define a more granular session save behaviour
  • config loading:
    • both routes.yml and routes.yaml are now supported
  • framework/web:
    • the framework router got a couple of stability updates.
    • the web responder and responses don't fail anymore for uninitialized responses.
    • error responses are wrapped with a http error message
    • the flamingo.static.file controller needs a dir to not serve from root.
  • errors:
    • all errors are handled via Go's error package
  • go 1.13/1.14:
    • support for 1.12 has been dropped

v3

  • "locale" package:

    • the templatefunc __(key) is now returning a Label and instead additional parameters you need to use the label setters (see doc)
  • Deprecated Features are removed:

    • flamingo.me/dingo need to be used now
    • support for responder.*Aware types is removed
  • framework/web.Response is now framework/web.Result

  • web.Request is heavily condensed

    • Access to Params has changed
  • web.Session does not expose .GS() for the gorilla session anymore

  • event.Subscriber changes:

    • is getting context.Context as the first argument: Notify(ctx context.Context, e flamingo.Event)
    • event.Subscriber are registered via framework/flamingo.BindEventSubscriber(injector).To(...)
    • There is no SubscriberWithContext anymore!
  • several other Modules have been moved out of flamingo and exist as separate modules:

    • For all the stuff in this section: you may use the script docs/updates/v3/renameimports.sh for autoupdate the import paths in your project and to do some first replacements.

    • moved modules outside of flamingo:

      • flamingo/core/redirects
      • flamingo/core/pugtemplate
      • flamingo/core/form2
      • flamingo/core/form (removed)
      • flamingo/core/csrf
      • flamingo/core/csp
      • flamingo/core/captcha
    • restructures inside flamingo:

      • core/requestTask is renamed to core/requesttask
      • core/canonicalUrl is renamed to core/canonicalurl
      • core/cmd package moved to framework/cmd and the cmd have been moved to the packages they belong to
      • framework/router package merged into framework/web
      • framework/event package merged into framework/flamingo
      • framework/template package merged into framework/flamingo:
        • instead of template.BindFunc and template.BindCtxFunc you have to use flamingo.BindTemplateFunc
      • framework/session package merged into framework/flamingo:
        • instead of using the module session.Module use flamingo.SessionMdule
  • flamingo now uses go mod - we encourage to use it also in the projects:

    • Init the project
      go mod init YOURMODULEPATH
      
    • If you want to link the flamingo core to your project (because you are working on the core also)
      • Option 1:
        edit "go.mod" and add this lines (make sure to not commit them to git)
        replace (
          flamingo.me/flamingo/v3 => ../../PATHTOFLAMINGO
          flamingo.me/flamingo-commerce/v3 => ../../PATHTOFLAMINGO
        )
        
      • Option 2:
        use go mod vendor and link the modules after this from vendor folder
  • Prefixrouter configuration: rename prefixrouter.baseurl in flamingo.router.path

v2

  • web.Responder is now used
    • instead of injecting
       responder.JSONAware
       responder.RenderAware
       responder.RedirectAware
      
      in a controller you need to inject
      responder *web.Responder
      
      And use the Methods of the Responder:
      c.responder.Data() c.responder.Render() c.responder.Redirect()
  • dingo is moved out to flamingo.me/dingo and we recommend to use the Inject() methods instead of public properties.

What's Changed

  • allow multiple parallel state responses by @bastianccm in #209
  • Fix gob register OIDC state by @bastianccm in #210
  • add comment to StateEntry by @bastianccm in #211
  • core/auth: update to recent go-oidc v3, allow oidc issuer URL override by @carstendietrich in #212
  • fix(deps): exclude unmaintained redigo by @bastianccm in #218
  • framework/flamingo: replace redis session backend by @SchiffFlieger in #219
  • fix(auth): add missing auth.Identity interface by @bastianccm in #216
  • feat(oauth): add oauth identifier by @bastianccm in #220
  • fix(oauth): correctly map access-token claims by @bastianccm in #221
  • ci(semanticore): add semanticore by @bastianccm in #223
  • chore(auth): switch to github.com/gofrs/uuid by @SchiffFlieger in #226
  • feat(core/oauth): support issuer URL overriding by @tessig in #227
  • chore: bump go version to 1.17, replace golint with staticcheck by @bastianccm in #222
  • fix(framework): use real port for server start event by @SchiffFlieger in #229
  • fix(router): allow config for public endpoint by @bastianccm in #230
  • Configure Renovate by @renovate in #231
  • chore(deps): update github.com/golang/groupcache digest to 41bb18b by @renovate in #232
  • chore(deps): update golang.org/x/oauth2 digest to 9780585 by @renovate in #233
  • chore(deps): update dependency quay.io/keycloak/keycloak to v8.0.2 by @renovate in #235
  • chore(deps): update module contrib.go.opencensus.io/exporter/jaeger to v0.2.1 by @renovate in #236
  • chore(deps): update module github.com/go-redis/redis/v8 to v8.11.5 by @renovate in #239
  • chore(deps): update actions/checkout action to v3 by @renovate in #237
  • chore(deps): update actions/setup-go action to v3 by @renovate in #238
  • chore(deps): update module contrib.go.opencensus.io/exporter/zipkin to v0.1.2 by @renovate in #240
  • chore(deps): update module github.com/google/go-cmp to v0.5.8 by @renovate in #241
  • chore(deps): update module github.com/stretchr/testify to v1.7.1 by @renovate in #243
  • chore(deps): update module contrib.go.opencensus.io/exporter/prometheus to v0.4.1 by @renovate in #245
  • chore(deps): update dependency quay.io/dexidp/dex to v2.28.1 by @renovate in #244
  • chore(deps): update module github.com/coreos/go-oidc/v3 to v3.2.0 by @renovate in #247
  • test(requestlogger): add unittests by @bastianccm in #256
  • chore(gomod): go mod tidy by @bastianccm in #257
  • test(internalauth): add unittests by @bastianccm in #258
  • chore(deps): update module github.com/hashicorp/golang-lru to v0.5.4 by @renovate in #242
  • chore(deps): update module github.com/golang-jwt/jwt/v4 to v4.4.1 by @renovate in #248
  • chore(deps): update module github.com/openzipkin/zipkin-go to v0.4.0 by @renovate in #251
  • chore(deps): update module go.uber.org/automaxprocs to v1.5.1 by @renovate in #253
  • docs(flamingo): update logos by @bastianccm in #262
  • chore(deps): update module github.com/stretchr/testify to v1.7.2 by @renovate in #270
  • feat(auth): add session refresh interface by @bastianccm in #269
  • fix(framework): Add missing scheme property to the router cue config by @lifedraft in #274
  • chore(deps): update module github.com/golang-jwt/jwt/v4 to v4.4.2 by @renovate in #272
  • feat(framework/config): module dump command by @IvanMaidurov in #273
  • chore(deps): update module github.com/stretchr/testify to v1.8.0 by @renovate in #271
  • feat(session): add timeout for redis connection by @tessig in #277
  • chore: bump to go 1.19 by @tessig in #279
  • chore(deps): update irongut/codecoveragesummary action to v1.3.0 by @renovate in #278
  • ci: add golangci-lint to pipeline by @tessig in #283
  • fix(framework/flamingo/log): added nil check for StdLogger and Logger Fix for #161 by @nico-i in #284
  • continue-on-error for coverage pr comment by @bastianccm in #288
  • doc: typos and wording by @nico-i in #290
  • doc(core/gotemplate): Enhance documentation by @nico-i in #291
  • chore(deps): update module github.com/stretchr/testify to v1.8.1 by @renovate in #292
  • chore(deps): update module github.com/openzipkin/zipkin-go to v0.4.1 by @renovate in #286
  • chore(deps): update module github.com/google/go-cmp to v0.5.9 by @renovate in #282
  • chore(deps): update module github.com/coreos/go-oidc/v3 to v3.4.0 by @renovate in #293
  • fix(framework/web): Avoid error log pollution, switch context cancelled log level to debug by @carstendietrich in #294
  • Release v3.4.0 by @github-actions in #224

New Contributors

Full Changelog: v3.3.0...v3.4.0

Don't miss a new flamingo release

NewReleases is sending notifications on new releases.