Skip to content
Snippets Groups Projects

GitLab-CI support

Merged Gabriel Mazetto requested to merge gitlab-ci into master

What was done:

  • Converted .travis-ci.yml to the equivalent in .gitlab-ci.yml and added additional rubies.
  • JRuby support is removed as we don't use and a dependent gem removed the support for it: https://github.com/jgarber/redcloth/issues/31#issuecomment-252954871
  • Fixed README.pod fixture to use a valid markup
  • Fixed README.pod.html to include updated expected render.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Maintainer

    Current build status:

    19 runs, 48 assertions, 7 failures, 0 errors, 0 skips

    This is using unmodified code from original repository that builds correctly in travis: https://travis-ci.org/github/markup/builds/146697156

    I tried to debug it locally using this Dockerfile to generate a similar environment that our CI was running in:

    FROM ruby:2.3
    RUN apt update && apt install python-pip -y && apt-get clean
    RUN pip install docutils
    VOLUME /github-markup
    WORKDIR /github-markup
    COPY . /github-markup
    RUN bundle install --jobs=4

    I was able to replicate the issue, but not find any workaround. This is the assumptions I tried:

    • rvm ruby had different patches than the one in dockerized ruby:2.1 / 2.2 / 2.3 etc, this could be anything like default encodings (as some tests seems related to existance or lack of newlines).
    • different docutils version (I tried 0.11 and 0.12, with same results).

    So the next assumption is Debian vs Ubuntu (as ruby:<version> images use debian as a base).

    I tried with this Dockerfile to simulate the CI and have a close to travis environment:

    FROM ubuntu:xenial
    RUN apt update && apt install python-pip curl git -y && apt-get clean
    RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
    RUN \curl -sSL https://get.rvm.io | bash -s stable
    RUN pip install docutils
    RUN export PATH=$PATH:/usr/local/rvm/bin
    RUN /bin/bash --login -c "rvm install 2.2.5"
    RUN /bin/bash --login -c "rvm use 2.2.5 --default && gem install bundler"
    ENTRYPOINT /bin/bash --login
    VOLUME /github-markup
    WORKDIR /github-markup
    COPY . /github-markup
    RUN /bin/bash --login -c "bundle install --jobs=4"

    Got same results.

    Edited by Gabriel Mazetto
  • Gabriel Mazetto Added 1 commit:

    Added 1 commit:

  • Author Maintainer

    with d7d1b96a, I defined an UNICODE locale, which improved the specs to just a single failure (on my docker simulated environment):

      1) Failure:
    MarkupTest#test_pod [/github-markup/test/markup_test.rb:72]:
    README.pod.html's contents are not html equal to output:
    --- -	2016-10-11 01:59:55.356298480 +0000
    +++ test/markups/README.pod.html	2016-08-24 13:39:21.000000000 +0000
    @@ -1,14 +1,14 @@
     <a name="___top"></a>
    
    -<h1><a name="Matrixy">Matrixy</a></h1>
    +<h1><a href="#___top" title="click to go to top of document" name="Matrixy">Matrixy</a></h1>
    
    -<h2><a name="INTRODUCTION">INTRODUCTION</a></h2>
    +<h2><a href="#___top" title="click to go to top of document" name="INTRODUCTION">INTRODUCTION</a></h2>
    
     <p>This is a port of the MATLAB/Octave programming language to Parrot.
     See the ROADMAP file for more information on the status of this project,
     and what else needs to be done.</p>
    
    -<h2><a name="ABOUT">ABOUT</a></h2>
    +<h2><a href="#___top" title="click to go to top of document" name="ABOUT">ABOUT</a></h2>
    
     <p>Primary goals are:</p>
    
    @@ -16,7 +16,7 @@
     <p>=item* Create a working compiler that understands the majority of the MATLAB/Octave programming language.</p>
     </blockquote>
    
    -<h2><a name="IMPLEMENTATION">IMPLEMENTATION</a></h2>
     </blockquote>
    
    -<h2><a name="DEPENDENCIES">DEPENDENCIES</a></h2>
    +<h2><a href="#___top" title="click to go to top of document" name="DEPENDENCIES">DEPENDENCIES</a></h2>
    
     <p>Matrixy depends on these dependencies:</p>
    
    -<h3><a name="Parrot">Parrot</a></h3>
    +<h3><a href="#___top" title="click to go to top of document" name="Parrot">Parrot</a></h3>
    
     <p>To get a proper version of Parrot to build Matrixy,
     you will need to check out and build Parrot from source:</p>
    @@ -57,28 +57,28 @@
         perl Configure.pl
         make &amp;&amp; make test &amp;&amp; make install-dev</pre>
    
    -<h3><a name="Parrot-Linear-Algebra">Parrot-Linear-Algebra</a></h3>
    +<h3><a href="#___top" title="click to go to top of document" name="Parrot-Linear-Algebra">Parrot-Linear-Algebra</a></h3>
    
     <p>The linear algebra package for Parrot is available separately and provides functionality required by Matrixy. This includes matrix data types and matrix manipulation libraries</p>
    
    -<h2><a name="BUILDING">BUILDING</a></h2>
    +<h2><a href="#___top" title="click to go to top of document" name="BUILDING">BUILDING</a></h2>
    
     <p>Once all dependencies are in place, you can build Matrixy using this sequence of commands:</p>
    
     <pre>    perl Configure.pl
         nmake test</pre>
    
    -<h2><a name="TODO">TODO</a></h2>
    +<h2><a href="#___top" title="click to go to top of document" name="TODO">TODO</a></h2>
    
     <pre>    * Parser
         * Standard Builtins
         * Test against Octave Test Suite.</pre>
    
    -<h2><a name="BUGS">BUGS</a></h2>
    +<h2><a href="#___top" title="click to go to top of document" name="BUGS">BUGS</a></h2>
    
     <p>Lots!</p>
    
    -<h2><a name="CONTACT">CONTACT</a></h2>
    +<h2><a href="#___top" title="click to go to top of document" name="CONTACT">CONTACT</a></h2>
    
     <p>If you need to contact the Matrixy team, go to the project home page at:</p>
    
    
    
    
    19 runs, 48 assertions, 1 failures, 0 errors, 0 skips

    This could also be related to incorrect versions being used during the tests or something that still needs to be uncovered.

    @marin I'm blocked here by this error and to continue I will need to dig deeper and debug more... but as having the gem released and the other parts around will deliver more value I think this should became a technical debt that we try to address in the future.

    Edited by Gabriel Mazetto
  • Gabriel Mazetto Added 1 commit:

    Added 1 commit:

    • a0d0338c - Fix JRuby environment with required packages
  • Gabriel Mazetto Added 1 commit:

    Added 1 commit:

    • c565d1c2 - Fix JRuby environment with required packages
  • @brodock Could you try to use the same version of python like we ship in the package? It should be a quick enough test, boot up and image and in the before_script compile python 3.

    We cannot ship gem in our codebase with failing specs, @dzaporozhets knows where we live :)

  • @brodock Also, I though we were naming this gem differently https://gitlab.com/gitlab-org/gitlab-ce/issues/21696#note_16655756 ?

  • Author Maintainer

    @marin we are, this repo was created earlier, I will rename it.

  • Ah ok!

  • Author Maintainer

    It's not a python issue, as the failing spec is for a .pod file (which is related to perl). I saw a few PRs in the upstream repo related to that file, so I will check them first to see if anyone have a fix.

  • Author Maintainer

    I'm trying out this PR: https://github.com/github/markup/pull/241/files to see if it fixes the specs in our environment.

  • Author Maintainer

    Interesting stuff, we don't render .pod files in current GitLab. So fixing this will enable us to render .pod correctly. See as an example of not rendered file: https://gitlab.com/brodock/github-markup/blob/master/test/markups/README.pod

  • Author Maintainer

    lib/gitlab/markup_helper.rb:

        def markup?(filename)
          gitlab_markdown?(filename) ||
            asciidoc?(filename) ||
            filename.downcase.end_with?(*%w(.textile .rdoc .org .creole .wiki
                                            .mediawiki .rst))
        end

    This file excludes .pod as a known markup. If we want to enable it in GitLab we have to make sure (after the omnibus part) we add .pod to this list.

  • Gabriel Mazetto Added 3 commits:

    Added 3 commits:

    • a3e03072 - Redcloth doesn't support jruby in 4.3 and so we can't support it anyway
    • e422d01a - Fix .pod specs
    • 37dcc640 - Update Gemfile dependencies to match current version in gitlab
  • Author Maintainer

    I took a different route (the mentioned PR have some major changes and isn't finished yet (contains conflicts etc), so I updated the specs to match an updated version of the library render.

    This does not affect GitLab at all because .pod files are not being rendered anyway (see explanation above).

  • Gabriel Mazetto Unmarked this merge request as a Work In Progress

    Unmarked this merge request as a Work In Progress

  • Reassigned to @marin

  • Gabriel Mazetto Added 1 commit:

    Added 1 commit:

    • e50c3958 - We don't need build-essentials anymore as we don't support Jruby
  • Gabriel Mazetto Mentioned in merge request !2 (merged)

    Mentioned in merge request !2 (merged)

  • Marin Jankovski Status changed to merged

    Status changed to merged

  • Marin Jankovski Mentioned in commit 25b13a63

    Mentioned in commit 25b13a63

  • Robert Speicher Mentioned in commit 5a287084

    Mentioned in commit 5a287084

  • We cannot ship gem in our codebase with failing specs

    @marin perfect! thanks!

Please register or sign in to reply
Loading