In all the Google report downloads, the auth token is for the top-level MCC for all Google accounts in the MCC (for non-MCC accounts, the auth token is for the individual account). But in sedatachecker, the auth token is for the individual Google accounts.
it looks like in Agency production we're making a new
auth token for each searchEngineUser, in addition to using the global
auth token. Is that a bug?
YELL production:
select seUserID, date from googleAuthToken order by date desc limit 30;
--------------------+
--------------------+
--------------------+
1 row in set (0.02 sec)
AGENCY production:
select seUserID, date from googleAuthToken order by date desc limit 30;
--------------------+
--------------------+
--------------------+
30 rows in set (0.03 sec)
That's coming from search engine data checker I believe. In v13 it checked tsacommon.searchEngineUsers.inTsaMcc (didn't realize googlemcc was doing this too so wasn't thinking about consistency). Then it would run a master report and an individual reports for any non-MCC users. So the most straight-forward way I saw to implement this was by not running that query and instead setting it to false for all the users, forcing each user to download an individual report.
if (!theSearchEngine.usesMasterReport(aSearchEngineUser) || (theSearchEngineUserID != null)) {
if((date != null) && (dateUtil != null))
{
ret = new SearchEngineUserWorker((Database)null, aSearchEngineUser, date, endDate, dateUtil);
}
}
else
{
Debug.debug(Debug.DUMP, "Skipping user #" + aSearchEngineUser.get(SearchEngineUserTable.ID) + "; uses master report");
}
//if null is returned, Dispatcher skips this worker
return ret;
GoogleAPISearchEngine.usesMasterReport(SearchEngineUserTableRow aSearchEngineUser):
previously returned: aSearchEngineUser.get(SearchEngineUserTable.IN_TSA_MCC).equals(Database.TRUE);
now returns false (there are no other references in the code to this method so it's safe to change that)
so this isn't a bug, just an inconsistency - sedatacheck uses individual account auth tokens; all the other google reports use master auth token