Skip to content

Conversation

@alexAtSourcegraph
Copy link
Contributor

@alexAtSourcegraph alexAtSourcegraph commented Sep 23, 2024

Problem

Customer reported that batch changes are failing with the error:

running command "step.kubernetes.step.0.pre": persistentvolumeclaims is 
forbidden: User "system:serviceaccount:sourcegraph-test:sg-executor" cannot 
create resource "persistentvolumeclaims" in API group "" in the namespace 
"sourcegraph-test"

Solution

Add missing persistentvolumeclaims permissions (create/delete / get / list) that the executor needs for batch change job execution, based on customer's working role configuration.

Checklist

Test plan

@jdpleiness jdpleiness requested a review from a team April 23, 2025 13:02
@jdpleiness
Copy link
Contributor

@alexAtSourcegraph thanks for the PR! Would you mind filling in a description on what the intention of this PR is? We have some guidelines here for more info. Thanks 🙏

Copy link
Contributor

@jdpleiness jdpleiness left a comment

Choose a reason for hiding this comment

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

Just a ping on this, I'm not really sure what the context of this PR is or what it's aimed at accomplishing. See #553 (comment)

@enriquegh enriquegh force-pushed the ajb-update-executors branch from 34ccc68 to d5e8f1e Compare July 10, 2025 14:55
…to executor role

    - Re-add batch/jobs create/delete permissions that were accidentally removed
    - Add persistentvolumeclaims create/delete permissions for job workspaces
    - Right-size pod permissions to get/list/watch only
    - Fixes customer-reported "cannot create resource persistentvolumeclaims" errors
    - Resolves batch changes functionality breaking due to missing permissions
@enriquegh enriquegh changed the title Ajb update executors fix: restore missing batch/jobs permissions and add PVC permissions to executor role Jul 10, 2025
@enriquegh
Copy link
Contributor

Hey @jdpleiness sorry for the lull on this. Helping Alex with this PR.

I added some context on what the PR is trying to accomplish. One of our customer's is having an issue when creating batch changes via executors.

Let me know if you have any thoughts/questions.

@enriquegh enriquegh requested a review from jdpleiness July 10, 2025 15:28
@enriquegh
Copy link
Contributor

If curious you can see the ticket (ask for Entitle Zendesk Light Agent access)
https://sourcegraph.zendesk.com/agent/tickets/19783

Copy link
Contributor

Hey @jdpleiness sorry for the lull on this. Helping Alex with this PR.

I added some context on what the PR is trying to accomplish. One of our customer's is having an issue when creating batch changes via executors.

Let me know if you have any thoughts/questions.

Thanks for filling in the details 🙏

@enriquegh enriquegh merged commit 4031ec0 into main Jul 10, 2025
9 checks passed
@enriquegh enriquegh deleted the ajb-update-executors branch July 10, 2025 17:11
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.

4 participants