When a channel is present in fileUrls only use that block to look for products

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: nthomas, Assigned: njirap, Mentored)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [lang=python][good first bug])

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Split out from bug 1168780.

(In reply to Ben Hearsum [:bhearsum] from comment #5)
> (In reply to Nick Thomas [:nthomas] from comment #4)
> > (In reply to Nick Thomas [:nthomas] from comment #0)
> > >
> > > * we should consider if we shouldn't fallback if the channel is a key in
> > > fileUrls
> > 
> > Ben, what do you think of the second point ?  It seems weird to me that if
> > s{omething is missing in the beta partials block then we go and look in the *
> > block, which otherwise is for releases.
> 
> I totally agree with you, falling back to * when the channel is _explicitly_
> specified is wrong.


Possibly something like this:
diff --git a/auslib/blobs/apprelease.py b/auslib/blobs/apprelease.py
index 473da46..ddc6337 100644
--- a/auslib/blobs/apprelease.py
+++ b/auslib/blobs/apprelease.py
@@ -698,8 +701,9 @@ class UnifiedFileUrlsMixin(object):
             ]
             url = None
             for c in channels:
-                url = self.get("fileUrls", {}).get(c, {}).get(patchKey, {}).get(from_)
-                if url:
+                config_block = self.get("fileUrls", {}).get(c, {})
+                if config_block:
+                    url = config_block.get(patchKey, {}).get(from_)
                     break

We'll need some tests too.
Mentor: bhearsum
Whiteboard: [lang=python][good first bug]
(Assignee)

Updated

2 years ago
Assignee: nobody → njirap
Created attachment 8797685 [details] [review]
njira's implentation

Nick, I tagged you in the PR but I'm not sure if you pay attention to Github notifications so I'm creating this too. The patch for this is risky, and I'd appreciate a second set of eyes on it.
Attachment #8797685 - Flags: review?(nthomas)
(Reporter)

Updated

2 years ago
Attachment #8797685 - Flags: review?(nthomas) → review+

Comment 2

2 years ago
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/4f10035983a747f3bddac771c08c5dbed1dcab44
bug 1170919: Raise value error of channel not in 'fileUrls' (#138). r=bhearsum
Depends on: 1311036
This is in production. Thanks Njira!
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.