Skip to content

Comments

fix monorepo split#230

Merged
zajca merged 1 commit intomainfrom
zajca/fix-split
Aug 19, 2025
Merged

fix monorepo split#230
zajca merged 1 commit intomainfrom
zajca/fix-split

Conversation

@zajca
Copy link
Member

@zajca zajca commented Aug 19, 2025

Jira: CT-XXX
Connection PR: XXX
SAPI PR: XXX


Here is successful split https://github.com/keboola/storage-backend/actions/runs/17066305653 do not ask how I did achieved this :D But it is run from this PR #229 I have cherrypicked changes from there

@zajca zajca requested review from Copilot, romanbracinik and tomasfejfar and removed request for tomasfejfar August 19, 2025 11:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the monorepo split functionality by updating the Docker volume mounting strategy in the GitHub workflow. The changes address issues with Git operations inside the container by ensuring consistent absolute paths between the host and container environments.

Key changes:

  • Enhanced error handling with set -euxo pipefail
  • Replaced simple volume mounting with absolute path resolution for Git worktree and Git directory
  • Updated Docker run command to use consistent absolute paths and improved volume mounting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

ssh-private-key: ${{ secrets[matrix.sshKey] }}

- name: Split monorepo
run: |
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

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

The set -euxo pipefail flags should be explained with a comment, as the combination of these flags (especially -x for debug output) may produce verbose logs in CI and -u for undefined variables could cause unexpected failures if variables are intentionally unset.

Suggested change
run: |
run: |
# Enable strict error handling and verbose output:
# -e: exit on error
# -u: treat unset variables as errors (may cause failures if variables are intentionally unset)
# -x: print commands as they are executed (can produce verbose logs in CI)
# -o pipefail: fail pipelines if any command fails

Copilot uses AI. Check for mistakes.

# Resolve absolute paths on the host
WORKTREE="$PWD"
GITDIR="$(git rev-parse --git-dir)"
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

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

[nitpick] This bash pattern matching syntax [[ "${GITDIR}" != /* ]] is checking if GITDIR is not an absolute path, but it would be clearer to add a comment explaining this logic since it's not immediately obvious what /* pattern matching does.

Suggested change
GITDIR="$(git rev-parse --git-dir)"
GITDIR="$(git rev-parse --git-dir)"
# If GITDIR is not an absolute path (does not start with '/'), prepend WORKTREE to make it absolute

Copilot uses AI. Check for mistakes.
@zajca zajca merged commit 218c90d into main Aug 19, 2025
21 checks passed
@zajca zajca deleted the zajca/fix-split branch August 19, 2025 18:56
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