private snap recipes do not trigger on branch update
Bug #1927950 reported by
Andy Whitcroft
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Tom Wardill |
Bug Description
For a private snap recipe branch updates are not detected, and no builds are scheduled.
"The request-builds side of things is fine, but the mark-snaps-stale side of things incorrectly only considers public snaps."
Related branches
~twom/launchpad:snap-privacy-is-never-stale
Merged
into
launchpad:master
- Colin Watson (community): Approve
-
Diff: 143 lines (+43/-9)6 files modifiedlib/lp/code/model/branch.py (+4/-1)
lib/lp/code/model/gitrepository.py (+5/-1)
lib/lp/code/model/tests/test_gitrepository.py (+11/-0)
lib/lp/codehosting/scanner/tests/test_bzrsync.py (+12/-0)
lib/lp/snappy/interfaces/snap.py (+2/-2)
lib/lp/snappy/model/snap.py (+9/-5)
summary: |
- private snap recipies do not trigger on branch update + private snap recipes do not trigger on branch update |
Changed in launchpad: | |
status: | Triaged → Fix Committed |
assignee: | nobody → Tom Wardill (twom) |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
`Branch. markSnapsStale` and `GitRepository. markSnapsStale` call `SnapSet. findByBranch` and `SnapSet. findByGitReposi tory` respectively. They don't pass `visible_by_user`, which the find methods interpret as meaning that they're looking up snaps visible to an anonymous user in the web UI, i.e. only public snaps.
The usual approach is to have a `check_ permissions= True` keyword argument, and to skip the privacy filter when `check_ permissions= False` is passed.