1. 25 Oct, 2020 2 commits
    • Georges Racinet on mutations.racinet.fr's avatar
      Commit: introducing hpd_display_id · b10c60a26265
      In some cases it makes sense to display a different commit ID than the
      one used for addressing. Of course our existing `HgGitRepository` is
      a prime example of that, but it's not hard to imagine other ones.
      
      Up to now, we've changed some templates and user-facing to code to
      use directly some 'hgid'. For dual VCS support, as well as intermediate
      steps towards Mercurial native support, we'll need something more
      abstract than that.
      
      The method name, `hpd_display_id`, is voluntary obnoxious: we want
      to recognize at first glance that it's Heptapod-specific, and we want
      it to be easy to find all occurrences in the code base, in preparation
      for potential future times when we won't be needing it any more.
      
      --HG--
      branch : heptapod
      b10c60a26265
    • Georges Racinet on mutations.racinet.fr's avatar
      archive_sha: fixing HGitalyRepository · e457db6b841d
      The position of the overriding method was just wrong. This went
      unnoticed because the Mercurial archive feature is for now tested
      with HgGitRepository only.
      
      --HG--
      branch : heptapod
      e457db6b841d
  2. 26 Oct, 2020 1 commit
  3. 25 Oct, 2020 1 commit
  4. 26 Oct, 2020 7 commits
  5. 14 Oct, 2020 2 commits
    • Georges Racinet's avatar
      Repository archives: dispatching to HGitaly for Mercurial repos · 2e2da0334c73
      Georges Racinet authored
      For archive production, the Rails app duty is to return
      direct connection information to Workhorse, so that it can call
      Gitaly directly.
      
      We're reusing the dispatching logic for our existing (yet unplugged)
      HGitaly integration: by prefixing the storage (shard) with `hg:` for
      Mercurial repositories, we have the `GitalyClient.address` return
      connection information for the HGitaly server.
      
      For this to work, we need `archive_metadata` method of the
      Mercurial Repository classes to provide the Mercurial SHA, which we do
      by intoducing the dedicated `archive_sha` method.
      
      --HG--
      branch : heptapod
      2e2da0334c73
    • Georges Racinet's avatar
      Python dependencies: adding HGitaly · f1f3ff16acc1
      Georges Racinet authored
      Of course in the long term, HGitaly will be installed potentially
      on another system, and it wouldn't be the role of the Rails
      application to require it – but the same applies to this whole
      dependencies list, actually.
      
      Note: hgitaly 0.1.0 already implies py-heptapod>=0.17.0dev0
      
      --HG--
      branch : heptapod
      f1f3ff16acc1
  6. 13 Oct, 2020 2 commits
    • Georges Racinet's avatar
      Heptapod CI: upgrading hg-evolve · 9431f6af7970
      Georges Racinet authored
      While investigating some failed builds, I found that the
      HGitaly repo couldn't be updated for them (failed pull) and
      that upgrading hg-evolve fixed that, as well as the whole build.
      
      --HG--
      branch : heptapod
      9431f6af7970
    • Georges Racinet's avatar
      Heptapod CI: putting the HGitaly socket somewhere safet. · 8b67b5f59572
      Georges Racinet authored
      The `tmp/tests` gets wipped except for certain subdirectories
      by `TestEnv` during the actual run, including
      the Unix socket. The `gitaly` subdirectory is preserved, let's
      put the socket in there.
      
      I've been investigating unrelated build failures, but it's anyway
      a better idea to put that kind of trouble away (if only not to
      waste time on that hypothesis if it's not the cause)
      
      --HG--
      branch : heptapod
      8b67b5f59572
  7. 10 Oct, 2020 5 commits
    • Georges Racinet's avatar
      Heptapod CI: added failure artifacts · abbe4f4e9617
      Georges Racinet authored
      - HGitaly server log
      - full GitLab configuration
      
      --HG--
      branch : heptapod
      abbe4f4e9617
    • Georges Racinet's avatar
      HGitaly: require an explicit configuration · 9c44a27797d1
      Georges Racinet authored
      Now that we have full configuration capabilities, both in
      Omnibus and in HDK, having such magical default ports is
      more a liability than really useful.
      
      The previously introduced early validation will provide
      clear errors for those that would forget to add the configuration
      line while upgrading to Heptapod 0.17
      
      --HG--
      branch : heptapod
      9c44a27797d1
    • Georges Racinet's avatar
      HGitaly: validate URI configuration at startup · 46bdeac00618
      Georges Racinet authored
      GitLab had a validation to fail fast and loudly for
      improper Gitaly URI configurations, we're just adding
      HGitaly validation to it.
      
      --HG--
      branch : heptapod
      46bdeac00618
    • Georges Racinet's avatar
      HGitaly: forbid 'tls' URI scheme · 79b470e07c36
      Georges Racinet authored
      GitalyClient does URI scheme validation, and it already was
      applied to HGitaly connections, but it was still allowing
      the 'tls' scheme, which is not implemented by the server yet
      (see hgitaly#3)
      
      --HG--
      branch : heptapod
      79b470e07c36
    • Georges Racinet's avatar
      HGitaly/CI: Unix Domain Socket in example config · 31c530eb583a
      Georges Racinet authored
      It makes sense to advertise that HGitaly now supports
      Unix Domain Sockets (hgitaly#4).
      
      This example configuration is also used directly in CI RSpec jobs.
      
      --HG--
      branch : heptapod
      31c530eb583a
  8. 09 Oct, 2020 3 commits
    • Georges Racinet's avatar
      HGitalyRepository tests: abiding to Rubcop rule · beb091841272
      Georges Racinet authored
      `stub_const` here seems to be one that's really important, see
      https://rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration
      
      I hope we won't have at some point to rename `HGitaly` to `Hgitaly`
      everywhere because of the convention mapping class and module names
      (Pascal camel case) to file names (underscores, aka, snake case),
      but it shouldn't matter much for classes not subject to Rails autoloading
      magic such as those from `lib/`. This is probably the reason GitLab
      (official capitalization in docs and marketing content) is still
      spelled `Gitlab` as a module name.
      
      --HG--
      branch : heptapod
      beb091841272
    • Georges Racinet's avatar
      HGitalyRepository tests: generalize use of `hg_tags` · 9bb30e84768c
      Georges Racinet authored
      This was of course the goal, and it'll allow to write more
      tests about tags easily if we need to.
      
      We're keeping the import of `Popen`, although it's not used
      any more, so that we still have it on hand. In theory, this
      should be used only as a somewhat temporary shortcut.
      
      --HG--
      branch : heptapod
      9bb30e84768c
    • Georges Racinet's avatar
      HgGitRepository: low level hg_tag method · 74b64d425d85
      Georges Racinet authored
      This is for now mostly intended as a helper for tests.
      We're using one of the HGitaly tags test to make sure it works,
      and in turn that test gets simplified.
      
      There's a catch: `hg_git_repository.hg_tag` would not
      work before `subject` has been used at least once, so that the
      repository is indeed initialized on disk.
      If we were in need to use `hg_git_repository` here, we'd have
      to switch to `subject!` instead of just `subject`.
      
      --HG--
      branch : heptapod
      74b64d425d85
  9. 07 Oct, 2020 3 commits
  10. 03 Oct, 2020 7 commits
  11. 02 Oct, 2020 1 commit
    • Georges Racinet's avatar
      Heptapod CI: verbose RSpec output · 736d5195c5fb
      Georges Racinet authored
      This switches RSpec to the "documentation" format (groups and
      example names), which helps being sure that an expected test has
      really been run.
      
      --HG--
      branch : heptapod
      736d5195c5fb
  12. 28 Sep, 2020 3 commits
  13. 30 Sep, 2020 1 commit
  14. 24 Sep, 2020 2 commits
    • Georges Racinet's avatar
      Merge Requests: ability to change source branch via Web UI · 3a77d1e79440
      Georges Racinet authored
      This needs a JavaScript change, that we're performing trying to minimize
      impact (still storing the select on $this) while avoiding code duplication.
      
      We're trying to get duplication in the HAML template low, but there's only
      so much that can be done there.
      
      --HG--
      branch : heptapod-stable
      3a77d1e79440
    • Georges Racinet's avatar
      Merge Requests: allowing to change source branch, API only · 8705522bb21d
      Georges Racinet authored
      This is the inner part of #138: we have to lift the
      restrictions against the change of that column precisely,
      expose it in the API, and do the post-treatment (system note,
      cancellation of automatic merge).
      
      The diff invalidation in app/models/repository.rb was already
      taking this case into account.
      
      --HG--
      branch : heptapod-stable
      8705522bb21d