Skip to content

chore(wsl1): Fix consistent FDB deps install LS-379#769

Closed
rolysr wants to merge 1 commit intodevfrom
fix-consistent-fdb-deps-wsl1
Closed

chore(wsl1): Fix consistent FDB deps install LS-379#769
rolysr wants to merge 1 commit intodevfrom
fix-consistent-fdb-deps-wsl1

Conversation

@rolysr
Copy link
Collaborator

@rolysr rolysr commented Feb 27, 2026

Previously, the installation of FoundationDB was skipped on WSL1, which led to the need of manually installing packages dependencies for project compilation on WSL1, due to no complete header files being present. This commit fixes that issue by ensuring only FDB related libraries and header files are available on WSL1.

Previously, the installation of FoundationDB was skipped on WSL1, which
led to the need of manually installing packages dependencies for project
compilation on WSL1, due to no complete header files being present. This
commit fixes that issue by ensuring only FDB related libraries and
header files are available on WSL1.

Signed-off-by: rolysr <rolysr@leil.io>
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where FoundationDB dependencies were not being consistently installed on WSL1 environments. By modifying the installation scripts, this PR ensures that the necessary libraries and header files are available, resolving a manual installation requirement for project compilation on WSL1.

Highlights

  • WSL1 FoundationDB Installation: This PR modifies the installation scripts to ensure FoundationDB dependencies are installed correctly on WSL1, resolving a previous issue where they were skipped.
  • Conditional Installation: The install-foundationdb.sh script now includes a check to determine if it's running on WSL1 and skips the installation if it is.
  • Script Modification: The setup_machine.sh script was updated to unconditionally call the install-foundationdb.sh script, removing the previous WSL1 check.
Activity
  • The PR addresses an issue with FoundationDB dependencies on WSL1.
  • The installation scripts were modified to ensure correct installation on WSL1.
  • The setup_machine.sh script was updated to unconditionally call the installation script.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

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 aims to fix WSL1 developer/CI setup by ensuring FoundationDB-related dependencies are installed consistently so the project can compile without manual package installation on WSL1.

Changes:

  • Always invoke the FoundationDB install script from tests/setup_machine.sh (removing the WSL1 skip there).
  • Move WSL1 handling into tests/ci_build/install-foundationdb.sh by adding a WSL1 detection branch.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/setup_machine.sh Always runs the FoundationDB install helper during machine setup.
tests/ci_build/install-foundationdb.sh Adds WSL1 detection around the dpkg/apt install/verify steps.

Comment on lines +77 to +81
if grep -q Microsoft /proc/version && ! grep -q microsoft-standard /proc/version; then
echo "Running on WSL1: skipping FoundationDB installation."
else
echo "FoundationDB CLI installation failed."
exit 1
fi
echo "Installing FoundationDB packages..."
dpkg -i "${workspace}/${client_pkg}" "${workspace}/${server_pkg}" || die "Failed to install FoundationDB packages"
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The new WSL1 branch skips all FoundationDB installation, which means the FoundationDB headers/libs still won’t be present on WSL1 (the original compilation problem remains). If WSL1 can’t run the server, consider installing only the client package (or extracting just headers/libs) rather than skipping everything, and avoid downloading the server .deb in that case.

Copilot uses AI. Check for mistakes.
Comment on lines +77 to 79
if grep -q Microsoft /proc/version && ! grep -q microsoft-standard /proc/version; then
echo "Running on WSL1: skipping FoundationDB installation."
else
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

In the WSL1 branch you skip installation but still leave the downloaded files in the temporary workspace (cleanup only runs in the non-WSL1 branch or via die()). Add cleanup for the WSL1 path (or use a trap to always remove the workspace), and consider skipping downloads when you’re not installing anything.

Copilot uses AI. Check for mistakes.
Comment on lines 197 to +198
echo ; echo 'Install FoundationDB'
if grep -q Microsoft /proc/version && ! grep -q microsoft-standard /proc/version; then
echo "Running on WSL1: skipping FoundationDB installation."
else
"$script_dir/ci_build/install-foundationdb.sh"
fi
"$script_dir/ci_build/install-foundationdb.sh"
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

setup_machine.sh now always runs install-foundationdb.sh, but that script currently still skips installation on WSL1. If the goal is to ensure WSL1 has FoundationDB headers/libs for compilation, this change won’t achieve it unless install-foundationdb.sh installs (at least) the client package on WSL1.

Copilot uses AI. Check for mistakes.
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to fix the FoundationDB dependency installation on WSL1. However, the current implementation still skips the installation on WSL1, which contradicts the PR's description. Additionally, the refactoring introduces an issue where the temporary workspace is not cleaned up when running on WSL1. I've added a specific comment with a suggestion to address these points.

Comment on lines +77 to +102
if grep -q Microsoft /proc/version && ! grep -q microsoft-standard /proc/version; then
echo "Running on WSL1: skipping FoundationDB installation."
else
echo "FoundationDB CLI installation failed."
exit 1
fi
echo "Installing FoundationDB packages..."
dpkg -i "${workspace}/${client_pkg}" "${workspace}/${server_pkg}" || die "Failed to install FoundationDB packages"

# Fix any missing dependencies
echo "Fixing missing dependencies..."
apt-get install -f -y || die "Failed to fix missing dependencies"

# Verify the installation
echo "Verifying FoundationDB installation..."
if command -v fdbcli &> /dev/null; then
echo "FoundationDB CLI installed successfully."
fdbcli --version
else
echo "FoundationDB CLI installation failed."
exit 1
fi

# Clean up temporary workspace
echo "Removing temporary workspace..."
rm -r "${workspace:?}"
# Clean up temporary workspace
echo "Removing temporary workspace..."
rm -r "${workspace:?}"

echo "FoundationDB installation completed successfully."
echo "FoundationDB installation completed successfully."
fi

Choose a reason for hiding this comment

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

high

There are two issues with this block of code:

  1. Contradiction with PR description: The code skips the FoundationDB installation on WSL1, but the pull request description states that it should install the FDB libraries and header files.
  2. Resource leak: The temporary workspace (${workspace}) is only cleaned up in the else branch. This means on WSL1, the workspace directory and its contents are never removed.

I suggest refactoring this section to correctly handle the WSL1 case as described, and to move the common steps like dependency fixing, verification, and cleanup outside the conditional block to avoid code duplication and fix the resource leak.

if grep -q Microsoft /proc/version && ! grep -q microsoft-standard /proc/version; then
	echo "Running on WSL1: installing FoundationDB client package..."
	dpkg -i "${workspace}/${client_pkg}" || die "Failed to install FoundationDB client package"
else
	echo "Installing FoundationDB packages..."
	dpkg -i "${workspace}/${client_pkg}" "${workspace}/${server_pkg}" || die "Failed to install FoundationDB packages"
fi

# Fix any missing dependencies
echo "Fixing missing dependencies..."
apt-get install -f -y || die "Failed to fix missing dependencies"

# Verify the installation
echo "Verifying FoundationDB installation..."
if command -v fdbcli &> /dev/null; then
	echo "FoundationDB CLI installed successfully."
	fdbcli --version
else
	echo "FoundationDB CLI installation failed."
	exit 1
fi

# Clean up temporary workspace
echo "Removing temporary workspace..."
rm -r "${workspace:?}"

echo "FoundationDB installation completed successfully."

@rolysr rolysr changed the title chore(wsl1): Fix consistent FDB deps install chore(wsl1): Fix consistent FDB deps install LS-379 Feb 27, 2026
@rolysr rolysr closed this Feb 27, 2026
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