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

Bug 1844533 - Fixes Glean ping uploading from background services in Kotlin #2551

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

travis79
Copy link
Member

When Glean attempted to schedule an upload task on the WorkManager from a background process
it would get the main-process Glean when the task was executed. Since the main-process Glean
didn't have the data directory from the background process, it would not find the ping to be
able to upload it. This changes the uploader to run on the internal Glean Dispatcher when it
is being run from a background service or process and continues to rely on WorkManager for
the main process execution.

@travis79 travis79 requested a review from badboy July 31, 2023 08:19
@travis79 travis79 force-pushed the Bug1844533v3 branch 2 times, most recently from 135e8eb to ef2874b Compare July 31, 2023 08:26
@firefoxci-taskcluster
Copy link

Uh oh! Looks like an error! Details

Client ID static/taskcluster/github does not have sufficient scopes and is missing the following scopes:

{
  "AnyOf": [
    "queue:rerun-task:glean-level-1/WPr21JSaQy-yYT1a2g-2yw/M6D_O4LGTX2cpeeEIp0Bug",
    "queue:rerun-task-in-project:none",
    {
      "AllOf": [
        "queue:rerun-task",
        "assume:scheduler-id:glean-level-1/WPr21JSaQy-yYT1a2g-2yw"
      ]
    }
  ]
}

This request requires the client to satisfy the following scope expression:

{
  "AnyOf": [
    "queue:rerun-task:glean-level-1/WPr21JSaQy-yYT1a2g-2yw/M6D_O4LGTX2cpeeEIp0Bug",
    "queue:rerun-task-in-project:none",
    {
      "AllOf": [
        "queue:rerun-task",
        "assume:scheduler-id:glean-level-1/WPr21JSaQy-yYT1a2g-2yw"
      ]
    }
  ]
}

  • method: rerunTask
  • errorCode: InsufficientScopes
  • statusCode: 403
  • time: 2023-07-31T08:52:11.338Z

@travis79 travis79 force-pushed the Bug1844533v3 branch 3 times, most recently from 8aaecdb to 66cf06c Compare July 31, 2023 09:45
@travis79 travis79 marked this pull request as ready for review July 31, 2023 09:47
@travis79 travis79 requested a review from a team as a code owner July 31, 2023 09:47
@travis79 travis79 force-pushed the Bug1844533v3 branch 4 times, most recently from 37ad64d to e607fb5 Compare July 31, 2023 14:06
Copy link
Member

@badboy badboy left a comment

Choose a reason for hiding this comment

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

Code looks good. With respect to the test see the inline comment. Maybe we can pass around the info so the test app sets the right things?

When Glean attempted to schedule an upload task on the WorkManager from a background process
it would get the main-process Glean when the task was executed. Since the main-process Glean
didn't have the data directory from the background process, it would not find the ping to be
able to upload it. This changes the uploader to run on the internal Glean Dispatcher when it
is being run from a background service or process and continues to rely on WorkManager for
the main process execution.
@travis79 travis79 enabled auto-merge (rebase) August 1, 2023 13:13
@travis79 travis79 merged commit a2f380a into main Aug 1, 2023
31 of 32 checks passed
@travis79 travis79 deleted the Bug1844533v3 branch August 1, 2023 13:19
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