Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
fix: recognition of bundle that contains no files
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtsiomCh committed May 17, 2022
1 parent c14dbf6 commit a1c51f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [2.3.3] - 2022-05
- fix: recognition of bundle that contains no files

## [2.3.2] - 2022-05
- fix: make re-try attempts for most api calls if not succeed for any reason (except 401 - auth failed)

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

group = "io.snyk.code.sdk"
archivesBaseName = "snyk-code-client"
version = "2.3.2"
version = "2.3.3"

repositories {
mavenLocal()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,8 @@ private CreateBundleResponse makeNewBundle(
new ExtendBundleWithHashRequest(request, removedFiles));
}
String newBundleId = bundleResponse.getBundleHash();
// By man: "Extending a bundle by removing all the parent bundle's files is not allowed."
// In reality new bundle returned with next bundleID:
// .../DEEPCODE_PRIVATE_BUNDLE/0000000000000000000000000000000000000000000000000000000000000000
if (newBundleId.endsWith(
"/DEEPCODE_PRIVATE_BUNDLE/0000000000000000000000000000000000000000000000000000000000000000")) {
// assigned to every bundle that contains no files
if (newBundleId.endsWith("0000000000000000000000000000000000000000000000000000000000000000")) {
newBundleId = "";
}
checkApiCallSucceed(project, bundleResponse, "Bad Create/Extend Bundle request: ");
Expand Down

0 comments on commit a1c51f3

Please sign in to comment.