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

Improve configure user experience #3158

Merged
merged 4 commits into from
Apr 17, 2023
Merged

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Apr 16, 2023

Change

This change improves the configure user experience by:

  1. Ensuring that the configuration file exists before doing any other initialization. This speeds up the time to getting the error dramatically if the file does not exist.
  2. Creating a better mechanism to report progress of async activities and using it to give the user information on what is happening during the beginning of the configure command.
  3. Adding specific error strings for every known configuration error and error source, as well as generic fallbacks.
  4. Outputting the result description in the event that it is supplied, and informing the user that there is additional information in the log file in case it is truncated or the Details property is not empty.

It also logs the entire configuration file input stream to the log in verbose, and improves the progress reporting for the pre-check of the apply flow.

The initialization phases are reported as:

  • "Initializing configuration system" while creating the server process and factory objects.
  • "Reading configuration file" while parsing the configuration file (this is usually fast enough that you won't see it).
  • "Retrieving configuration details" while we wait for the detailed information to come in about each configuration unit. This is reported repeatedly any time we are still waiting on more details.

Validation

Only minor manual validation has been done at the time of PR creation.
Automated testing should certainly be added, but we may want to forego that at this time given how poor the current UX is and the desire to get a build out for testing.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner April 16, 2023 04:44
@github-actions

This comment has been minimized.


if (messageData.ShowDescription && !description.empty())
{
constexpr size_t maximumDescriptionLines = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nice if users could configure this. Maybe just a TODO for now until we know if being able to configure would be useful

// Required Args: ConfigurationFile
// Inputs: None
// Outputs: None
void EnsureConfigurationFileExists(Execution::Context& context);
Copy link
Contributor

Choose a reason for hiding this comment

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

This name of this almost makes me think that this could be abstracted into a generic check for files existing where an enum could provide the logic of which arg to grab the path from . winget import is one that comes to mind, install/uninstall/show with --manifest, winget hash, etc. I'm surprised this isn’t genericised already. . .

Copy link
Member Author

Choose a reason for hiding this comment

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

It actually is, and I wrote it. I just didn't look hard enough to rediscover VerifyFile.

@JohnMcPMS JohnMcPMS merged commit 16fd465 into microsoft:master Apr 17, 2023
@JohnMcPMS JohnMcPMS deleted the config-ux branch April 17, 2023 21:39
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.

None yet

3 participants