-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Store configuration status and enable remote watch events #4647
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…er tests; remove pending state from progress if present to prevent inconsistencies; add verbose to spurious test failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but I'll admit that a lot of the nuance was lost on me...
@@ -58,6 +59,10 @@ namespace AppInstaller::CLI | |||
context << ShowSingleConfigurationSetHistory; | |||
} | |||
} | |||
else if (context.Args.Contains(Execution::Args::Type::ConfigurationStatusWatch)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we validate that this argument is not used with ConfigurationHistoryItem
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is more of a diagnostic feature, which is why I hid the argument and it uses some unlocalized strings (although they are the symbolic names of enums, so I feel less bad). If one does specify it with the history arg, it will just be ignored (for now, it could actually do the same thing but for the one set).
if (currentSiblings.Depth) | ||
{ | ||
unitStream << '|' << std::string((currentSiblings.Depth * 2) - 1, '-'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the format is like
a
b
|-b1
|---b1.1
|---b1.2
|-b2
I expected more of a tree structure rather than everything rooted at the top level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the goal was that a flat list would not need any additional characters, while child items would hopefully be clearly indicated.
OutputColumns(m_stream, "MAX(", column); | ||
m_stream << ")"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: The way the parentheses are split in these two statements feels weird... Since QualifiedColumn
has an operator<<
, this could also be m_stream << "MAX(" << column << ")";
. There is also a version of OutputColumn
that takes an Aggregate
and handles the MAX
already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is why I thought it was weird there wasn't already a method... there was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these methods are almost identical. Can we do anything to reduce the duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used some template methods to remove ~250 lines of repetitive code.
Change
This change stores ongoing status information during configuration application in the database. This data is then retrievable via the existing API surface from a set retrieved from
GetConfigurationHistory
. The data includes: configuration set state, configuration set apply start/stop times, configuration unit state, and configuration unit results.In addition, the existing events on the
ConfigurationProcessor
andConfigurationSet
are implemented to send data when appropriate. This works across processes, using named events to indicate changes and the database to carry the actual data.winget configure list
is updated to expose this information, for example:Validation
Updated tests to check for status data. Manually verified eventing.
Microsoft Reviewers: Open in CodeFlow