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

Self-building of matrix-client-schildichat fails: path to webpack.config.js cannot be specified #3831

Open
luixxiul opened this issue Nov 28, 2024 · 2 comments
Labels

Comments

@luixxiul
Copy link
Collaborator

Playbook Configuration:

My vars.yml file looks like this:

matrix_client_schildichat_container_image_self_build: true
matrix_client_schildichat_container_image_self_build_repo: "https://github.com/SchildiChat/schildichat-desktop.git"
# Controls whether to patch webpack.config.js when self-building, so that building can pass on low-memory systems (< 4 GB RAM):
# - https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1357
# - https://github.com/element-hq/element-web/issues/19544
matrix_client_schildichat_container_image_self_build_low_memory_system_patch_enabled: "{{ ansible_memtotal_mb < 4096 }}"

matrix_client_schildichat_version: v1.11.86-sc.0.test.0

matrix_client_schildichat_data_path: "{{ matrix_base_data_path }}/client-schildichat"
matrix_client_schildichat_docker_src_files_path: "{{ matrix_client_schildichat_data_path }}/docker-src"

It was specified following roles/custom/matrix-client-element/defaults/main.yml as an example.

v1.11.86-sc.0.test.0 was released here: https://github.com/SchildiChat/schildichat-desktop/releases/tag/v1.11.86-sc.0.test.0

Matrix Server:

  • OS: Ubuntu 21.04
  • Architecture: amd64

Ansible:

Problem description:

I tried to self-build SchildiChat Web client based on the latest pre-release to try it out.

TASK [custom/matrix-client-schildichat : Patch webpack.config.js to support building on low-memory (<4G RAM) devices] ***
fatal: [matrix.progressiv.dev]: FAILED! => changed=false 
  msg: Destination /matrix/client-schildichat/docker-src/webpack.config.js does not exist !
  rc: 257

With the error message I changed matrix_client_schildichat_docker_src_files_path to {{ matrix_client_schildichat_data_path }}/docker-src/element-web (where webpack.config.js should exist) and ran the setup command, but it did not find /matrix/client-schildichat/docker-src/element-web/webpack.config.js because the file moved to /matrix/client-schildichat/docker-src/element-web/element-web/webpack.config.js for a reason which I do not know.

So I changed matrix_client_schildichat_docker_src_files_path to {{ matrix_client_schildichat_data_path }}/docker-src/element-web/element-web and ran the setup command again, and it failed again with the error message as below:

TASK [custom/matrix-client-schildichat : Patch webpack.config.js to support building on low-memory (<4G RAM) devices] ***
fatal: [matrix.progressiv.dev]: FAILED! => changed=false 
  msg: Destination /matrix/client-schildichat/docker-src/element-web/element-web/webpack.config.js does not exist !
  rc: 257

Any pointer to proceed with self-building would be appreciated.

Client (please complete the following information): irrelevant

Additional context
Since the repository structure of https://github.com/SchildiChat/schildichat-desktop was greatly changed, the role might need update as well, maybe?

@luixxiul luixxiul added the question This issue is a question related to installation label Nov 28, 2024
spantaleev added a commit that referenced this issue Nov 28, 2024
This is related to #3831

It:

- adds some missing variables
- version variable to branch variable conversion

While it improves the situation, it still doesn't result in a working
self-building feature, because:

- cloning a repository containing submodules requires special care,
  as described here
  (https://github.com/SchildiChat/schildichat-desktop/blob/c03ef20e5dc0a88cec479c9711d9941aba48ab97/README.md#initial-build-setup)

- we likely better clone a specific repository version from the very beginning, instead of trying to change subsequently (and having to re-initilize submodules)
  though that's very different than what we're doing elsewhere and is likely very wasteful

- we can't just build a `Dockerfile`, we need to invoke `make setup` (`./setup.sh`)

- it's likely that the `docker-src` directory is not reusable across
  versions or may require special handling to clean up files, etc.
@spantaleev
Copy link
Owner

In f19f3be I've pushed some obvious fixes.

I have also adjusted the path to the webpack.config.js file (though it was forgotten to be mentioned in the commit message).

As the commit message says, this does not result in a fixed self-building feature due to many other issues.

Fixing it will require some more work. An alternative may be to remove the self-building feature from the Schildichat role. It probably never really worked to begin with.

I also wonder if the element-web self-building feature works well still. Maybe it should be re-tested just in case and improved upon a bit.

@luixxiul luixxiul added bug and removed question This issue is a question related to installation labels Nov 28, 2024
@luixxiul
Copy link
Collaborator Author

luixxiul commented Nov 28, 2024

Thanks for checking! I tried to self-build Element Web, and it failed as you expected…

Since I am not sure what is sensitive info or not, I'll send you log via Matrix → Sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants