RocketChat / Apps.Github22

The ultimate AI-powered app extending Rocket.Chat for global developers collaborating on Github (2024 and beyond)
33 stars 39 forks source link

[BUG] Creating a new Gitpod workspace throws fatal dependency error #79

Closed Prince-Mendiratta closed 1 year ago

Prince-Mendiratta commented 1 year ago

Description:

Whenever you create a new Gitpod instance workspace using the Gitpod button on the README or clone the app locally and install the app on local server, it throws a dependency error.

image

Steps to reproduce:

Gitpod

  1. Go to https://github.com/RocketChat/Apps.Github22#-gitpod--
  2. Click on the "Open in Gitpod" button.
  3. Wait as the workspace initialises and the docker containers fire up.
  4. Once the dependencies are installed and the workflow tries to install the app on the server, it throws a dependency error and is unable to proceed.
  5. This error is fatal as this blocks the app from being installed on the server.

Locally

  1. Clone the repo
  2. Run rpm install.
  3. Start up the local server.
  4. Try to install the app using rc-apps deploy --url http://localhost:3000 --username <username> --password <password>.
  5. Notice that the dependency error is thrown.

Expected behavior:

App is installed successfully.

Actual behavior:

A dependency error is shown that prevents the app from being installed.

Rocket.Chat Server Setup Information:

Additional context

This bug can be fixed by adding @rocket.chat/ui-kit as a dev dependency in the package.json. If you can confirm this is indeed a valid issue, I'll send in a PR with the require changes.

cc @samad-yar-khan

samad-yar-khan commented 1 year ago

Hey @Prince-Mendiratta Sure, if adding the dependency fixes the issue, that would make it easier for other contributors to use as well. But I think there should be a workaround with Thrust. What do you think @henit-chobisa ?

Nabhag8848 commented 1 year ago

Hey @Prince-Mendiratta @samad-yar-khan this issue is due to recent changes in Apps.Engine. Now that we are using UI from fuselage and we need that dependency from v1.37.0 and later.

henit-chobisa commented 1 year ago

Hey @Prince-Mendiratta Sure, if adding the dependency fixes the issue, that would make it easier for other contributors to use as well. But I think there should be a workaround with Thrust. What do you think @henit-chobisa ?

Yes definitely, Samad Thrust just installs all the dependencies that is mentioned by our app, and then run it, inside a container. As @Nabhag8848 said, I believe there is sort of a dependency change and thrust uses the lates version of Rocket.Chat, so the dependencies of the latest version of Rocket.Chat and our app doesn't met.

I am working on dynamically customising thrust with the supported image of Apps Engine, but that will take time as I have to optimize making custom Rocket.Chat images in thrust.

But one workaround can be to specify the version of Rocket.Chat, that we know is supported.

samad-yar-khan commented 1 year ago

Hey @Prince-Mendiratta Sure, if adding the dependency fixes the issue, that would make it easier for other contributors to use as well. But I think there should be a workaround with Thrust. What do you think @henit-chobisa ?

Yes definitely, Samad Thrust just installs all the dependencies that is mentioned by our app, and then run it, inside a container. As @Nabhag8848 said, I believe there is sort of a dependency change and thrust uses the lates version of Rocket.Chat, so the dependencies of the latest version of Rocket.Chat and our app doesn't met.

I am working on dynamically customising thrust with the supported image of Apps Engine, but that will take time as I have to optimize making custom Rocket.Chat images in thrust.

But one workaround can be to specify the version of Rocket.Chat, that we know is supported.

@henit-chobisa @Prince-Mendiratta @Nabhag8848 Makes sense. Maybe we can do both, add a dependency and keep track of which versions we support.

Nabhag8848 commented 1 year ago

Hey @Prince-Mendiratta Sure, if adding the dependency fixes the issue, that would make it easier for other contributors to use as well. But I think there should be a workaround with Thrust. What do you think @henit-chobisa ?

Yes definitely, Samad Thrust just installs all the dependencies that is mentioned by our app, and then run it, inside a container. As @Nabhag8848 said, I believe there is sort of a dependency change and thrust uses the lates version of Rocket.Chat, so the dependencies of the latest version of Rocket.Chat and our app doesn't met. I am working on dynamically customising thrust with the supported image of Apps Engine, but that will take time as I have to optimize making custom Rocket.Chat images in thrust. But one workaround can be to specify the version of Rocket.Chat, that we know is supported.

@henit-chobisa @Prince-Mendiratta @Nabhag8848 Makes sense. Maybe we can do both, add a dependency and keep track of which versions we support.

Yep! there will be a lot of worked around when we need to migrate to later version from now. there are lot class & interface marked as deprecated including BlockBuilder. and now engine suggests to create instance of blockbuilder instead of using modify to getBlockBuilder for eg.

samad-yar-khan commented 1 year ago

@Nabhag8848 Can you please link the documentation which suggests these changes ? I think they must have some backward compatibility but we would eventually need to upgrade.

Nabhag8848 commented 1 year ago
samad-yar-khan commented 1 year ago

Thanks for sharing this @Nabhag8848 ! I think we should fix this issue soon. Thrust is pretty cool and will allow more contributors to experience the app. So, I am fine with both the approaches mentioned by @henit-chobisa. CC @Prince-Mendiratta

samad-yar-khan commented 1 year ago

We will eventually work towards removing deprecated code.

Prince-Mendiratta commented 1 year ago

Hi @samad-yar-khan. If I understand correctly, we just need to add @rocket.chat/ui-kit as a dependency for the fix, right? Updating the apps engine version seems like a larger endeavour to me.

samad-yar-khan commented 1 year ago

@Prince-Mendiratta yes, that should be good for us at the moment. Along with that we can be to specify the version of Rocket.Chat, that we know is supported.

Prince-Mendiratta commented 1 year ago

With the PR merged, retried opening gitpod on main and it works well now!

Thank you @samad-yar-khan @Nabhag8848 @henit-chobisa

samad-yar-khan commented 1 year ago

With the PR merged, retried opening gitpod on main and it works well now!

Thank you @samad-yar-khan @Nabhag8848 @henit-chobisa

@Prince-Mendiratta yes ! thanks for the contribution 🚀 💯