fix(jenkins): additional process to avoid panic#3758
Merged
likyh merged 1 commit intoapache:release-v0.14from Nov 18, 2022
Merged
fix(jenkins): additional process to avoid panic#3758likyh merged 1 commit intoapache:release-v0.14from
likyh merged 1 commit intoapache:release-v0.14from
Conversation
likyh
reviewed
Nov 18, 2022
likyh
reviewed
Nov 18, 2022
likyh
reviewed
Nov 18, 2022
| dataflowTester.FlushTabler(&models.JenkinsStage{}) | ||
| dataflowTester.ImportCsvIntoTabler("./raw_tables/_tool_jenkins_stages.csv", &models.JenkinsStage{}) | ||
|
|
||
| dataflowTester.Subtask(tasks.ExtractApiBuildsMeta, taskData) |
Contributor
There was a problem hiding this comment.
add some test data in e2e test to cover the logic about JenkinsBuild. HasStages
8b50336 to
1fbfdc5
Compare
1fbfdc5 to
58efd26
Compare
likyh
approved these changes
Nov 18, 2022
Contributor
likyh
left a comment
There was a problem hiding this comment.
CSV is so difficult to understand. Have a try.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
According to issue#3757, user met the error which related to line 67 in subtask
enrichApiBuildWithStagesI checked the code of that line
build.JobName = strings.TrimSpace(str[0]), I can only assume the error was caused bystr[0]which means len(str) = 0.To avoid this panic, I tried to add some check to avoid panic by the following situations:
Does this close any open issues?
Relates to #3757
Screenshots
Include any relevant screenshots here.
Other Information
Any other information that is important to this PR.