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: Handle corrupted update file #1093

Merged
merged 1 commit into from
Feb 11, 2021
Merged

fix: Handle corrupted update file #1093

merged 1 commit into from
Feb 11, 2021

Conversation

tolusha
Copy link
Collaborator

@tolusha tolusha commented Feb 11, 2021

Signed-off-by: Anatolii Bazko abazko@redhat.com

What does this PR do?

Handle corrupted update file

What issues does this PR fix or reference?

eclipse-che/che#19033

How to test this PR?

  • Create corrupted next-update-info.json in ~/.cache/chectl
  • Try to deploy Eclipse Che

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
@tolusha tolusha changed the title Handle corrupted update file fix: Handle corrupted update file Feb 11, 2021
try {
newVersionInfo = (await fs.readJson(newVersionInfoFilePath, { encoding: 'utf8' })) as NewVersionInfoData
} catch {
// file is corrupted
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you output the content of the corrupted file ?
it may help to know what is corrupted

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can put it in debug only.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But anyway, I haven't found how to change outputlevel using env variables.
So, user won't see it anyway.

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AndrienkoAleksandr, flacatus, tolusha
To complete the pull request process, please assign after the PR has been reviewed.
You can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tolusha tolusha merged commit b1d0716 into master Feb 11, 2021
@tolusha tolusha deleted the fix branch February 11, 2021 11:31
@che-bot che-bot added this to the 7.26 milestone Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants