<@U04S8PLJWMT> I am building a custom connector us...
# ask-ai
e
@kapa.ai I am building a custom connector using airbyte's build tooling, running this build in my gitlab pipeline with dind privileges. It fails with Build connector source-ibmi - Build source-ibmi docker image for platform(s) linux/amd64: 🚀 Start Build source-ibmi docker image for platform(s) linux/amd64 Build connector source-ibmi: Using base image docker.io/airbyte/java-connector-base:2.0.0@sha256:5a1a21c75c5e1282606de9fa539ba136520abe2fbd013058e988bb0297a9f454 from connector metadata to build connector. Build connector source-ibmi - Build source-ibmi docker image for platform(s) linux/amd64: ⏳ Still running... (duration: 30.24s) Build connector source-ibmi - Build source-ibmi docker image for platform(s) linux/amd64: ❌ failed (duration: 43.26s) Build connector source-ibmi - Build source-ibmi docker image for platform(s) linux/amd64: Failed with error: resolve: process "/airbyte/base.sh spec" did not complete successfully: exit code: 2. Is there a recommendation to fix this?
k
Based on the information in the knowledge sources, your error message:
Copy code
resolve: process "/airbyte/base.sh spec" did not complete successfully: exit code: 2
indicates that the Docker build for your custom connector failed during the execution of the
spec
command, which is used to output the connector's specification. This is a common step in Airbyte's connector build process. Possible causes and recommendations: 1. Base Image and Platform Compatibility: Ensure that the base image (
airbyte/java-connector-base:2.0.0
) is compatible with your build environment and the target platform (
linux/amd64
). If you are running in a Docker-in-Docker (dind) environment, there can sometimes be issues with platform emulation or missing dependencies. 2. Build Environment Issues: The error may be related to the build environment in your GitLab pipeline. Make sure that: - Docker is running correctly and has the necessary privileges. - The environment has access to the required base images and can pull them from Docker Hub. - There are no network or permission issues preventing the build from completing. 3. Connector Code or Metadata Issues: If your connector's code or its
metadata.yaml
is misconfigured (for example, missing required fields or referencing an incorrect base image), the
spec
command may fail. Double-check your connector's configuration and ensure it follows Airbyte's guidelines. 4. Debugging the Build Locally: It is recommended to try building the connector locally using the same commands as in your pipeline. This can help isolate whether the issue is with the code, the build tooling, or the CI environment. You can use:
Copy code
airbyte-ci connectors --name source-ibmi build
and inspect the logs for more detailed error messages. If the build works locally but not in CI, the issue is likely with the CI environment setup or permissions. 5. Docker Image Caching and Permissions: Make sure that your pipeline is not running into issues with Docker image caching or permissions. Sometimes, cleaning up old images or ensuring the correct Docker context can resolve such issues. 6. Known Issues and Workarounds: There are known issues with building connectors in certain environments, especially when using Docker-in-Docker. If you encounter persistent issues, consider searching for similar issues in the Airbyte GitHub repository or forums. For example, some users have reported needing to build base images locally or adjust their Docker setup to resolve build failures. See related discussions for troubleshooting steps and environment-specific advice [Forum Post: Unable to create dev image of an existing destination connector](https://discuss.airbyte.io/t/303). Summary: - Double-check your connector's code and metadata. - Ensure your CI environment is correctly configured for Docker builds. - Try building locally to isolate the issue. - Review Airbyte's documentation and forums for environment-specific troubleshooting steps. If you need more specific help, please provide the full build logs or any additional error output, as the knowledge sources do not contain a direct solution for this exact error scenario.