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

Ensure declined engines don't have engine records in meta/global #1866

Merged
merged 1 commit into from Sep 25, 2019

Conversation

thomcc
Copy link
Contributor

@thomcc thomcc commented Sep 24, 2019

AFAICT desktop doesn't delete these when an engine is declined, but it does expect other clients to do so.

Something can't be right there, but this is a fix that ensures meta/global doesn't have any engine records for declined engines, which seems to be what https://searchfox.org/mozilla-central/source/services/sync/modules/stages/enginesync.js#268 expects.

It also fixes a bad log statement, and avoids logging a struct that contains sensitive data.

CC @grigoryk

@thomcc
Copy link
Contributor Author

thomcc commented Sep 24, 2019

r?markh since he might know more of the context behind what desktop actually expects...

@thomcc
Copy link
Contributor Author

thomcc commented Sep 25, 2019

Okay, I'm pretty sure the confusion is that desktop does remove things from the engines list when you decline them. I don't see where it does that, nor did it seem to when I tested earlier, but AFAICT now it does. I've manually tested this and it fixes the issue we had with 0.39.2 where desktop was re-enabliing engines declined by Fenix.

@linabutler
Copy link
Contributor

I think this might be it—if it's disabled locally, it gets removed from m/g's engines and also declined?

@thomcc
Copy link
Contributor Author

thomcc commented Sep 25, 2019

Nice catch, you're right!

Copy link
Contributor

@linabutler linabutler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

log::info!(
"Uploading new declined {:?} to meta/global with timestamp {:?}",
global.declined,
global_timestamp,
);
global.declined = result.declined.iter().cloned().collect();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, good catch on this, too!

@thomcc thomcc merged commit 69684a0 into master Sep 25, 2019
@thomcc thomcc deleted the smanager-fixes branch September 25, 2019 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants