Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Jul 18, 2025

Summary by CodeRabbit

  • Chores
    • Improved Dockerfile command formatting and streamlined theme build process.
    • Added a build argument to configure theme selection in the CLI service.
    • Updated workflow to disable front-end builds during scheduled runs and optimize linting execution across parallel jobs.

@coderabbitai
Copy link

coderabbitai bot commented Jul 18, 2025

📝 Walkthrough

Walkthrough

The changes update Dockerfiles for ClamAV, Solr, and the CLI to improve command formatting and conditional logic, particularly around theme asset building. The GitHub Actions workflow is adjusted to limit redundant linting in parallel jobs and disable theme builds on scheduled runs. Docker Compose now passes a DRUPAL_THEME build argument to the CLI service.

Changes

File(s) Change Summary
.docker/clamav.dockerfile Reformatted RUN instruction by splitting a chained shell command into two lines for clarity, no change in logic.
.docker/cli.dockerfile Changed DRUPAL_THEME default to empty; refactored theme asset build steps into a conditional block using yarn --cwd.
.docker/solr.dockerfile Reformatted RUN instruction for sed commands into a single line with consistent && chaining.
.github/workflows/build-test-deploy.yml Set DRUPAL_THEME to empty for scheduled runs; added conditions to linting/validation steps to run only on a single matrix job.
docker-compose.yml Added DRUPAL_THEME build argument (default empty) to the cli service build configuration.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHubActions
    participant DockerCompose
    participant CLIContainer

    Developer->>DockerCompose: docker-compose build
    DockerCompose->>CLIContainer: Build with DRUPAL_THEME arg (default empty)
    CLIContainer->>CLIContainer: If DRUPAL_THEME is non-empty, run yarn install/build in theme dir

    Developer->>GitHubActions: Push or schedule workflow
    GitHubActions->>GitHubActions: If scheduled, set DRUPAL_THEME=""
    GitHubActions->>GitHubActions: For matrix jobs, run lint/validation only on instance 0
Loading

🪧 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.
    • @coderabbitai modularize this function.
  • 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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.

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: 4

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a53706c and e66d596.

📒 Files selected for processing (5)
  • .docker/clamav.dockerfile (1 hunks)
  • .docker/cli.dockerfile (3 hunks)
  • .docker/solr.dockerfile (1 hunks)
  • .github/workflows/build-test-deploy.yml (3 hunks)
  • docker-compose.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Docker images are updated for containers via RenovateBot
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Docker images are updated for containers via RenovateBot
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
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-17T16:32:41.992Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot
.docker/solr.dockerfile (2)
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Docker images are updated for containers via RenovateBot
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Docker images are updated for containers via RenovateBot
.github/workflows/build-test-deploy.yml (2)
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
.docker/cli.dockerfile (4)
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Docker images are updated for containers via RenovateBot
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Docker images are updated for containers via RenovateBot
🔇 Additional comments (3)
.docker/clamav.dockerfile (1)

24-25: Formatting change looks good

Splitting the RUN command across two physical lines keeps the same single-layer semantics while improving readability. No functional or build-size impact detected.

.docker/solr.dockerfile (1)

20-22: Refactored RUN instruction is fine

The consolidated sed chain preserves behaviour and keeps it to one layer. No issues spotted.

docker-compose.yml (1)

89-89: Build arg passthrough LGTM

Adding DRUPAL_THEME to the CLI build args keeps compose and Dockerfile in sync. ✅

Comment on lines 49 to +54
# Add more tools.
RUN apk add --no-cache ncurses pv tzdata autoconf g++ make \
&& pecl install pcov \
&& docker-php-ext-enable pcov \
&& docker-php-ext-install pcntl \
&& apk del g++ make autoconf
RUN apk add --no-cache ncurses pv tzdata autoconf g++ make && \
pecl install pcov && \
docker-php-ext-enable pcov && \
docker-php-ext-install pcntl && \
apk del g++ make autoconf
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Shrink image by using a virtual build package group

You can avoid leaving behind g++, make, and autoconf layers by installing them as a temporary virtual package and deleting it in one shot:

-RUN apk add --no-cache ncurses pv tzdata autoconf g++ make && \
-    pecl install pcov && \
-    docker-php-ext-enable pcov && \
-    docker-php-ext-install pcntl && \
-    apk del g++ make autoconf
+RUN apk add --no-cache ncurses pv tzdata --virtual .build-deps g++ make autoconf && \
+    pecl install pcov && \
+    docker-php-ext-enable pcov && \
+    docker-php-ext-install pcntl && \
+    apk del .build-deps
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Add more tools.
RUN apk add --no-cache ncurses pv tzdata autoconf g++ make \
&& pecl install pcov \
&& docker-php-ext-enable pcov \
&& docker-php-ext-install pcntl \
&& apk del g++ make autoconf
RUN apk add --no-cache ncurses pv tzdata autoconf g++ make && \
pecl install pcov && \
docker-php-ext-enable pcov && \
docker-php-ext-install pcntl && \
apk del g++ make autoconf
# Add more tools.
RUN apk add --no-cache ncurses pv tzdata --virtual .build-deps g++ make autoconf && \
pecl install pcov && \
docker-php-ext-enable pcov && \
docker-php-ext-install pcntl && \
apk del .build-deps
🤖 Prompt for AI Agents
In .docker/cli.dockerfile around lines 49 to 54, the installation of build tools
g++, make, and autoconf leaves residual layers increasing image size. Refactor
the RUN command to install these tools as a virtual package group using apk's
--virtual option, then remove the entire virtual package group in the same RUN
step after use. This ensures all build dependencies are cleaned up in one layer,
shrinking the final image size.

Comment on lines +83 to +88
RUN if [ -n "${DRUPAL_THEME}" ]; then \
theme_path="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}"; \
yarn --cwd="${theme_path}" install --frozen-lockfile --no-progress && \
yarn --cwd="${theme_path}" run build && \
yarn cache clean; \
fi
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Guard against missing theme path to prevent build failures

If DRUPAL_THEME is set but the directory is misspelled or absent, the build will exit with a fatal Yarn error. Add an existence check so the image can still be built:

-RUN if [ -n "${DRUPAL_THEME}" ]; then \
-      theme_path="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}"; \
-      yarn --cwd="${theme_path}" install --frozen-lockfile --no-progress && \
-      yarn --cwd="${theme_path}" run build && \
-      yarn cache clean; \
-    fi
+RUN if [ -n "${DRUPAL_THEME}" ] && [ -d "/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}" ]; then \
+      yarn --cwd="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}" install --frozen-lockfile --no-progress && \
+      yarn --cwd="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}" run build && \
+      yarn cache clean; \
+    else \
+      echo "Skipping theme asset build – DRUPAL_THEME empty or path missing"; \
+    fi
🤖 Prompt for AI Agents
In .docker/cli.dockerfile around lines 83 to 88, the current RUN command assumes
the theme directory exists if DRUPAL_THEME is set, causing build failures if the
directory is missing. Modify the script to check if the theme_path directory
actually exists before running yarn commands, so the build does not fail when
the directory is absent or misspelled.

@AlexSkrypnyk AlexSkrypnyk requested a deployment to PR-69 July 18, 2025 15:59 Abandoned
@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/vortex-update-july-25-2 branch from e66d596 to 0e4c032 Compare July 18, 2025 16:29
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: 1

♻️ Duplicate comments (2)
.docker/cli.dockerfile (2)

50-54: Reuse prior suggestion: install build tools via virtual package group


83-88: Reuse prior suggestion: guard for missing theme directory to avoid build failure

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e66d596 and 0e4c032.

📒 Files selected for processing (5)
  • .docker/clamav.dockerfile (1 hunks)
  • .docker/cli.dockerfile (3 hunks)
  • .docker/solr.dockerfile (1 hunks)
  • .github/workflows/build-test-deploy.yml (3 hunks)
  • docker-compose.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Docker images are updated for containers via RenovateBot
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Docker images are updated for containers via RenovateBot
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
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-17T16:32:41.992Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot
.docker/solr.dockerfile (2)
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Docker images are updated for containers via RenovateBot
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Docker images are updated for containers via RenovateBot
.docker/cli.dockerfile (4)
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Docker images are updated for containers via RenovateBot
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Docker images are updated for containers via RenovateBot
.github/workflows/build-test-deploy.yml (2)
Learnt from: CR
PR: drevops/website#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-17T16:32:41.992Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.308Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot
🔇 Additional comments (5)
.docker/clamav.dockerfile (1)

24-29: Split RUN chain is clean and functionally sound – LGTM

Moving rm /tmp/clamav.conf onto its own line keeps the append/remove flow readable without altering behaviour.

docker-compose.yml (1)

89-90: Build arg forwards DRUPAL_THEME correctly

Passing the variable into the CLI build keeps the Dockerfile and runtime in sync. Looks good.

.github/workflows/build-test-deploy.yml (2)

95-101: Empty-string assignment fixes previous quoting issue – nice catch

Using DRUPAL_THEME= (no quotes) avoids the literal "" value that broke shell checks in the Dockerfile.


221-290: Conditional gating of heavy linters is sensible

Restricting lint/analysis steps to the primary matrix instance and guarding theme lints behind env.DRUPAL_THEME != '' trims CI time without losing coverage.

.docker/cli.dockerfile (1)

34-36: Default empty DRUPAL_THEME aligns with optional theme builds – LGTM

Comment on lines +20 to +22
RUN sed -i -e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" /solr-conf/conf/solrconfig.xml && \
sed -i -e "s#solr.lock.type:native#solr.lock.type:none#g" /solr-conf/conf/solrconfig.xml && \
sed -i -e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" /solr-conf/conf/solrcore.properties
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Minor perf nit – combine the three sed edits

Each sed -i rewrites the file, incurring three I/O passes. You can fuse them into one for a marginally smaller layer:

-RUN sed -i -e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" /solr-conf/conf/solrconfig.xml && \
-    sed -i -e "s#solr.lock.type:native#solr.lock.type:none#g" /solr-conf/conf/solrconfig.xml && \
-    sed -i -e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" /solr-conf/conf/solrcore.properties
+RUN sed -i \
+    -e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" \
+    -e "s#solr.lock.type:native#solr.lock.type:none#g" \
+    -e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" \
+    /solr-conf/conf/solrconfig.xml /solr-conf/conf/solrcore.properties
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
RUN sed -i -e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" /solr-conf/conf/solrconfig.xml && \
sed -i -e "s#solr.lock.type:native#solr.lock.type:none#g" /solr-conf/conf/solrconfig.xml && \
sed -i -e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" /solr-conf/conf/solrcore.properties
RUN sed -i \
-e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" \
-e "s#solr.lock.type:native#solr.lock.type:none#g" \
-e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" \
/solr-conf/conf/solrconfig.xml /solr-conf/conf/solrcore.properties
🤖 Prompt for AI Agents
In .docker/solr.dockerfile around lines 20 to 22, the three separate sed
commands each rewrite the file individually, causing unnecessary multiple I/O
operations. Combine all three sed expressions into a single sed command with
multiple -e options to perform all replacements in one pass, reducing the number
of file writes and improving build efficiency.

@AlexSkrypnyk AlexSkrypnyk requested a deployment to PR-69 July 18, 2025 16:43 Abandoned
@AlexSkrypnyk AlexSkrypnyk merged commit 0a488ab into develop Jul 18, 2025
7 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/vortex-update-july-25-2 branch July 18, 2025 16:58
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.

2 participants