Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • heptapod heptapod
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 185
    • Issues 185
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapod
  • heptapodheptapod
  • Issues
  • #386
Closed
Open
Created Dec 09, 2020 by Georges Racinet@gracinet🦑Owner

Option to disable Rust parts of Mercurial at run time

Using a Rust-enhanced Mercurial in Heptapod is certainly possible, we'd like to experiment with that soon. The ultra-fast persistent nodemap feature (depends on activation flag and repo preparation) is especially interesting for servers.

But the Rust endeavor in Mercurial is still considered experimental, so we need a way to disable it. Mercurial provides the HGMODULEPOLICY environment variables, which should be easy to leverage in services.

But the Rails application and Heptapod Shell also spawn Mercurial processes directly. Therefore we need to add configuration flags to them so that they can set HGMODULEPOLICY.

A simple possibility would be:

mercurial:
   disable-rust: true

Rationale: if it were just rust: false, it wouldn't be too obvious that true actually means "use Rust parts if available" rather than any magical upgrade that doesn't exist.

Another option would be:

mercurial:
  module-policy: c

Rationale: This is lower level, but makes for better uniformity with the HGMODULEPOLICY=c that will need to be set in the services. Also allows to use any policy (including thus any possible future one).

A third possibility would be to have the Rails app and Heptapod shell forward HGMODULEPOLICY, so that it can be set in its service definition in the case of Rails and in the sshd configuration in the case of Heptapod Shell. This is of course very uniform, but it's really tedious, both for source installations and for the exposition in Omnibus (necessary so that it survives Docker restarts, notably)

Edited Dec 09, 2020 by Georges Racinet
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking