This page lists the FAQs that are generic to Code Assembly:
Note
For additional FAQs, see:
Is Code Assembly available on all Acquia hosting environments?
No. Code Assembly is available only on Cloud Next environments.
Why can I not see an option to enable or disable Code Assembly in the user interface?
You cannot enable or disable Code Assembly from the Cloud Platform user interface during the Beta phase.
Does Code Assembly work with all versions of Drupal?
Code Assembly requires Composer as a dependency manager. Therefore, it must be used with the current Drupal version.
Can I change the PHP version of Code Assembly?
Yes, you can configure Code Assembly to use the PHP version that your application requires. For more information, see Building artifacts with Code Assembly.
How is Code Assembly different from Code Studio?
Code Assembly provides a simplified workflow, which does not require integration with a Continuous Integration (CI) tool. Code Studio provides capabilities for every stage of the software development lifecycle, and supports advanced DevOps workflows, with a testing pipeline optimized for Drupal. Ensure that you do not use Code Assembly with a CI/CD pipeline to build and deploy hosting artifacts.
How is Code Assembly different from Pipelines?
Pipelines provides a more robust CI/CD solution than Code Assembly. You must not use Code Assembly if you are already using Pipelines.
Can I switch to Code Studio if I use Code Assembly?
Yes. Both the products are designed to be interchangeable. Ensure that you disable Code Assembly before using Code Studio in your application.
Can I use Code Assembly if I use Code Studio or Pipelines?
Yes. However, the use of Code Assembly might be redundant in these cases because a CI/CD tool typically builds the hosting artifact and pushes it to the Acquia hosting repository as part of build and deploy processes.
Can I run Code Assembly on a branch that contains code and dependencies besides the recommended files?
No. Code Assembly displays a warning and stops execution.
Is there a check to ensure that Code Assembly does not run when I use a CI/CD workflow?
Yes, Code Assembly checks for a /vendor
directory and stops running when it
detects the directory.
Which Cloud Hooks run when Code Assembly executes?
If a Cloud Next environment is configured to
follow a branch that Code Assembly manages, a successful deployment into that
environment triggers the post-code-deploy
and post-code-update
Cloud
Hooks. For more information, see Automating with Cloud Hooks.
How can I enable Code Assembly?
Code Assembly is enabled for the participants of the Beta program. You cannot enable or disable it from the Cloud Platform UI during the Beta phase.
How can I fix the following user configuration errors?
In certain scenarios, Code Assembly tasks might fail to produce the hosting artifact. In such cases, task log contains details about these user application configuration issues. The following table includes all such issues and their solutions:
Error | Description | Error message | Solution |
---|---|---|---|
PHP version is not set in composer.json | You must define the PHP version in the | {"level":"ERROR",
"ts":"2023-09-22T10:05:51.644Z",
"logger":"cloud-innovation",
"caller":"[email protected]/command.go:940",
"msg":"SKIPPING BUILD: encountered an application configuration error",
"error":"unable to set version from composer.json: configuration error: PHP version is not set in composer.json"}
| To add the desired PHP version to the composer config extra.acquia.code-assembly.php_version 8.2
This command adds the following lines to the …
},
"extra": {
"acquia": {
"code-assembly.php_version": "8.2"
}
}
}
|
Branch contains a “vendor” directory | If you enable Code Assembly, and the source branch or the working
branch of a PHP application already contains a | {"level":"ERROR",
"ts":"2023-09-22T10:05:51.644Z",
"logger":"cloud-innovation",
"caller":"[email protected]/command.go:940",
"msg":"SKIPPING BUILD: encountered an application configuration error",
"error":"configuration error: hosting artifact is already pushed to this branch"}
| If you do not want to use this branch for deployments, delete the
|
Vendor directory is renamed in composer.json | For PHP applications, Code Assembly only supports | {"level":"ERROR",
"ts":"2023-09-22T10:05:51.644Z",
"logger":"cloud-innovation",
"caller":"[email protected]/command.go:940",
"msg":"SKIPPING BUILD: encountered an application configuration error",
"error":"configuration error: found '<vendorDir>' as vendor. Code Assembly expects your Composer dependencies to be located in the 'vendor' directory at the root of your codebase. Please remove the 'vendor-dir' definition from your composer.json file and try again"}
| Remove the |