Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make respec timeouts configurable #187

Open
arnoweiss opened this issue Aug 25, 2024 · 3 comments
Open

Make respec timeouts configurable #187

arnoweiss opened this issue Aug 25, 2024 · 3 comments
Labels
feature request New feature or request

Comments

@arnoweiss
Copy link

I am trying to use this action with a respec project that makes heavy use of markdown. The transpilation into static html seems to be quite resource intensive. This causes this action to fail, see logs [1]. I'm quite sure that this because there's a timeout of 20 seconds hardcoded in this action [2].

My feature request thus is to introduce a new configuration parameter RESPEC_TIMEOUT that defaults to 20 and can be set in each workflow.

[1]

Generate Static HTML
  [INFO] Build respec document "index.html" (common)…
    $ respec -s "http://localhost:3000/index.html" -o "index.html.built.html" --verbose -t 20 -e
      [INFO] [Timeout: 20000ms] Processing resource: http://localhost:3000/index.html ...
      [INFO] [Timeout: 20000ms] Launching browser
      [INFO] [Timeout: 19203ms] Navigating to http://localhost:3000/index.html
  Error: ROR] undefined
      [INFO] [Timeout: 18884ms] Navigation complete.
      [INFO] [Timeout: 18857ms] Using ReSpec v35.1.1
      [INFO] [Timeout: 18856ms] Processing ReSpec document...
      [FATAL] Error: 
      😭  Sorry, there was an error generating the HTML. Please report this issue!
      Specification: http://localhost:3000/index.html
      ReSpec version: 35.1.1
      File a bug: https://github.com/speced/respec/
      Error: undefined
      
          at generateHTML (file:///home/runner/work/_actions/w3c/spec-prod/v2/node_modules/.pnpm/[email protected][email protected]/node_modules/respec/tools/respecDocWriter.js:233:11)
          at async toHTML (file:///home/runner/work/_actions/w3c/spec-prod/v2/node_modules/.pnpm/[email protected][email protected]/node_modules/respec/tools/respecDocWriter.js:100:18)
          at async run (file:///home/runner/work/_actions/w3c/spec-prod/v2/node_modules/.pnpm/[email protected][email protected]/node_modules/respec/tools/respec2html.js:254:38)
          at async file:///home/runner/work/_actions/w3c/spec-prod/v2/node_modules/.pnpm/[email protected][email protected]/node_modules/respec/tools/respec2html.js:215:5
    Command `respec -s "http://localhost:3000/index.html" -o "index.html.built.html" --verbose -t 20 -e` failed with exit code: 1.
  Error: Process completed with exit code 1.

[2]

await sh(`respec -s "${src}" -o "${outFile}" --verbose -t 20 ${flags}`, {

@sidvishnoi sidvishnoi added the feature request New feature or request label Aug 25, 2024
@sidvishnoi
Copy link
Member

sidvishnoi commented Aug 25, 2024

A more general way would be to pass BUILD_FLAGS which would allow passing custom parameters to either respec/bikeshed (in this case: BUILD_FLAGS: -t 30). We've the setup in place, just need to add an input.

@arnoweiss
Copy link
Author

Thanks, Sid, for picking this up. In either case, it'd be good to remove the hardcoded 20 sec timeout. I don't know how respec would behave if the -t parameter was passed twice.

@sidvishnoi
Copy link
Member

I don't know how respec would behave if the -t parameter was passed twice.

That's something I need to fix on ReSpec side (it parses it as: timeout: [20, 30])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@sidvishnoi @arnoweiss and others