Skip to content

Commit

Permalink
Merge #2053
Browse files Browse the repository at this point in the history
2053: Expose 'uses_only_baseline_capabilities' field in Remote Settings (ref #2047) r=mythmon a=leplatrem

ref #2047

In order to be able to backport records (using [this new lambda feature](mozilla-services/remote-settings-lambdas#686)), the RS records must have this field!

Note that recipes will have to be republished once released and deployed.

Co-authored-by: Mathieu Leplatre <mathieu@mozilla.com>
  • Loading branch information
bors[bot] and leplatrem committed Dec 4, 2019
2 parents e7f2e78 + ec7e143 commit 80fd500
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion normandy/recipes/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ def recipe_as_record(recipe):
SignatureSerializer,
) # avoid circular imports

recipe_fields = {
**MinimalRecipeSerializer(recipe).data,
# Allow to filter retro compatible recipes in Remote Settings.
"uses_only_baseline_capabilities": recipe.uses_only_baseline_capabilities(),
}
record = {
"id": str(recipe.id),
"recipe": MinimalRecipeSerializer(recipe).data,
"recipe": recipe_fields,
"signature": SignatureSerializer(recipe.signature).data,
}
return record
Expand Down
1 change: 1 addition & 0 deletions normandy/recipes/tests/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def test_recipe_as_remotesettings_record(self, mocked_autograph):
"name": recipe.name,
"revision_id": str(recipe.revision_id),
"capabilities": Whatever(lambda caps: set(caps) == recipe.capabilities),
"uses_only_baseline_capabilities": False,
},
"signature": {
"public_key": Whatever.regex(r"[a-zA-Z0-9/+]{160}"),
Expand Down

0 comments on commit 80fd500

Please sign in to comment.