Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.3.0, 4.1.2
-
Severity 2 - Major
-
81
-
Description
If you add a revision of a binary file, then create a review containing it before the 'infill' stage is complete (i.e. when it still has a ? icon next to it when viewed in the activity stream) a non-binary CrucibleRevision will be created for it (table cru_revision) and it will render as text in that review and in any future review created for the same revision.
Until infill finishes, FishEye rendering is broken too, but then it self-heals. However in versions prior to 4.8.11, the Crucible data, which has already cached the binary flag, is never fixed.
Expected Behaviour in 4.8.11+
This issue will still occur in 4.8.11+ when the revision is not fully indexed but it will self-heal fully after indexing is completed.
Root Cause Analysis
It is intended that a user can create a review as soon as possible which means while information about the revision is still being gathered and persisted. As such this is how the file is rendered before indexing has reached wrap phase.
Pre 4.8.11 Workarounds
Workaround #1 - update the DB manually
As always, prior to operating on the database:
- Create a backup.
- Shut down the FishEye/Crucible instance.
Next, execute the following script to fix the existing crucible reviews (substitute <FILE_PATTERN> with a pattern that matches the files experiencing the problem).
UPDATE cru_revision SET cru_binary = true WHERE cru_path IN ( SELECT cru_revision.cru_path FROM cru_revision JOIN cru_stored_path ON cru_revision.cru_path = cru_stored_path.cru_path_id WHERE cru_stored_path.cru_path LIKE '<FILE PATTERN>' ) AND cru_binary = false
Workaround #2 - postpone review creation
Another way to avoid this issue is to postpone review creation until the file has been fully scanned. Users can check that by viewing the respective file revision in FishEye and ensuring it is not displayed as garbage text.
Attachments
Issue Links
- is related to
-
CRUC-8416 Viewing files in a code review does not update the review progress
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...