tiny-pilot / tiny-pilot/tinypilot

e2e tests fail if external license website is unreachable

Open
#1,686 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
3.5k
Forks
291
PR merge metrics
No merged PRs in 30d

Description

We have started to automatically check that license links in the <about-dialog> are valid, by resolving the link and checking the response status.

For license links that forward to an external website, this means we are depending on whether that external website is online. If an external license page is down, our e2e CI job fails and can block PRs.

For example, at the time of that writing, the git server of libwebsockets appears to be down, i.e. everything under https://libwebsockets.org/git/ is unresponsive. The URL path itself still seems valid, as it’s used for links on the libwebsockets homepage (which is up). Any e2e CI job currently fails after a 30s timeout.

Screenshot 2023-11-21 at 19 23 09

Solutions

Ideas:

  • (a) We just accept that this happens from time to time.
    • In this case, we could consider making the e2e test so that it fails immediately, without 30s timeout, and outputs clear logging to explain this corner-case.
  • (b) We stop following redirects when resolving the license links.
    • This, however, can produce false positives, because if e.g. a remote address is moved, we wouldn’t notice.
  • (c) We don’t make use of external redirects anymore, but manually copy and distribute the license copy as local file.
    • We would have to repeat this process whenever we bump a dependency version, however.

We currently rely on 10 external license URLs (in Pro).

Another aspect to consider is whether we strictly comply with legal requirements by just linking to external websites for the licenses, as we can’t ensure that they will be reachable at all times forever.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with e2e/about.spec.js around line 99 and review the linked CircleCI failure and the external license URLs. Compare the proposed redirect, local-copy, and timeout-handling approaches, including the legal concern, before agreeing on a direction. Done means the chosen behavior is implemented and external license-site outages no longer unexpectedly block e2e CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
ci-cd, testing
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.