Skip to content

Conversation

@kylos101
Copy link
Contributor

@kylos101 kylos101 commented Dec 6, 2023

Description

Related to #18612

w/o, we get errors like:
git config feature.manyFiles true failed (chdir /dst/<repo to clone>: no such file or directory)

We don't return failed config as an error, so it shouldn't block workspace start, but it also means we aren't getting the benefit of these recent suggestions.

Summary generated by Copilot

🤖[deprecated] Generated by Copilot at c28d32b

Fix git configuration for content-service initializer. Ensure that components/content-service/pkg/initializer/git.go runs git commands in the correct order and with the necessary features enabled.

Related Issue(s)

Fixes n/a

How to test

From a preview in https://kylos101-git-config.preview.gitpod-dev.com/workspaces (created via leeway run dev:preview)

  1. Verify the config (ref) is set:
gitpod@kylos101-dotfiles-pxk9pkhcs63:/workspace/dotfiles$ git config --list | grep manyfiles
feature.manyfiles=true
gitpod@kylos101-dotfiles-pxk9pkhcs63:/workspace/dotfiles$ git config --list | grep writecommitgraph
fetch.writecommitgraph=true
  1. Open a repo and commit/push something to it
  2. These should no longer register as errors in the logs - we were never setting these values

Documentation

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

Related to #18612

w/o, we get errors like:
git config feature.manyFiles true failed (chdir /dst/<repo to clone>: no such file or directory)

We don't return as error, so it shouldn't block workspace start, but it also means we aren't getting the clone perf boost maybe.
@kylos101 kylos101 changed the title [content-service] do git config after we have a folder [content-service] do git config after we have an init'd folder Dec 8, 2023
@kylos101 kylos101 marked this pull request as ready for review December 8, 2023 00:31
@kylos101 kylos101 requested a review from a team as a code owner December 8, 2023 00:31
@kylos101
Copy link
Contributor Author

👋 @aledbf could you peek at this? Presently, on each workspace start, they generate an error (because the directory does not exist or git initialized). I figure we can remove (to avoid the errors), or land in main (to avoid the errors, and get the config benefit).

@roboquat roboquat merged commit 350e583 into main Dec 13, 2023
@roboquat roboquat deleted the kylos101/git-config branch December 13, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants