Code Monkey home page Code Monkey logo

chef-workstation-app's Introduction

Chef Workstation Tray Application

Umbrella Project: Workstation

This the the tray application for Chef Workstation. It's written in Electron and is where we implement the UI based features of Chef Workstation.

Development

Development Prerequisites

On macOS

brew install node@16
asdf install

On Windows

Download NodeJS LTS

Running the Dev Environment

npm install
npm start

Design

Designs and assets can be found in our Zeplin project.

chef-workstation-app's People

Contributors

ashiqueps avatar chef-ci avatar chef-expeditor[bot] avatar clintoncwolfe avatar dependabot-preview[bot] avatar dependabot[bot] avatar i5pranay93 avatar jonsmorrow avatar kasif-adnan avatar marcparadise avatar nikhil2611 avatar robbkidd avatar sanjain-progress avatar shadae avatar skeshari12 avatar susanev avatar tas50 avatar tduffield avatar tyler-ball avatar vkarve-chef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chef-workstation-app's Issues

Remove unused locale files

We ship about 5 megs of electron locale files that we don't use because we don't actually support non-EN locales. We should remove these files post build but pre sign.

Allow skipping the current version update

If we want to be more aggressive with prompting the user to install new updates we also need to give them a way to opt out of installing the current release.

Acceptance Criteria

  • When the application prompts the user to update they should be able to download the update or skip the particular version. The application will track the version skipped and prompt again when a newer version is available.

Launch Chef Workstation App post install on macOS

As we move into a world where the Workstation app is a key part of the Workstation app we need to make sure it's launched post install.

Acceptance Critieria

  • Workstation app launches after an interactive installation
  • Workstation app launches after a command line installation like one via homebrew

Package Chef Workstation app for Apple M1

For Chef Workstation to support Apple M1, the Workstation app needs to be built for this architecture.

Describe the problem

If we don't have the workstation app when Chef Workstation is installed on Apple M1, users will miss out on the upcoming UI features and current ability to detect available updates.

Software Version

Apple M1 - ARM 64-bit

Possible Solution

Need to update the Omnibus / Expeditor based configurations and scripts to build ws-app on M1. e.g.

  1. release.pipeline.yml
  2. build_darwin.sh

Workstation tray icon not appearing on Linux

When launching the latest stable Workstation tray app on linux, the icon does not show up in the tray. Pop-up dialogs (notifications, errors) still render.

I've tried this on arch linux and ubuntu 18.04.

Install Chef Workstation updates when available

Description

Currently (20.6) when a new Chef Workstation update is available the tray app notifies users and links them to the downloads site in a browser. Instead, we would like the notification to give users the option to update in place. If they select 'yes' the tray application would download the new version of Chef Workstation, and run the installer

Questions

Lets work with the UX team to answer these questions

  1. Would we run the installer in a silent / background mode?
  2. How would we communicate installer failures to the user?
  3. What do we do if the user chooses to not install an available update?

Chef Workstation app runs post install & at boot

To increase the usage of the Chef Workstation App we need to make sure that it runs post-install and it continues to run at boot. This increases the likelihood that users will upgrade and also allows us to expand the preferences and profile management functionality in the future with the knowledge that the app will be running for users.

Update interval loop broken

The Update Interval has been broken, this interval checks for new updates
in X amount of time, the default interval is every 8 hours but you can customize it
with the user config file at ~/.chef-workstation/config.toml with the content:

[updates]
interval_minutes = 1

The error message we have is the following:
image

Reported by @tas50

Release notes link does not work when subscribed to 'current' channel

Describe the problem

Clicking on the link will always take users to a 404 page because we do not generate release notes until we perform the stable channel release.

Software Version

Chef Workstation 0.15.18

Replication Case

Subscribe to current channel
Download and install latest current channel Chef Workstation
Restart the CW app, open the about page and click the 'Release Notes' link

Possible Solution

Users suggested a couple of possible solutions:

  • Grey out 'release notes' if the user is subscribed to the current channel
  • Change the link to take users to the current Changelog if they are subscribed to the current channel (and change the link name from 'Release Notes' to 'Current Changelog')

Workstation app set to run at boot on macOS

The Workstation app is a key part of the overall experience for macOS users. We need to make sure this runs at boot

Acceptance Criteria

  • Post-install the Chef Workstation App is set to launch at boot for the current user (not system wide)

Menu bar hover over displays the wrong version when an update is available

If you have an update available and you hover over the toolbar the wrong version is presented. This tooltip should present the version that is available, but it's presenting the version that is currently installed.

image

This happens because the non-update hover over behavior shows the current installed version:

image

We need to clarify this message. It should probably say

"21.3.whatever update available" on the second line

Workstation crashes hard if the installation in /opt is removed

If you delete the installation from /opt, and the menu bar app then launches it crashes in a very unpleasant way. First you get a random stacktrace error message, and then you every click to the menu bar does nothing. The only way to actually quit it is to find it in the activity monitor and kill the process.

screen shot 2018-10-29 at 4 55 54 pm

Feature flag setting in Workstation Tray app - UX designs

UX mockups needed for new settings within the Workstation tray app to turn feature flags on/off.

Summary
Feature flags are used to hide and unhide experimental/pre-release features in Workstation. Note - feature flags can also be set via a config file in the CLI

Assumptions/Limitations

  • Legal disclosure needs to be shown to user when turning feature flags on to indicate the function is not under warranty
  • Legal approval required for final design in terms of how the disclosure is displayed

Requirements

  • User should see all available features that can be turned on or off
  • User should have some controller to turn feature flags on and off
  • User should be shown some info on what the feature flag is for and where it takes effect

Additional thoughts

  • Would be nice if the feature flags themselves can be grouped separately from the legal disclosure (e.g. in some kind of container or some type of separation. The goal would be to visually separate the legal stuff from the feature flags and make it easier to understand what's shown to the user)

"Check for Updates..." Error

Describe the problem

"Check for Updates..." Error - Update Check Failed - Error: unable to get local issuer certificate

After a default installation of the Chef Workstation, checking for updates fails. Proxy server is in play, and the root CA is present in the <install_dir>\chef-workstation\embedded\ssl\cacert.pem file. I am unable to determine if another certificate store must be modified to support the proxy for the update functionality.

OS: Windows 10 1909

About Chef Workstation

Chef Workstation Update Error

Software Version

21.5.420

Replication Case

Stacktrace

None Available

Possible Solution

A JavaScript error occurred in the main process while opening workstation app

Describe the problem

When trying to start the workstation app GUI on macOS, it shows this window and can't be removed from view:

Screenshot 2021-02-09 at 11 45 35 PM

Expected: Workstation GUI is shown.

Software Version

Chef Workstation version: 20.11.180
Operating system: macOS 10.15.5, Windows 10 Pro

Replication Case

The profile that it is unable to find was added manually to ~/.chef/credentials, used to upload policies, and then removed after it was no longer required. But knife was never reconfigured to use a different profile using the knife config use-profile command.

Stacktrace

From the window:

at checkExecSyncError (child_process.js:630:11)
    at execFileSync (child_process.js:648:15)
    at func (electron/js2c/asar.js:140:31)
    at queryOhai (/Applications/Chef Workstation App.app/Contents/Resources/app.asar/src/helpers/chef_workstation.js:195:16)
    at Object.getPlatformInfo (/Applications/Chef Workstation App.app/Contents/Resources/app.asar/src/helpers/chef_workstation.js:177:12)
    at new OmnitruckUpdateChecker (/Applications/Chef Workstation App.app/Contents/Resources/app.asar/src/omnitruck-update-checker/omnitruck-update-checker.js:14:41)
    at new Main (/Applications/Chef Workstation App.app/Contents/Resources/app.asar/src/main.js:15:39)
    at Object.<anonymous> (/Applications/Chef Workstation App.app/Contents/Resources/app.asar/src/app.js:4:1)
    at Module._compile (internal/modules/cjs/loader.js:967:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10)

Update the UI in the about page

Marketing would like us to use the official Chef logo here and not our minimized version. We should use the official one.

Chef Workstation App should have a splash screen

Description

The "Chef Workstation App" (on macOS at least) should have a splash screen or animation to show that it is in the menu bar.

Note: It shouldn't do this animation if started automatically on booting.

Reasoning:

I just spent a bunch of time uninstalling and re-installing Chef Workstation because I thought the Chef Workstation App was broken. I didn't realize that it only a (simple) menu app.

Chef Workstation Version

0.2.41

Platform Version

macOS 10.14.1

Package details link goes to a placeholder file

From the about dialog if you click on Package Details you're taken to a page with this content:

This is a placeholder file. Eventually it will be used to tell customers information about the packages bundled with Chef Workstation.

Support darkmode throughout the UI

Describe the problem

Our app does not respect darkmode on systems which makes it look out of place. With macOS Catalina out a lot of users are going to have darkmode enabled. We need to properly handle this so our app looks native on those systems.

Software Version

Chef Workstation 0.10

Replication Case

Switch the system to darkmode. Check the menubar icon and the UI windows.

Screen Shot 2019-10-23 at 10 46 46 AM

Screen Shot 2019-10-23 at 10 46 35 AM

Screen Shot 2019-10-23 at 10 46 27 AM

Workstation app update check pops up an error when connection times out

Description

When the Chef Workstation app attempts to connect to Fastly for the update check and times out - for example connections to Fastly CDN are blocked on a customer's network - the following popup appears.

chef_ws_update_timeouts

This is less than delightful as the user is unable to do anything about that. Auto-update checks should fail silently, or perhaps report the date of the last successful update check in the "About Chef Workstation" dialog instead.

Chef Workstation Version

0.16.33

Platform Version

Windows 10

Download new Workstation releases within the app

Currently, the application just launches the web browser to download the updater file. Instead of launching a browser, we should download the installer within the app with a progress dialog. This would still download to the user's download directory (macOS/Windows) and we'd allow the user to launch the file when the download is complete. Overall this should behavior similar to what we'd get if we used Sparkle on the macOS.

Acceptance Criteria

  • When the user selects download update a progress bar is shown
  • File is downloaded to expected downloads directory
  • File can be launched directly from the UI

At launch prompt to update instead of just using the toolbar icon

The update notification via the toolbar icon is far too subtle. When the application launches we should prompt the user with a dialog to update.

Acceptance Criteria

  • Launching an outdated version of the Workstation App should prompt the user to download the update

Display release notes in the update notification

Instead of just telling the user a new version is available we should tell them what's new in the release we'd like them to install. This gives them an incentive to update and also lets folks know that we're delivering new value as a company.

Acceptance Criteria

  • When the application prompts for an update it includes the full release notes from the current version embedded in the window.

Improved update checking behavior

The current auto-update behavior is fairly basic and needs to be enhanced to improve the number of users that upgrade to the latest release.

Current Behavior

  • At launch and periodically the application checks for updates
  • The tray application changes the icon when an update is available
  • Menu bar has "Download Update" entry which launches web browser to download the app

Desired Behavior

  • At launch and periodically the application checks for updates
  • The application presents a dialog alerting the user to a new version along with release notes
  • The user can select skip this version or update
  • Update downloads the version with a progress bar in the window and launches the installer

Workstation App should handle initial setup of configuration

One of our goals for the Workstation project is to remove manual setup tasks so that Workstation can be setup without engagement from field teams or the need to review our docs. A user should just install Workstation and end up with a working system that talks to a chef server.

Current manual tasks

  1. If you have nothing at all setup you need to make sure to install Chef Infra Server, create your org, and create a user
  2. On Linux / macOS you need to decide if you wish to use the embedded Ruby or modify your shell's path to include /opt/chef/workstation/
  3. Take the pem file your admin provided you with and copy it to .chef/whatever.pem, making sure to set the correct permissions
  4. Edit the ~/.chef/credentials file to look something like this:
[default]
client_name = 'tas50'
client_key = '/Users/tsmith/.chef/tas50.pem'
chef_server_url = "https://api.chef.io/organizations/tim_smith"
  1. Validate you can communicate with the server and optionally run knife ssl fetch to grab a self signed cert

Where We Want to Be

At the first launch of the chef-workstation-app we currently create the ~/.chef dir and drop in place a sample credential file that helps the user to manually configure the system. Instead when the workstation app launches if there isn't a .chef directory already it should assume tis is a new install and walk you through the setup in a wizard-like fashion. At the end, you should have a fully working Workstation installation that's ready to issue chef or knife commands.

Definition of Done

  • After setup wizard experience the user can issue a command like knife status successfully
  • Documentation is updated with this new getting start process

Improved update checking behavior

The current auto-update behavior is fairly basic and needs to be enhanced to improve the number of users that upgrade to the latest release.

Current Behavior

  • At launch and periodically the application checks for updates
  • The tray application changes the icon when an update is available
  • Menu bar has "Download Update" entry which launches web browser to download the app

Desired Behavior

  • At launch and periodically the application checks for updates
  • The application presents a dialog alerting the user to a new version along with release notes
  • The user can select skip this version or update
  • Update downloads the version with a progress bar in the window
  • Application silently runs the installer

The menu bar icon needs a dark mode version

Describe the problem

You can't see the menu bar icon in dark mode and it doesn't match the icons of other apps in the menu bar

Software Version

0.10

Replication Case

Launch the menu bar when your mac is in dark mode

Possible Solution

Get a white version of the icon and see if Electron surfaces dark mode

New version is missing in the Update Available dialog

Platform:
macOS 10.14.1

Version:
Chef Workstation 0.2.29

After switching to the "current" channel,and verifying that the downloads site showed new versions of the software to install I tried the "Check for update" functionality in the Chef Workstation App.

I received a message:

"is the latest current release, you have 0.2.29"

I expected to see:

"0.2.32 is the latest current release, you have 0.2.29"

The download does proceed as normal, so hopefully this is a simple fix to the dialog.

image

Popup error when behind a VPN

Describe the problem

image

Customer reported seeing this error box when trying to start Chef Workstation App. I believe this is similar to #180 but results from some kind of proxy intercepting the SSL request and inserting its (unknown by CWA) certificate in the chain.

If there is a networking error we cannot handle like this or like in #180 we should show an error from within the app, not from a popup box.

Ideally, showing the error in the tray app would also include a button to submit an error containing the captured stacktrace.

Software Version

Windows machine, 0.17 Chef Workstation

Replication Case

Need to find this...

Stacktrace

Need to find this...

Update Electron from 9.x to 11.x

Electron 9.x will eventually be unsupported and we need to make sure we're running a current release. At the moment when you upgrade Electron to 11 the app fails to launch.

Remember "Start on system startup" setting and follow preference on upgrades

I have the preference set to not launch on System Startup. I, personally, do not ever want the Workstation App to execute because I'm only installing it for the cli interface.

Describe the problem

Upon reinstall/upgrade, the startup preference is ignored and the Workstation App is launched and added to the System Tray

Software Version

macOS 11 (or 12)
Homebrew, though this seems irrelevant since the install is a .pkg file.

Chef Workstation version: 21.8.555
Chef Infra Client version: 17.3.48
Chef InSpec version: 4.38.9
Chef CLI version: 5.4.1
Chef Habitat version: 1.6.351
Test Kitchen version: 3.0.0
Cookstyle version: 7.15.4

Replication Case

  1. Install Chef Workstation
  2. Disable the "Start Workstation App on system startup" option
  3. Exit app
  4. Reinstall/upgrade Chef Workstation

The workstation app is launched both during the upgrade process and continuously after rebooting/logging in to the system.

io.chef.chef-workstation.app.plist is re-added to ~/Library/LaunchAgents with

	<key>RunAtLoad</key>
	<true/>

Opening the workstation app correctly displays that the preference is set to off, but it opens anyway. Toggling the preference on or off in the Workstation App preferences pane does not modify the setting stored in the plist, so it's not clear where the preference is being stored.

The presence of the plist file is what is triggering the app to load on startup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.