Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not build the build-info object. #781

Open
adamtenna opened this issue Jan 19, 2024 · 2 comments
Open

Could not build the build-info object. #781

adamtenna opened this issue Jan 19, 2024 · 2 comments
Labels
bug Create a report to help us improve

Comments

@adamtenna
Copy link

adamtenna commented Jan 19, 2024

Describe the bug

Task :artifactoryDeploy
Deploying build info...
Could not build the build-info object.

Task :artifactoryDeploy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':artifactoryDeploy'.
java.io.IOException: JFrog service failed. Received 400: {
    "errors" : [ {
      "status" : 400,
      "message" : "Could not insert build BuildWrapper(build=Build{version='1.0.1', name='radio-sdk-android', number='1705687499145', buildAgent=Gradle/7.4, agent=Gradle/7.4, started='2024-01-19T12:04:58.591-0600', durationMillis=153872, principal='firstlast', artifactoryPrincipal='[email protected]', artifactoryPluginVersion='Unknown', url='null', parentName='null', parentNumber='null', vcs='[]', parentBuildId='null', buildRetention=null, runParameters=null, modules=[org.jfrog.build.api.Module@f884abab], statuses=null, buildDependencies=null, issues=null}, buildRepo=artifactory-build-info)"
    } ]
  }

To Reproduce
This error happens when adding a 2nd flavor on my 2nd flavor dimension. E.g. this works:

flavorDimensions = ["visibility", "features"]
    productFlavors {
        internal {
            dimension "visibility"
        }
        external {
            dimension "visibility"
        }
        normal {
            dimension "features"
        }
    }

But this does not (added spi flavor as the only change):

flavorDimensions = ["visibility", "features"]
    productFlavors {
        internal {
            dimension "visibility"
        }
        external {
            dimension "visibility"
        }
        normal {
            dimension "features"
        }
        spi {
            dimension "features"
        }
    }

Expected behavior
Build success with no errors as happens without the spi flavor presnt.

Screenshots
N/A

Versions

  • Extractor version: 5.1.14
  • Operating system: macOS Sonoma 14.2.1
  • Artifactory Version: 4.31.0 (assuming this means my version for com.jfrog.artifactory in my plugins section)

Additional context
N/A

@adamtenna adamtenna added the bug Create a report to help us improve label Jan 19, 2024
@adamtenna
Copy link
Author

Could there be a size limit imposed by the REST API when uploading via PUT /artifactory/api/build? After adding the extra flavor, my build-info.json file goes from 66KB -> 83KB.

@adamtenna
Copy link
Author

I can reproduce the issue with a curl command for just the upload portion. So this ticket is probably better suited for the REST API team - however I can't find their repo.

Here's an example:

curl -u user:password -X PUT "https://company.jfrog.io/artifactory/api/build" -H "Content-Type: application/json" --upload-file build-info.json

The above command works for the attached working.json and fails for the attached broken.json. The only meaningful difference is the length of scopes for the broken.json. This probably means the REST endpoint is imposing some undocumented limits on the scopes array or some undocumented limit on the file-size itself.

broken.json
working.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Create a report to help us improve
Projects
None yet
Development

No branches or pull requests

1 participant