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

fix: factory flow with a devfile that uses a parent #1320

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ export function prepareDevfile(
factoryId: string,
storageType: che.WorkspaceStorageType | undefined,
appendSuffix: boolean,
parentDevfile?: devfileApi.Devfile | undefined,
_parentDevfile?: devfileApi.Devfile | undefined,
): devfileApi.Devfile {
const devfile = cloneDeep(_devfile);
const parentDevfile = cloneDeep(_parentDevfile);
const attributes = DevfileAdapter.getAttributes(devfile);
if (
!attributes[DEVWORKSPACE_METADATA_ANNOTATION] ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,9 @@ class CreatingStepFetchDevfile extends ProgressStep<Props, State> {
return true;
}

let resolveDone = false;
try {
// start resolving the devfile
resolveDone = await this.resolveDevfile(sourceUrl);
await this.resolveDevfile(sourceUrl);
} catch (e) {
const errorMessage = common.helpers.errors.getMessage(e);
// check if it is a scheme validation error
Expand All @@ -221,9 +220,6 @@ class CreatingStepFetchDevfile extends ProgressStep<Props, State> {
}
throw e;
}
if (!resolveDone) {
return false;
}

// wait for the devfile resolving to complete
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ export async function grabLink(
return response.data;
} catch (error) {
// content may not be there
if (common.helpers.errors.includesAxiosResponse(error) && error.response?.status == 404) {
if (
(common.helpers.errors.includesAxiosResponse(error) && error.response?.status == 404) ||
error?.['code'] === 'ERR_NETWORK'
) {
return undefined;
}
throw error;
Expand Down
Loading