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

permissions-center: use new permissionSyncJobs query. #942

Merged
merged 2 commits into from
Feb 21, 2023

Conversation

sashaostrikov
Copy link
Contributor

Test plan:
src snapshot test runs successfully and fetches perms sync information from a local sg instance.

Follow-up to https://github.com/sourcegraph/sourcegraph/pull/47933

Test plan:
`src snapshot test` runs successfully and fetches perms sync information from a local sg instance.
continue
}
syncCount += 1
if sync.Status == "ERROR" {
syncErrors = append(syncErrors, sync.Message)
if sync.State == "ERROR" {
Copy link
Member

Choose a reason for hiding this comment

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

sync.State == "ERROR" || sync.State == "FAILURE"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was not the part of original logic, but I agree.

@bobheadxi ping, just in case :)

Copy link
Member

Choose a reason for hiding this comment

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

+1, the FAILURE state is new IIRC so let's include it :)

if _, ok := seenProviders[key]; !ok {
seenProviders[key] = make(map[string]string)
}
// Just track one message per state for reference
seenProviders[key][p.Status] = p.Message
out.WriteLine(output.Linef(output.EmojiInfo, output.StyleBold, "%s %s %s %s", p.ProviderID, p.ProviderType, p.Message, p.Status))
Copy link
Member

Choose a reason for hiding this comment

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

Intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops, leftover debug stuff, thanks for catching!

Copy link
Member

@bobheadxi bobheadxi left a comment

Choose a reason for hiding this comment

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

thank you!!

@sashaostrikov sashaostrikov merged commit b7eb62b into main Feb 21, 2023
@sashaostrikov sashaostrikov deleted the ao/pc/use-new-perms-sync-jobs-api branch February 21, 2023 18:14
scjohns pushed a commit that referenced this pull request Apr 24, 2023
Test plan:
`src snapshot test` runs successfully and fetches perms sync information from a local sg instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants