Skip to content

Scheduled functions use 'serviceAccount' as the invoker if provided#6858

Merged
inlined merged 3 commits intomasterfrom
inlined.scheduled-fn-invoker
Mar 13, 2024
Merged

Scheduled functions use 'serviceAccount' as the invoker if provided#6858
inlined merged 3 commits intomasterfrom
inlined.scheduled-fn-invoker

Conversation

@inlined
Copy link
Copy Markdown
Member

@inlined inlined commented Mar 8, 2024

Fix for #6814

Previously we always used the default compute service account for the calls from Cloud Scheduler to Cloud Functions. This is unnecessary, as the user will now require actAs permissions on possibly two service accounts, and can cause errors if this default compute service account has been deleted.

Now, when serviceAccount is specified on the function, it is used both as the service account the container runs as, the valid invoker for the function, and the service account Cloud Scheduler uses to invoke the function. This slightly shifts an edge case regarding which service account the Cloud Scheduler service agent must have actAs permissions over, but that IAM concern has always existed.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 54.27%. Comparing base (ede7d0b) to head (9f083f3).
Report is 492 commits behind head on master.

Files with missing lines Patch % Lines
src/deploy/functions/release/fabricator.ts 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6858      +/-   ##
==========================================
+ Coverage   54.24%   54.27%   +0.02%     
==========================================
  Files         352      352              
  Lines       24531    24534       +3     
  Branches     5079     5082       +3     
==========================================
+ Hits        13307    13315       +8     
+ Misses      10009    10006       -3     
+ Partials     1215     1213       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@inlined inlined merged commit ec1dd69 into master Mar 13, 2024
@inlined inlined deleted the inlined.scheduled-fn-invoker branch March 13, 2024 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants