Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ on:
branches: [ master, "jitaccess" ]
pull_request:
branches: [ master, "jitaccess" ]

workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ else if (GroupId.TYPE.equalsIgnoreCase(membership.getType())) {
* available in premium SKUs, and we therefore don't use
* it here.
*/
@NotNull Set<PrincipalId> expand(
public @NotNull Set<PrincipalId> expand(
@NotNull Set<PrincipalId> principals
) throws AccessException {
var groups = principals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public GoogleCredentials produceApplicationCredentials() {
//
var firestore = com.google.cloud.firestore.FirestoreOptions
.getDefaultInstance().toBuilder()
.setProjectId(runtime.projectId())
.setProjectId(runtime.projectId().id())
.setDatabaseId(configuration.slackFirestoreDatabase.get())
.setCredentials(runtime.applicationCredentials())
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CompletionException;

/**
* Proposal handler that delivers approval requests via Slack DMs instead
Expand Down Expand Up @@ -182,7 +181,7 @@ void onOperationProposed(
posted.add(new ReviewerMessage(
email, userId, message.channelId(), message.messageTs()));
}
catch (CompletionException | RuntimeException e) {
catch (RuntimeException e) {
var cause = e.getCause() != null ? e.getCause() : e;
this.logger.warn(
"slack.dm.failed",
Expand All @@ -201,7 +200,7 @@ void onOperationProposed(
try {
this.registry.record(fp.key(), posted, token.expiryTime()).join();
}
catch (CompletionException | RuntimeException e) {
catch (RuntimeException e) {
// Registry write failure is bad — siblings won't update on approval —
// but the approval can still proceed via the live DM links. Log loud.
this.logger.error(
Expand Down Expand Up @@ -251,7 +250,7 @@ void onProposalApproved(
this.slackClient.updateMessage(
entry.channelId(), entry.messageTs(), siblingBlocks, siblingFallback).join();
}
catch (CompletionException | RuntimeException e) {
catch (RuntimeException e) {
var cause = e.getCause() != null ? e.getCause() : e;
this.logger.warn(
"slack.siblingUpdate.failed",
Expand All @@ -265,7 +264,7 @@ void onProposalApproved(
try {
this.registry.delete(fp.key()).join();
}
catch (CompletionException | RuntimeException e) {
catch (RuntimeException e) {
// Best-effort; TTL will reap.
}

Expand Down Expand Up @@ -294,7 +293,7 @@ private void notifyBeneficiary(
SlackMessages.beneficiaryApproved(groupId, approverEmail),
SlackMessages.beneficiaryApprovedFallback(groupId, approverEmail)).join();
}
catch (CompletionException | RuntimeException e) {
catch (RuntimeException e) {
var cause = e.getCause() != null ? e.getCause() : e;
this.logger.warn(
"slack.beneficiaryDM.failed",
Expand Down
Loading