Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attachments bundles and flags not propagated on refresh? #655

Closed
leplatrem opened this issue Aug 27, 2024 · 0 comments · Fixed by #659
Closed

Attachments bundles and flags not propagated on refresh? #655

leplatrem opened this issue Aug 27, 2024 · 0 comments · Fixed by #659
Labels
bug Something isn't working

Comments

@leplatrem
Copy link
Contributor

Example on STAGE origins (not caching involved):

bundle is set on main-workspace (via permissions repo)

$ http "https://remote-settings.allizom.org/v1/buckets/main-workspace/collections/search-categorization/changeset?_expected=123456"  "Authorization: $BEARER" | jq .metadata.attachment
{
  "bundle": true,
  "enabled": true,
  "required": false
}

Latest signature was 6 days ago:

$ http "https://remote-settings.allizom.org/v1/buckets/main-workspace/collections/search-categorization/changeset?_expected=123456"  "Authorization: $BEARER" | jq .metadata.last_signature_date
"2024-08-21T00:00:13.640960+00:00"

And the flag was added on the workspace collection 3 weeks ago.

So the bundle flag should be present in the main-preview and main collections, but it's not:

$ http "https://remote-settings.allizom.org/v1/buckets/main-preview/collections/search-categorization/changeset?_expected=123456"  "Authorization: $BEARER" | jq .metadata.attachment
{
  "enabled": true,
  "required": false
}
$ http "https://remote-settings.allizom.org/v1/buckets/main/collections/search-categorization/changeset?_expected=123456"  "Authorization: $BEARER" | jq .metadata.attachment
{
  "enabled": true,
  "required": false
}

Using admin superpowers, let's trigger a signature refresh:

$ echo '{"data": {"status": "to-resign"}}' | http PATCH https://remote-settings.allizom.org/v1/buckets/main-workspace/collections/search-categorization --auth admin:$ADMINPASS_STAGE

The signature was refreshed as expected:

$ http "https://remote-settings.allizom.org/v1/buckets/main-workspace/collections/search-categorization/changeset?_expected=123456"  "Authorization: $BEARER" | jq .metadata.last_signature_date
"2024-08-27T18:19:07.910344+00:00"

But the bundle flag was not copied:

$ http "https://remote-settings.allizom.org/v1/buckets/main-preview/collections/search-categorization/changeset?_expected=123456789"  "Authorization: $BEARER" | jq .metadata.attachment
{
  "enabled": true,
  "required": false
}
$ http "https://remote-settings.allizom.org/v1/buckets/main/collections/search-categorization/changeset?_expected=123456789"  "Authorization: $BEARER" | jq .metadata.attachment
{
  "enabled": true,
  "required": false
}

This contradicts our unit tests:

self.storage.update.assert_called_with(
resource_name="collection",
object_id="destcollection",
parent_id="/buckets/destbucket",
obj={
"id": 1234,
"signature": mock.sentinel.signature,
"sort": "size",
"displayFields": ["name"],
},
)

Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant