ObjectStorageS3Secret field is immutable
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 88
- Forks
- 66
- Avg merge
- 53m
- Merged PRs (30d)
- 1
Description
Version
Pulp operator v1.0.0-beta.1, Image quay.io/pulp/pulp-operator@sha256:ab39229f535d6eaeaa7502e39581ba0c89319400512ac51f99ee8b905449b617
Pulp version is 3.32
Describe the bug
I was trying to update the ObjectStorageS3Secret field (or object_storage_s3_secret in json representation),
as we wanted to move to a new S3 bucket
To Reproduce
Steps to reproduce the behavior:
- Create Pulp resource with valid
object_storage_s3_secretdefined. We did so via ArgoCD, but any other means should also work - Update the
object_storage_s3_secretto a new value with another valid secret pointing to an S3 configuration and apply that change to the cluster.
Expected behavior
The secret is updated and the settings.py is re-rendered. Best case would be that the pods would get restarted to pick up the new settings.py
Actual Behavior
The following error occurs:
2023-09-25T14:50:34Z ERROR repo_manager/utils.go:177 Could not update ObjectStorageS3Secret field {"error": "ObjectStorageS3Secret field is immutable"}
Afterwards the update is reverted and ArgoCD shows the cluster state as out of sync.
Additional context
This is caused by this function. I'm not sure how exactly the logic behind the immutability works, but I think this field should not be immutable
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in controllers/repo_manager/utils.go around the function near line 158 that rejects ObjectStorageS3Secret changes. Reproduce the update with two valid S3 secrets, then trace how settings.py is rendered and determine the intended update behavior, including whether pods need restarting; add coverage for the accepted behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100