metanorma / ci

Build scripts for Metanorma, works with continuous integration
3 stars 2 forks source link

ietf related repos timeout #63

Closed CAMOBAP closed 3 years ago

CAMOBAP commented 3 years ago

Problem

For IETF related repositories:

We often see timeouts like:

Reading workgroups from https://tools.ietf.org/wg/...
bundler: failed to load command: metanorma (/Users/runner/work/mn-templates-ietf/mn-templates-ietf/vendor/bundle/ruby/3.0.0/bin/metanorma)
/Users/runner/work/mn-templates-ietf/mn-templates-ietf/vendor/bundle/ruby/3.0.0/gems/metanorma-ietf-2.3.1/lib/asciidoctor/ietf/validate.rb:48:in `initialize': No such file or directory @ rb_sysopen - https://tools.ietf.org/wg/ (Errno::ENOENT)
    from /Users/runner/work/mn-templates-ietf/mn-templates-ietf/vendor/bundle/ruby/3.0.0/gems/metanorma-ietf-2.3.1/lib/asciidoctor/ietf/validate.rb:48:in `open'
    from /Users/runner/work/mn-templates-ietf/mn-templates-ietf/vendor/bundle/ruby/3.0.0/gems/metanorma-ietf-2.3.1/lib/asciidoctor/ietf/validate.rb:48:in `cache_workgroup_ietf'
    from /Users/runner/work/mn-templates-ietf/mn-templates-ietf/vendor/bundle/ruby/3.0.0/gems/metanorma-ietf-2.3.1/lib/asciidoctor/ietf/validate.rb:75:in `block in cache_workgroup'
    from /Users/runner/work/mn-templates-ietf/mn-templates-ietf/vendor/bundle/ruby/3.0.0/gems/metanorma-ietf-2.3.1/lib/asciidoctor/ietf/validate.rb:74:in `open'
    from /Users/runner/work/mn-templates-ietf/mn-templates-ietf/vendor/bundle/ruby/3.0.0/gems/metanorma-ietf-2.3.1/lib/asciidoctor/ietf/validate.rb:74:in `cache_workgroup'
...

Proposed solution

This can be fixed by caching ~/.metanorma-ietf-workgroup-cache.json like already done here:

One cons: this IETF specific logic and it will be in all other CI configuration

FYI @ronaldtse

CAMOBAP commented 3 years ago

The good proposal was made by @ronaldtse here https://github.com/metanorma/metanorma-docker/pull/94#issuecomment-736558819

ronaldtse commented 3 years ago

@CAMOBAP this task will be handled here: