cloudfoundry / cloudfoundry/cf-java-client
`ApplicationManifestUtilsV3#write` is not threadsafe
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 334
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Description
The method ApplicationManifestUtilsV3#write uses a static snakeyaml Yaml dumper to write all manifests into a byte array. This operation is inheritly not threadsafe, as the deserializer is not.
This in itself may not a be problem. However, when using Applications#pushManifestv3 to push multiple Apps in parallel this can cause issues that manifest in the form of
Bad request: Manifest does not support Anchors and Aliasesorjava.lang.NullPointerException: Nodes must be provided.
Contributor guide
No contributing guide indexed for this repository
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 with ApplicationManifestUtilsV3#write and the Snakeyaml usage described in the issue, then trace calls from Applications#pushManifestv3. Reproduce parallel manifest pushes and observe the reported anchor/alias or null-pointer failures. Done means concurrent pushes complete without those errors and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100