Skip to content

triagebot.toml caching is troublesome #1875

Open
@ehuss

Description

@ehuss

triagebot.toml is cached fairly aggressively. This can cause difficulty, particularly during development. When updating the file, it can take a long time for that update to be reflected.

There are two aspects to this:

  1. triagebot caches the file for at least two minutes. This cannot be overridden. The only way to stop this is to restart the server.
  2. GitHub's https://raw.githubusercontent.com/ endpoint seems to cache for several minutes, too. I do not understand how that caching works, or if there is some header we need to set to fix that. In my investigation, I found odd behavior where triagebot would receive the old content, but running curl on the command-line would get the new content, which was very confusing.

Some random thoughts:

  • Can triagebot invalidate its own internal cache when it gets a webhook indicating that triagebot.toml has been updated? I believe we can get this list of files from the PushEvent commit list (there are limits, but shouldn't be an issue here).
  • Are there headers we can include to https://raw.githubusercontent.com/ to bust its cache? Or is there an alternate endpoint for getting the raw file that doesn't have this behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions