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

(GH-371) Enable self-service mode #451

Merged

Conversation

ferventcoder
Copy link
Member

@ferventcoder ferventcoder commented Jun 12, 2017

When using self-service installs, a feature in Chocolatey for Business,
it provides a background agent that actually performs the
installations. Chocolatey itself handles passing through the proper
information to the background service so that installations can occur.
The GUI should notice the feature is switched on and adjust to allow
non-administrators to run certain commands in the GUI without
attempting to elevate.

Supersedes #382
Closes #371

@ferventcoder ferventcoder added this to the 0.15.0 milestone Jun 12, 2017
@ferventcoder ferventcoder added the Feature Issues that introduce new functionality to the project, instead of updating existing functionality label Jun 12, 2017
@ferventcoder ferventcoder force-pushed the feature/GH-371_BackgroundMode_v3 branch from a12418c to d644fd4 Compare June 12, 2017 23:23
@ferventcoder
Copy link
Member Author

There is still something not quite right here:

image

Then the connection between the GUI and the subprocess is super erratic. Is this a known issue?

@ferventcoder
Copy link
Member Author

I think I found an issue with the background service that didn't bubble up to the GUI at all.

"[Fatal] Calls to Chocolatey only are allowed. Attempted call to 'C:\vagrant\resources\ChocolateyGiu\Subprocess\ChocolateyGui.Subprocess.exe'. This has been logged for an administrator to review."

@ferventcoder
Copy link
Member Author

But that means progress!

@ferventcoder
Copy link
Member Author

I'm guessing the fatal error kills the GUI Subprocess.

@ferventcoder
Copy link
Member Author

Still getting issues with connections and this as well:

image

@ferventcoder
Copy link
Member Author

Looking at the logs it appears things are working appropriately, but something causes it to kill after about 2-3 seconds. Running it with straight choco and it completes successfully.

I wonder if it is because GUI uses net.tcp and background mode uses net.pipe and something there is incompatible?

@ferventcoder
Copy link
Member Author

No, it looks like the agent returns a message that makes the GUI think it is complete.

@ferventcoder
Copy link
Member Author

@RichiCoder1 @gep13 appveyor issues don't seem related - it's a cake error.

@RichiCoder1
Copy link
Contributor

Looks like it's just a StyleCop error: ViewModels\LocalSourceViewModel.cs(22,1): error SA1210: Using directives must be ordered alphabetically by the namespaces

That run issue is a Xaml issue (that I could have sworn we already fixed.)

@RichiCoder1
Copy link
Contributor

[Fatal] generally means an exception bubbled all the way up the host and was unhandled. So you can assume that anything with that tag was, well, fatal.

@mwallner
Copy link
Member

@RichiCoder1 I think we can merge this into develop - will create another intermediate build and do some testing - is that ok with you?

@ferventcoder
Copy link
Member Author

As long as all of the xaml is good to go, I'm happy with that - we'll change this from closes though.

@RichiCoder1
Copy link
Contributor

I suppose most all the remaining work is in Choco.Lib and the integration layer and those can be fixed in future PRs.

Copy link
Contributor

@RichiCoder1 RichiCoder1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just address the style cop errors and we should be good to go.

@ferventcoder
Copy link
Member Author

There is still some work here to be completed - like the issue with something shutting down the self-service before it completes the install

And ensuring those values do get set in source options.

@RichiCoder1
Copy link
Contributor

@ferventcoder Could you elaborate? I'm not sure I follow.

@RichiCoder1
Copy link
Contributor

Good heavens above, rebasing can go die in a fire.

@ferventcoder
Copy link
Member Author

Let me just say the rebase was especially painful the last time I did it

@ferventcoder
Copy link
Member Author

Source options like skip proxy and allow self-service are not actually saved, so I may have missed a setting somewhere. It looks like they are set, but then they are not.

@ferventcoder
Copy link
Member Author

And the self-service aspect still does not actually work for a non-admin - it dies when attempting to do the install. Not sure what causes it just yet.

@ferventcoder
Copy link
Member Author

A couple of additional clean up items on this side, but this will work perfectly once the following are released:

  • chocolatey-agent v 0.7.0
  • chocolatey.extension 1.11.0

I will add those additional items here today.

When using self-service installs, a feature in Chocolatey for Business,
it provides a background agent that actually performs the
installations. Chocolatey itself handles passing through the proper
information to the background service so that installations can occur.
The GUI should notice the feature is switched on and adjust to allow
non-administrators to run certain commands in the GUI without
attempting to elevate.

Original commit from @RichiCoder1.
ferventcoder and others added 5 commits June 26, 2017 14:44
There are errors where a connection was closed during an operation,
like when the application is being closed when running a query. Capture
those and allow the application to exit peacefully.

Original commit from @RichiCoder1.
- Added necessary UI elements
- Updated model classes with new properties
When calling into chocolatey.lib, if the Container is accessed
prior to having the configuration all set, any additonal components
that Chocolatey attempts to register will be ignored. This causes
issues with using Chocolatey and registering licensed configuration
and components. Ensure that Chocolatey does get set appropriately
by making a call to do that early in the process load.
@ferventcoder ferventcoder force-pushed the feature/GH-371_BackgroundMode_v3 branch from d644fd4 to 24a6192 Compare June 26, 2017 19:45
@RichiCoder1 RichiCoder1 self-assigned this Jun 26, 2017
@mwallner
Copy link
Member

bump @RichiCoder1 :-)

@RichiCoder1
Copy link
Contributor

I believe @ferventcoder was just wrapping up the fixes for this.

@ferventcoder
Copy link
Member Author

Was there something left for me here?

@ferventcoder
Copy link
Member Author

I know that there was an issue with saving the self-service and bypass proxy settings, but I wasn't sure what I missed.

@RichiCoder1
Copy link
Contributor

I suppose the todo items (deploy fixed version of agent and extension) are technically independent of this PR. Have we confirmed that it works w/ agent now?

@RichiCoder1
Copy link
Contributor

Once we merge, I'll do follow up PRs to make sure everything is polished.

@ferventcoder
Copy link
Member Author

I've confirmed it!

@mwallner mwallner merged commit 5f350d1 into chocolatey:develop Jun 29, 2017
@mwallner
Copy link
Member

if it blows up, you can blame me now :-)

@ferventcoder
Copy link
Member Author

I blame you ;)

@ferventcoder ferventcoder deleted the feature/GH-371_BackgroundMode_v3 branch June 29, 2017 21:10
@ferventcoder
Copy link
Member Author

This is so much win right here.

@mwallner
Copy link
Member

well see x_x - I'll hand out this version to a couple of beta-testers tomorrow ;-)

@mwallner
Copy link
Member

AppVeyor still blows up because of Cake/StyleCop .. will fix tomorrow - TeamCity is fine.

@ferventcoder
Copy link
Member Author

Did you see the only apply background service to non-admins coming in Chocolatey Licensed v1.12?

@RichiCoder1
Copy link
Contributor

Ahh, this explains that explosion I saw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issues that introduce new functionality to the project, instead of updating existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants