Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

migration to log/slogger, edge gateway service type choice, and CI updates#369

Merged
nxtcoder17 merged 4 commits into
release-v1.0.7from
refactoring/logger
Sep 25, 2024
Merged

migration to log/slogger, edge gateway service type choice, and CI updates#369
nxtcoder17 merged 4 commits into
release-v1.0.7from
refactoring/logger

Conversation

@nxtcoder17
Copy link
Copy Markdown
Member

@nxtcoder17 nxtcoder17 commented Sep 25, 2024

Summary by Sourcery

Migrate logging to use slog.Logger, update CI workflows to use kloudlite/actions, and introduce configuration for edge gateway service type. Simplify documentation by linking to external installation instructions.

Enhancements:

  • Replace the use of the deprecated logging.Logger with the new slog.Logger across multiple applications for improved logging consistency.
  • Introduce a new environment variable KLOUDLITE_EDGE_GATEWAY_SERVICE_TYPE to allow configuration of the service type for edge gateways.
  • Update the PrintReadyBanner function to use a new banner design and include execution time.
  • Refactor the CI workflow to use kloudlite/actions for setting up Go cache and generating image tags, simplifying the configuration.

CI:

  • Modify the GitHub Actions workflow to use kloudlite/actions for setting up Nix and Docker, and generating image tags, replacing custom scripts.

Documentation:

  • Update the README to replace detailed installation instructions with a link to the installation documentation.

@nxtcoder17 nxtcoder17 self-assigned this Sep 25, 2024
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Sep 25, 2024

Reviewer's Guide by Sourcery

This pull request implements several significant changes across multiple services and components of the Kloudlite platform. The main focus areas include migration to log/slogger, updates to the edge gateway service type, and CI improvements. Key changes involve updating logging mechanisms, refactoring GRPC server configurations, modifying CI workflows, and enhancing the global VPN functionality.

File-Level Changes

Change Details Files
Migration to log/slogger across multiple services
  • Updated logging initialization in various services (comms, container-registry, iam, etc.)
  • Replaced custom logging with slog in GRPC server configurations
  • Unified logging approach across different components
apps/comms/main.go
apps/container-registry/main.go
apps/iam/main.go
pkg/grpc/server.go
apps/accounts/internal/framework/framework.go
apps/console/internal/framework/framework.go
apps/container-registry/internal/framework/framework.go
apps/infra/internal/framework/framework.go
apps/comms/internal/framework/framework.go
apps/message-office/internal/framework/framework.go
apps/tenant-agent/main.go
Edge gateway service type configuration update
  • Added KloudliteEdgeGatewayServiceType to infraEnv struct
  • Updated template to use dynamic service type
  • Modified cluster synchronization logic to use the new service type configuration
apps/infra/internal/env/env.go
apps/infra/internal/domain/templates/kloudlite-gateway-svc.yml.tpl
apps/infra/internal/domain/clusters.go
CI workflow improvements
  • Updated image tag generation logic
  • Replaced custom caching with kloudlite/actions/setup-cache-go
  • Modified fail-fast strategy in GitHub Actions workflow
.github/actions/build-api-images/action.yml
.github/workflows/building-with-nix.yml
Global VPN functionality enhancements
  • Updated IP handling in peer configurations
  • Modified peer building logic in global VPN devices
  • Adjusted global VPN connection peer generation
apps/infra/internal/domain/global-vpn-devices.go
apps/infra/internal/domain/global-vpn-cluster-connection.go
Dependency updates and minor refactoring
  • Updated go.mod with new dependencies and versions
  • Refactored main functions in various services for consistency
  • Updated README and license information
go.mod
README.md
apps/comms/main.go
apps/container-registry/main.go
apps/iam/main.go

Sequence Diagram

sequenceDiagram
    participant Main
    participant Logger
    participant GRPCServer
    Main->>Logger: Initialize slog logger
    Main->>GRPCServer: Create with new logger
    GRPCServer->>Logger: Use for logging
    Note over GRPCServer,Logger: Unified logging across components
Loading

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nxtcoder17 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@nxtcoder17 nxtcoder17 merged commit 4e3c05f into release-v1.0.7 Sep 25, 2024
@nxtcoder17 nxtcoder17 deleted the refactoring/logger branch September 25, 2024 07:49
abdheshnayak pushed a commit that referenced this pull request Nov 5, 2024
migration to log/slogger, edge gateway service type choice,  and CI updates
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant