revisit `context.projects`

Open
#319 3 comments 0 reactions 1 assignee View on GitHub

@jcristau is already working on this.

Since Sep 14, 2022.

Assessment

This issue has not been assessed yet.

Description

Aiui, we:

  • updated autoland's scm level
  • started failing cot because context.projects is cached over the lifetime of a running scriptworker. We could await context.populate_projects(force=True), but we never call that from anywhere in the code.

One potential solution here is:

  • add a timestamp for when we populate context.projects, e.g. context._projects_timestamp. We should update this on the projects setter.
  • add a config item for how long to cache context.projects if force=False.
  • if we're past the TTL of the cache, update context.projects even if force=False.

Also this:

09:28 < aki> are there any outstanding cot questions? or all resolved
09:30 < tomprince> aki: All resolved, I think. I think we should consider making scriptworker use ci-admin to get the repository level, rather than having it understand the config format directly.
09:30 < aki> ok
09:30 < tomprince> aki: https://hg.mozilla.org/ci/ci-configuration/rev/745b0dce17f8 is what caused the breakage, I think.
09:33 < jlorenzo> sounds like a good fix
09:34 < aki> it's a lot more heavy weight than downloading a file, but it's doable. could we have ci-{configuration,admin} automation generate an artifact that scriptworker consumes?
09:35 < aki> that would avoid having to clone ci-{configuration,admin} everywhere we want to verify cot. i imagine we'll want to add cot verification to all artifact downloads in the graph at some point

This is the first time I know of that we've hit this issue, so this might not be super urgent. Good to address though.

Dominant language
Python
Stars
5
Forks
39
Avg merge
4h 18m
Merged PRs (30d)
6

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.

More from mozilla-releng/scriptworker

All issues in mozilla-releng/scriptworker

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.