- 
        Couldn't load subscription status. 
- Fork 881
rkt: add image size to rkt image list #1865
Conversation
| Oh, I use bufio.(*Reader).Discard which is not included in go1.4. But it looks like we're switching to go1.5 soon, right? If not, I can work around it. | 
| @iaguis: Yeah, please work it around. Not sure how soon rkt will become go-1.5-only. | 
        
          
                tests/run-build.sh
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait with that for an official switchover.
1bdd981    to
    a2f1372      
    Compare
  
    | 
 Done | 
        
          
                store/migrate.go
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does ql support DEFAULT clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I just tested it.
| Ok, I'm done with the review. Tests? :P | 
We store the size of the ACI in the database when we write it to the CAS. We also store the size of the tree store when we render the ACI. We also populate sizes of existing images after we do the migration to the new db schema. When we list images, we print the sum of these two sizes as the size of the image. This means that if the image is fetched but never ran, it won't be rendered to the tree store so it will take less space. If the image is removed (`rkt image rm`), we also remove the ACIInfo table associated with it, this means we don't have information about the tree store size. It will be removed on the next garbage collection if it's not referenced by any non-GCd pod.
When calculating directory size. Also, rearrange the linux/unsupported go files.
a2f1372    to
    c263c07      
    Compare
  
    | Is there something that could use a test? I'm not really sure about it. Anyway, LFAD, but let's wait for green (I had to restart semaphore build, TestFetch failed as usual). | 
With the new fields added.
| Added a functional test | 
| I made comments in the commit instead of 'all files' view. Meh. Some nits, but otherwise LFAD. Also restarted the semaphore job, because TestFetch. | 
e33fe7f    to
    213e0e4      
    Compare
  
    | Addressed your comments. Let's wait for green (again) | 
rkt: add image size to rkt image list
We store the size of the ACI in the database when we write it to the
CAS. We also store the size of the tree store when we render the ACI.
We also populate sizes of existing images after we do the migration to
the new db schema.
When we list images, we print the sum of these two sizes as the size of
the image. This means that if the image is fetched but never ran, it
won't be rendered to the tree store so it will take less space.
If the image is removed (
rkt image rm), we also remove the ACIInfotable associated with it, this means we don't have information about the
tree store size. It will be removed on the next garbage collection if
it's not referenced by any non-GCd pod.
Example:
Fixes #1814