Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Aug 6, 2025

Summary by CodeRabbit

  • New Features
    • Added integration with Lagoon Logs, enabling enhanced logging capabilities.
    • Introduced default configuration settings for Lagoon Logs, including connection details and enable/disable options.

@coderabbitai
Copy link

coderabbitai bot commented Aug 6, 2025

📝 Walkthrough

Walkthrough

A new dependency on the drupal/lagoon_logs module has been added to the project via composer.json. Corresponding configuration updates include enabling the lagoon_logs module in core.extension.yml and introducing a new default settings file, lagoon_logs.settings.yml, to configure logging parameters.

Changes

Cohort / File(s) Change Summary
Composer Dependency Addition
composer.json
Added drupal/lagoon_logs version ^3.0 to the require section.
Module Enablement Configuration
config/default/core.extension.yml
Enabled the lagoon_logs module by adding it to the module section.
Module Default Settings
config/default/lagoon_logs.settings.yml
Added new default configuration file specifying Lagoon logging host, port, identifier, and enable/disable flag.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@AlexSkrypnyk AlexSkrypnyk enabled auto-merge (squash) August 6, 2025 02:10
@AlexSkrypnyk AlexSkrypnyk added the AUTOMERGE Pull request has been approved and set to automerge label Aug 6, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 8f786be and 0d95ff4.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • composer.json (1 hunks)
  • config/default/core.extension.yml (1 hunks)
  • config/default/lagoon_logs.settings.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: AlexSkrypnyk
PR: drevops/client-vu-cms#2
File: .lagoon.yml:18-21
Timestamp: 2025-05-29T06:57:43.517Z
Learning: Lagoon platform automatically handles masking or preventing exposure of sensitive environment variables in logs, so additional manual masking/unsetting of sensitive variables after debug output is not required in .lagoon.yml configurations.
📚 Learning: composer dependencies are automatically updated via renovatebot...
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-06T00:44:35.051Z
Learning: Composer dependencies are automatically updated via RenovateBot

Applied to files:

  • composer.json
📚 Learning: composer dependencies are updated automatically with compatibility checks via renovatebot...
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T16:58:49.534Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot

Applied to files:

  • composer.json
📚 Learning: lagoon platform automatically handles masking or preventing exposure of sensitive environment variab...
Learnt from: AlexSkrypnyk
PR: drevops/client-vu-cms#2
File: .lagoon.yml:18-21
Timestamp: 2025-05-29T06:57:43.517Z
Learning: Lagoon platform automatically handles masking or preventing exposure of sensitive environment variables in logs, so additional manual masking/unsetting of sensitive variables after debug output is not required in .lagoon.yml configurations.

Applied to files:

  • config/default/lagoon_logs.settings.yml
🔇 Additional comments (2)
composer.json (1)

27-27: Verify drupal/lagoon_logs 3.x compatibility before locking it in

File: composer.json
Lines: 27–27

Snippet showing the pinned version:

        "drupal/lagoon_logs": "^3.0",

I attempted to fetch Packagist metadata for all 3.x tags but ran into JSON‐indexing errors (likely due to underscore vs. hyphen in the package name or the wrong API endpoint). Please re‐run a corrected check to ensure every 3.x release declares compatibility with Drupal 11 and PHP 8.3 (earlier 3.x tags were Drupal 10 only). For example:

#!/usr/bin/env bash
set -euo pipefail

# 1. Packagist check for both naming variants
for pkg in lagoon_logs lagoon-logs; do
  echo "Checking packagist.org/packages/drupal/$pkg.json …"
  curl -s "https://packagist.org/packages/drupal/$pkg.json" |
    jq -r '
      select(.package) |
      .package.versions
      | to_entries[]
      | select(.key | test("^3\\."))
      | "\(.key) → drupal/core: \(.value.require["drupal/core"] // "n/a"), php: \(.value.require.php // "n/a")"' \
    | sort
done

# 2. Inspect composer.json on the 3.x branch
echo -e "\ncomposer.json on branch 8.x-3.x (or 3.x):"
for branch in 8.x-3.x 3.x; do
  echo "Branch: $branch"
  curl -s "https://raw.githubusercontent.com/drupal/lagoon_logs/$branch/composer.json" |
    jq -r '
      if .require then
        "drupal/core: \(.require["drupal/core"] // "n/a")\nphp:        \(.require.php           // "n/a")"
      else
        "— composer.json not found on this branch"
      end'
done
config/default/lagoon_logs.settings.yml (1)

1-2: Config hash looks auto-generated – no action needed.

The _core.default_config_hash value is correctly present; nothing to change.

"drupal/gin": "^4.0.6",
"drupal/gin_toolbar": "^2",
"drupal/google_tag": "^2.0",
"drupal/lagoon_logs": "^3.0",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remember to commit the updated composer.lock.

composer.json changed but no composer.lock diff is present. Lock-file drift will break reproducible builds in CI.

🤖 Prompt for AI Agents
In composer.json at line 27, you updated the dependencies but did not commit the
corresponding composer.lock file. Run 'composer update' locally to regenerate
the composer.lock file reflecting the changes in composer.json, then commit the
updated composer.lock alongside composer.json to ensure consistent and
reproducible builds in CI.

history: 0
image: 0
inline_form_errors: 0
lagoon_logs: 0
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Module enabled for every install – is that intentional?

lagoon_logs is enabled in the default profile (value 0).
If the logging endpoint only exists on Lagoon, local/dev environments will spam connection errors. Consider moving the enable flag to a Lagoon-only config-split instead.

🤖 Prompt for AI Agents
In config/default/core.extension.yml at line 46, the lagoon_logs module is
enabled by default with a value of 0, causing connection errors in local/dev
environments where the logging endpoint does not exist. To fix this, remove or
disable lagoon_logs from the default profile and instead enable it only in a
Lagoon-specific config-split file to prevent errors outside the Lagoon
environment.

Comment on lines +3 to +6
host: application-logs.lagoon.svc
port: 5140
identifier: drupal
disable: 0
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Hard-coded endpoint may block non-Lagoon environments.

host: application-logs.lagoon.svc and port: 5140 are cluster-internal.
To keep local and CI installs fast/failure-free, inject these via environment variables or an override split rather than shipping them in the default config.

🤖 Prompt for AI Agents
In config/default/lagoon_logs.settings.yml around lines 3 to 6, the host and
port values are hard-coded to cluster-internal endpoints, which can cause issues
in non-Lagoon environments. Modify the configuration to use environment
variables or an override mechanism to set the host and port dynamically,
allowing local and CI installs to run without failure by not relying on these
fixed internal addresses.

@AlexSkrypnyk AlexSkrypnyk merged commit 1706485 into develop Aug 6, 2025
7 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/lagoon-logs branch August 6, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AUTOMERGE Pull request has been approved and set to automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants