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

Remove pyinotify dependency #3942

Closed
wants to merge 2 commits into from
Closed

Remove pyinotify dependency #3942

wants to merge 2 commits into from

Conversation

enykeev
Copy link
Member

@enykeev enykeev commented Jan 13, 2018

Resolves #3934

@Kami
Copy link
Member

Kami commented Jan 15, 2018

What's our plan for this?

Just removing this dependency without any other changes will break linux pack (file watch sensor) out of the box, so we shouldn't do that, imo.

@Kami
Copy link
Member

Kami commented Jan 15, 2018

If we want to remove it "correctly", we need to update installer scripts / package post install script to correctly create virtual environment for those packages (IIRC, we don't do that right now).

We have also been going back and forth on this for a while now - at first, core and linux packages were not part of standard installation package and they were installed from Exchange, now they are.

In theory, it shouldn't matter how those core / default packages are installed, as long as it's transparent to the end user and packages are always installed no matter what installation method user uses.

In short - I am for removing this dependency, but only if and when we found better way to mange installation of it (e.g. virtualenv creation for {core,linux} in post install or similar).

/cc @LindsayHill

@enykeev
Copy link
Member Author

enykeev commented Jan 15, 2018

Just removing this dependency without any other changes will break linux pack (file watch sensor) out of the box, so we shouldn't do that, imo.

I should have pointed out that the only reason for this PR was to check if the change triggers something in our CI process.

we need to update installer scripts / package post install script to correctly create virtual environment for those packages

yep, we need to. I don't really see why core or linux packs should be any different from other packs.

@enykeev
Copy link
Member Author

enykeev commented Jan 25, 2018

we need to update installer scripts / package post install script to correctly create virtual environment for those packages

Actually, in light of recent discussion in regards to the future of pack management, I'd say that core and linux pack should be also installed via pack management routine i.e. via API. This would ensure that venv of all the packs is in order and will allow a user to depend on a particular version of core pack if the need arise.

@arm4b
Copy link
Member

arm4b commented Jan 25, 2018

In short - I am for removing this dependency, but only if and when we found better way to mange installation of it (e.g. virtualenv creation for {core,linux} in post install or similar).
package post install script to correctly create virtual environment for those packages (IIRC, we don't do that right now)

Running st2 pack install ... during the postinst will bring a regression in deb/rpm installation itself.
Adding an external dependency pulling something dynamic like that and doing compilation on users's machine post deb/rpm install is a bad practice. Instead of that, all the external resources should be prepared during the package build stage. That's why we went from old deb/rpm and doing post-processing like pip install on users's machine to deb/rpm with dh_virtualenv with pre-installed pip dependencies and everything bundled on the build stage.
Additionally, installing a package is not idempotent and potentially could fail in any step, see #3052. Also see one of the examples StackStorm/st2-packages#453 why doing something like that in postinst is a bad practice.

yep, we need to. I don't really see why core or linux packs should be any different from other packs.

Disagree.
Having core packs located/shipped externally will add additional installation step and so complicate the story and UX.
Ideally if user has the "core" StackStorm system ready to work right after installing deb/rpm packages.

Add here air-gapped installation requirements, where users don't have immediate access to StackStorm exchange-like resources.

In short, the easy check is if it's done right: installing deb/rpm shouldn't rely on any external resource, except of deb/rpm-like dependencies and shouldn't perform any type of compilation/potentially long execution, otherwise we'll return back to era with installation issues StackStorm had before.

(BTW think about our friends who ship a product that has pack install in postinst which requires 6GB of memory for pip compilation, - that's a classic example of doing it wrong in product deployment design).

@m4dcoder
Copy link
Contributor

@enykeev @armab @Kami Can you guys resolve your differences here?

@blag
Copy link
Contributor

blag commented Jun 1, 2018

Superceded by #4145.

@Kami Kami closed this Jun 4, 2018
@arm4b arm4b deleted the feature/no-inotify branch June 4, 2018 11:51
@arm4b
Copy link
Member

arm4b commented Jun 4, 2018

👍

@blag
Copy link
Contributor

blag commented Jul 13, 2018

And #4145 was superseded by #4191.

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

Successfully merging this pull request may close these issues.

5 participants