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(sonarqube): fix data loss #4477

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

warren830
Copy link
Contributor

@warren830 warren830 commented Feb 21, 2023

Summary

  1. In mysql, the default collation is utf8mb4_general_ci is case insensitive. So when I was working on sonarqube dashboard, I found that we missed some data.
    This pr mainly add the following to mysql part in docker-compose.yml:
    command:
      --character-set-server=utf8mb4
      --collation-server=utf8mb4_bin

utf8mb4_bin is case sensitive

  1. In addition, because we need to update Sonarproject.LastAnalysisDate, we need to request apiProject whenever we want to collect data.

Does this close any open issues?

part of #2305

Screenshots

Include any relevant screenshots here.

Other Information

Any other information that is important to this PR.

@warren830 warren830 force-pushed the fix-sonarqube-data-loss branch from e8de00a to 8c655aa Compare February 21, 2023 13:34
if err != nil {
return nil, errors.Default.Wrap(err, fmt.Sprintf("fail to find project: %s", op.ProjectKey))
}
// even we have project in _tool_sonaqube_projects, we still need to collect project to update LastAnalysisDate
Copy link
Contributor

Choose a reason for hiding this comment

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

why? what column updated?

Copy link
Contributor

Choose a reason for hiding this comment

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

If the date will be updated each time, maybe we should split the model into 2 model

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but this come from the same api. Hmm, maybe we don't need to update the model, just set the value to taskData

@warren830 warren830 force-pushed the fix-sonarqube-data-loss branch from 8c655aa to 199b31c Compare February 21, 2023 13:45
@warren830 warren830 force-pushed the fix-sonarqube-data-loss branch from 199b31c to 4f55581 Compare February 21, 2023 13:47
@warren830 warren830 merged commit ec7ffff into apache:main Feb 21, 2023
@warren830 warren830 deleted the fix-sonarqube-data-loss branch February 21, 2023 14:11
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.

2 participants