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

Release/v1.24.0 #1104

Merged
merged 47 commits into from
Oct 14, 2024
Merged

Release/v1.24.0 #1104

merged 47 commits into from
Oct 14, 2024

Conversation

Umang01-hash
Copy link
Contributor

@Umang01-hash Umang01-hash commented Oct 14, 2024

Release v1.24.0

✨ Features:

  • Cassandra Tracing & Context Support:
    We’ve added context support and tracing for Cassandra operations, improving flexibility and observability. The following methods are now available:

    Single Operations:

    • QueryWithCtx: Executes queries with context, binding results to the specified destination.
    • ExecWithCtx: Executes non-query operations with context.
    • ExecCASWithCtx: Executes lightweight (CAS) transactions with context.
    • NewBatchWithCtx: Initializes a new batch operation with context.

    Batch Operations:

    • BatchQueryWithCtx: Adds queries to batch operations with context.
    • ExecuteBatchWithCtx: Executes batch operations with context.
    • ExecuteBatchCASWithCtx: Executes batch operations with context and returns the result.

    Note: The following methods in Cassandra have been deprecated:

    type Cassandra interface {
        Query(dest interface{}, stmt string, values ...any) error
        Exec(stmt string, values ...any) error
        ExecCAS(dest any, stmt string, values ...any) (bool, error)
        BatchQuery(stmt string, values ...any) error
        NewBatch(name string, batchType int) error
        CassandraBatch
    }
    
    type CassandraBatch interface {
        BatchQuery(name, stmt string, values ...any)
        ExecuteBatch(name string) error
        ExecuteBatchCAS(name string, dest ...any) (bool, error)
    }
  • JWT Claims Retrieval:
    OAuth-enabled applications can now retrieve JWT claims directly within handlers. Here’s an example:

    func HelloHandler(c *gofr.Context) (interface{}, error) {
        // Retrieve the JWT claim from the context
        claimData := c.Context.Value(middleware.JWTClaim)
    
        // Assert that the claimData is of type jwt.MapClaims
        claims, ok := claimData.(jwt.MapClaims)
        if !ok {
            return nil, fmt.Errorf("invalid claim data type")
        }
    
        // Return the claims as a response
        return claims, nil
    }

🛠️ Fixes:

  • Redis Panic Handling:
    Resolved an issue where calling Redis.Ping() without an active connection caused the application to panic. This is now handled gracefully.

  • Docker Example Enhancement:
    The http-server example has been enhanced to include Prometheus and Grafana containers in its Docker setup, allowing users to fully explore GoFr's observability features.

aryanmehrotra and others added 30 commits October 3, 2024 20:06
Bumps google.golang.org/protobuf from 1.34.2 to 1.35.1.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](golang/text@v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.0 to 1.67.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.67.0...v1.67.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.24.0 to 0.25.0.
- [Commits](golang/term@v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
typo: advanced-guide/dealing-with-sql
aryanmehrotra
aryanmehrotra previously approved these changes Oct 14, 2024
@aryanmehrotra aryanmehrotra merged commit 371c49a into main Oct 14, 2024
11 checks passed
@aryanmehrotra aryanmehrotra deleted the release/v1.24.0 branch October 14, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants