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

Crc setup #17

Merged
merged 4 commits into from
Mar 17, 2023
Merged

Crc setup #17

merged 4 commits into from
Mar 17, 2023

Conversation

evidolob
Copy link
Contributor

This PR call crc setup after installation. It provides basic process indication on status bar.
During setup, user will be asked for preset.

Also PR adds detection that setup should be called, so crc setup is called before vm stat.

Signed-off-by: Yevhen Vydolob <[email protected]>
Signed-off-by: Yevhen Vydolob <[email protected]>
@evidolob evidolob requested review from gbraad and anjannath March 17, 2023 07:54
Signed-off-by: Yevhen Vydolob <[email protected]>
@gbraad
Copy link
Contributor

gbraad commented Mar 17, 2023

Several issues have been recorded that have mostly been worked around: #9 (comment)

src/crc-setup.ts Outdated Show resolved Hide resolved
src/crc-setup.ts Outdated Show resolved Hide resolved
src/crc-setup.ts Outdated Show resolved Hide resolved
src/crc-setup.ts Outdated Show resolved Hide resolved
connectToCrc();
}

detectionChecks.push(...getCrcDetectionChecks(crcVersion));

// create CRC provider
const provider = extensionApi.provider.createProvider({
name: 'CRC',
name: productName,
Copy link
Contributor

@gbraad gbraad Mar 17, 2023

Choose a reason for hiding this comment

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

Perhaps we should also offer a way to map the preset name with a clear Name and Description in a single file. (Improvement issue, low prio)

statusFetchTimer = setInterval(async () => {
try {
// we don't need to update status while setup is going
if (isSetupGoing) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe indicate that setup is going? WDYT?

Copy link
Contributor Author

@evidolob evidolob Mar 17, 2023

Choose a reason for hiding this comment

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

Podman desktop doesn't have such state.
I add that, for case, when we perform setup before vm start, so user click start menu item, and we don't change extension state to starting until setup is not finished, which can take a while, so that indicate that we are starting, even if actual start is not going yet.

try {
switch (crcStatus.Preset) {
case 'podman':
return 'Podman';
case 'openshift':
return 'OpenShift';
case 'microshift':
return 'MicroShift';
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps later, when the name is 'clearer', we have to extract this into a mapping to allow these names to be changed from a single file (or perhaps even provided from an API). Not to be changed now.

src/install/win-install.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@gbraad gbraad left a comment

Choose a reason for hiding this comment

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

Minor textual changes.

Signed-off-by: Yevhen Vydolob <[email protected]>
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.

3 participants