Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W Web Team
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Web
  • Web Team
  • Issues
  • #23

Closed
Open
Created Jan 10, 2022 by Jérôme Charaoui@lavamind🔭Owner

Lektor projects track lego branch tip instead of specific commit

In most of our Lektor repositories, .gitmodules is set up to track the tip of main instead of a specific commit. This is causing issues with GitLab CI when GIT_STRATEGY = fetch (the default) is used, because when a job starts it doesn't use the --remote flag as part of the git submodule update command (upstream issue).

To work around this, we recently switched to GIT_STRATEGY = clone which isn't as efficient especially for large projects because it nukes the repository cached on the runner at the start of every job.

Ultimately we should discuss whether this is the best approach to using lego in our Lektor projects, because bad commits there can cascade and lead to broken websites. Right now this kind of breakage could be difficult to spot because commits to lego don't trigger CI builds in dependent projects, although setting this up is definitely feasible.

Another approach would be to use submodules to point to specific commits, which is what they were designed for originally. The caveat is that more manual work would be required to update lego in multiple projects at once, although this too can be made relatively straightforward with a little script-work.

Personally I think the specific-commit approach is what we should be using here, because having websites track lego looks to me like one big juicy foot-gun.

Edited Jan 10, 2022 by Jérôme Charaoui
Assignee
Assign to
Time tracking