Conversation
0e4285f to
186a1fc
Compare
|
@vgorkavenko To be honest i dont like this implementation because we need 2 actions to bring this feature work.
|
|
@Maunty In this implementation, it seems to me that |
adcm_client/packer/types.py
Outdated
| # choose image where to install python pkgs | ||
| # by default adcm:latest but i think this may be bad practice | ||
| # better to use adcm_min_version of bundle | ||
| image_name = kwargs.get("image", "arenadata/adcm:latest") |
There was a problem hiding this comment.
| image_name = kwargs.get("image", "arenadata/adcm:latest") | |
| image_name = kwargs.get("image", "hub.arenadata.io/adcm/adcm:latest") |
There was a problem hiding this comment.
@dgusakov I removed this variable. Using a default image instead of defined one will lead to a unpredictable result in long terms.
| "adds prepared image behaviour to bundle`s spec" | ||
| "python_mod_req proccessing function" |
There was a problem hiding this comment.
Is there any external description for this "behavior"?
If not consider extending this help
In case when we have long python_mod_req spec preprocess it whould be good to
have prepared image with all required staff intalled. Then bundle python
modules intallation step will become a copy procedure that will be much faster.
Feature is turned on by adding -i flag to adcm_sdk_pack launch.
Was refactored mechanism naming of modified image. Without -i option modified
image is always build. With it - packer try to find prepared image that
corespond to current hash of base image name and requirements.yaml, if image is
not found then it is prepared and not removed.
Example:
```yaml
- type: python_mod_req
requirements: requirements.yml
image: arenadata/adcm:2020013015
target_dir: ansible
```
Added autoescape for jinja template. To prevent expoloit code via template injection.
|
Kudos, SonarCloud Quality Gate passed!
|
In case when we have long python_mod_req spec preprocess it whould be good to
have prepared image with all required staff intalled. Then bundle python
modules intallation step will become a copy procedure that will be much faster.
Feature is turned on by adding -i flag to adcm_sdk_pack launch.
Was refactored mechanism naming of modified image. Without -i option modified
image is always build. With it - packer try to find prepared image that
corespond to current hash of base image name and requirements.yaml, if image is
not found then it is prepared and not removed.
Example: