Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

SQ Official Doc Link: https://docs.sonarqube.org/display/SONAR/HistoryManaging+andProject+EventsHistory



Panel
borderColor#888888#C3CCD7
bgColortitle#FCFCFC

Table of Contents

Table of Contents
indent16px

Introduction

One of the most powerful features of SonarQube is that it shows you not just your project health today, but how it has changed over time. It does that by selectively keeping data from previous analyses. It doesn't keep all previous analyses - that would bloat the database. Similarly, for the analyses it does keep, SonarQube doesn't keep all the data. Once a project snapshot moves from the "Last analysis" (i.e. the most recent) to being part of the project's history, data below the project level is purged - again to keep from bloating the database.

Typically these aren't things you need to even think about; SonarQube just handles them for you. But occasionally you may need to remove a bad snapshot from a project's history or change the housekeeping algorithms. 

Events

There are four types of events:

  • Quality Gate - the status of the quality gate changed.
  • Profile - the quality profile used to analyze the project changed - either the profile was edited, or a different profile was used to analyze the project.
  • Version - the project's version changed.
  • Other - an event was manually created on a snapshot. See Managing History, below.

Events are shown on the project front page and in the project Activity page. 

Managing History

Occasionally, you may need to manually delete a project snapshot, whether because the wrong quality profile was used, or because there was a problem with analysis, and so on. Note that the most recent snapshot (labeled "Last snapshot") can never be deleted.

Note
titleAbout dealing snapshots

Deleting a snapshot is a 2-step process:

  • The snapshot must first be removed from the project history by clicking on Delete snapshot. It won't be displayed anymore on this History page but will still be present in the database.
  • The snapshot is actually deleted during the next project analysis.

At project level, from the front page Activity list, choose Show More to see the full activity list .

For every snapshot, it is possible to manually:

  • Add, rename or remove a version
  • Add, rename or remove an event

  • Delete the snapshot

    SonarQube의 가장 강력한 기능 중 하나는 현재 시점에서의 코드 품질 뿐만 아니라, 시간의 변화에 따른 코드 품질 추이 데이터를 제공한다는 것입니다. 이를 위해 이전 분석 결과 데이터를 선택적으로 유주합니다. 과거의 모든 데이터를 유지하지는 않습니다--이러할 경우 데이터베이스가 터져나갈 것입니다. 마찬가지로 분석에 있어서도 모든 데이터를 유지하지 않습니다. 프로젝트 스냅샷이 "Last analysis" 상태(즉, 가장 최근에 분석된 상태)에서 프로젝ㅌ의 과거 상태로 변경되면, 프로젝트 레벨의 데이터는 소멸되어 데이터베이스의 기하급수적인 증가를 방지합니다.

    이러한 상황은 사용자가 직접 다루고자 하는 상황이 아닐 것입니다; 이 모든 과정은 아무런 불편함 없이 SonarQube가 자동으로 수행합니다. 다만, 불필요한 스냅샷을 삭제하거나, 데이터 정리 알고리즘을 변경하는 등의 작업을 사용자가 직접 수행해야하는 경우가 있을 것입니다. 

    Anchor
    managing-history
    managing-history
    히스토리 관리하기

    때때로 프로젝트 스냅샷을 수동으로 삭제해야하는 경우가 있을 것입니다. 적절하지 않은 프로젝트를 사용했거나, 분석에 문제가 있는 등의 사유일 수 있습니다. 가장 최근 생성된 스냅샷("Last snapshot"으로 라벨이 부여됨)은 삭제할 수 없습니다.

    Note
    title스냅샷 삭제에 관하여

    스냅샷은 아래 2단계의 프로세스를 통해 삭제됩니다:

    • Delete snapshot 버튼을 클릭하여 프로젝트 히스토리에서 스냡샛을 삭제해야 합니다. 해당 스냅샷 정보는 History page에 표시되지 않으나, 해당 스냅샷의 데이터는 데이터베이스에 여전히 남아 있습니다.
    • 해당 스냡샷의 데이터는 다음 프로젝트 분석 수행시 삭제합니다.


    프로젝틀 레벨의 Activity 리스트에서 Show More를 클릭해 모든 액티비티 리스트를 확인할 수 있습니다. 표시된 스냅샷에 대해 수동으로 다음 액티비티를 수행할 수 있습니다:

    • 버전 추가, 버전명 변경 및 버전 삭제
    • 이벤트 추가, 이벤트명 변경 및 이벤트 삭제
    • 스냅샷 삭제