Skip to content

Conversation

@cmraible
Copy link
Collaborator

@cmraible cmraible commented Jan 27, 2026

No changes to functionality included in this change.

When running yarn docker:build locally (which is required to run e2e tests locally), the build was sometimes flaky when building the frontend apps. These generated typescript types were not in the .dockerignore, so stale types from local builds could pollute the docker image and ultimately cause the build to fail.

Adding these generated types directories to the .dockerignore seems to eliminate this flakiness by ensuring it only uses the latest and greatest type definitions.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Walkthrough

The pull request adds a new ignore pattern to the .dockerignore file. Specifically, it adds apps/*/types as an ignore entry, which extends Docker build ignore rules to exclude types directories within all apps subdirectories. The change consists of two new lines with no modifications to existing patterns or logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description is directly related to the changeset, explaining the motivation for adding generated types to .dockerignore to fix Docker build flakiness during local e2e testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change—adding generated types from frontend apps to .dockerignore—matching the changeset's sole modification and aligning with the PR's stated objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cmraible cmraible marked this pull request as ready for review January 27, 2026 20:42
Copy link
Contributor

@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

🤖 Fix all issues with AI agents
In @.dockerignore:
- Around line 11-12: The .dockerignore entry "apps/*/types" doesn't match nested
paths like "apps/stats/src/types"; update the pattern so generated type
directories are excluded during Docker builds by replacing "apps/*/types" with a
glob that covers deeper nesting such as "apps/**/types" (or specifically
"apps/*/src/types") in the .dockerignore file.
Comment on lines +11 to +12
apps/*/types

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's see the overall structure of the repository
git ls-files | head -30

Repository: TryGhost/Ghost

Length of output: 1056


🏁 Script executed:

# Check the structure under apps/
fd -t d -L . apps/ | head -50 | sort

Repository: TryGhost/Ghost

Length of output: 1819


🏁 Script executed:

# Find all directories named 'types' in the repository
fd -t d '^types$' .

Repository: TryGhost/Ghost

Length of output: 146


🏁 Script executed:

# Check if there are any nested app structures (apps/*/apps/*/types)
find apps -type d -name types 2>/dev/null | head -30

Repository: TryGhost/Ghost

Length of output: 78


🏁 Script executed:

# Let's get a complete picture of all types directories under apps/
find apps -type d -name types 2>/dev/null | sort

Repository: TryGhost/Ghost

Length of output: 78


🏁 Script executed:

# Check which apps exist and if they have types directories
for app in $(ls -d apps/*/); do
  echo "=== App: $app ==="
  if [ -d "${app}types" ]; then
    echo "  Found: ${app}types"
  fi
  if [ -d "${app}src/types" ]; then
    echo "  Found: ${app}src/types"
  fi
done

Repository: TryGhost/Ghost

Length of output: 487


🏁 Script executed:

# Let's also check the .dockerignore file to see its current content
cat -n .dockerignore

Repository: TryGhost/Ghost

Length of output: 666


🏁 Script executed:

# Check if apps/stats/src/types is tracked in git or gitignored
git ls-files apps/stats/src/types 2>/dev/null | head -10

Repository: TryGhost/Ghost

Length of output: 150


🏁 Script executed:

# Check if it's in .gitignore
git check-ignore -v apps/stats/src/types 2>/dev/null || echo "Not in .gitignore"

Repository: TryGhost/Ghost

Length of output: 75


🏁 Script executed:

# Let's check what files are in that directory to understand its purpose
find apps/stats/src/types -type f 2>/dev/null | head -20

Repository: TryGhost/Ghost

Length of output: 150


Pattern mismatch: apps/*/types will not exclude the generated types directory.

The pattern apps/*/types matches directories like apps/admin/types, but the actual types directory in the repository is apps/stats/src/types. A single asterisk matches only one directory level, so the current pattern will fail to exclude generated types from Docker builds.

Use apps/*/src/types or apps/**/types instead to correctly exclude types directories nested under src/.

🤖 Prompt for AI Agents
In @.dockerignore around lines 11 - 12, The .dockerignore entry "apps/*/types"
doesn't match nested paths like "apps/stats/src/types"; update the pattern so
generated type directories are excluded during Docker builds by replacing
"apps/*/types" with a glob that covers deeper nesting such as "apps/**/types"
(or specifically "apps/*/src/types") in the .dockerignore file.
@cmraible cmraible changed the title Added generated types to .dockerignore Jan 27, 2026
@cmraible cmraible changed the title Added generated types to .dockerignore Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants