Was there some force push to Roassal?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Was there some force push to Roassal?

CyrilFerlicot
Hi,

Since there is no release for roassal I have projects referencing a SHA
of a stable Roassal 2 version.

I see in my projects that the roassal SHA targeted was
c1da8614c951008ea501f126ef3ccf25d73580ac but now I cannot find it in the
history of roassal and my projects are failing.

So I am wondering if someone forced pushed on Roassal 2? And if yes,
what is the reason?

Because of this, all the released of the projects depending on this
version of roassal will never work again.

Please, please, do not use destructive operations on projects that are
intended to be used :(

--
Cyril Ferlicot
https://ferlicot.fr


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Was there some force push to Roassal?

Pharo Smalltalk Users mailing list
Hi Cyril,

I tried something to remove some large blob from the history. The code source of Roassal2 is about 7Mb large, but the .git folder is about 150 Mb!
But at the end, it was the push was rejected because some pullrequests exist. So, I did not suspect that I had an impact. Sorry about that.

Help is welcome to shrink Roassal2’s .git folder.

Cheers,
Alexandre

> On 07-11-2019, at 19:33, Cyril Ferlicot D. <[hidden email]> wrote:
>
> Hi,
>
> Since there is no release for roassal I have projects referencing a SHA
> of a stable Roassal 2 version.
>
> I see in my projects that the roassal SHA targeted was
> c1da8614c951008ea501f126ef3ccf25d73580ac but now I cannot find it in the
> history of roassal and my projects are failing.
>
> So I am wondering if someone forced pushed on Roassal 2? And if yes,
> what is the reason?
>
> Because of this, all the released of the projects depending on this
> version of roassal will never work again.
>
> Please, please, do not use destructive operations on projects that are
> intended to be used :(
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>


Reply | Threaded
Open this post in threaded view
|

Re: Was there some force push to Roassal?

Ben Coman


On Sun, 10 Nov 2019 at 09:32, Alexandre Bergel via Pharo-users <[hidden email]> wrote:
Hi Cyril,

I tried something to remove some large blob from the history. The code source of Roassal2 is about 7Mb large, but the .git folder is about 150 Mb!
But at the end, it was the push was rejected because some pullrequests exist. So, I did not suspect that I had an impact. Sorry about that.

It seems strange it was rejected because some pull request existed.   Were you doing it from the command line?
Was it something like one of these error messages? Particularly Step 11?

 
Help is welcome to shrink Roassal2’s .git folder.

I just cloned Rossal2 and `du -sh .` gave 88M, so its looks like you had some success reducing it.
Google found me a way to list large objects... 
```
git rev-list --objects --all \
        | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
        | sed -n 's/^blob //p' \
        | sort --numeric-sort --key=2 \
        | cut -c 1-12,41- \
        | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest \
        > ../list.txt
```
The largest file entry was...  e0c5f0885bac  432KiB src/Roassal2/RTRoassalExample.class.st

That file is no longer in the repo, but...  
$ grep RTRoassalExample.class.st ../list.txt  | wc -l
==> 158
and 
158 * 432K ==> 68M

Found the commit with that blob to examine...
$ git log --all --pretty=format:%H -- src/Roassal2/RTRoassalExample.class.st | xargs -n1 -I% sh -c "git ls-tree % -- src/Roassal2/RTRoassalExample.class.st | grep -q e0c5f0885bac && echo %"
==> a7753aef2a9f14cf5c84da83b8ebff7e4e35f0e9

$ git checkout a7753aef2a9f14cf5c84da83b8ebff7e4e35f0e9
$ vi src/Roassal2/RTRoassalExample.class.st

and I see the culprit is icons being encoded directly in the class...
   { #category : #icons }
   RTRoassalExample >> exampleAligningGroupsIcon [
        ^ 'iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAICElEQVR4XuWaWWhUVxjHI27Q
   1oJttfjUusQHQdE+uIFUJYIVBC1VrDv6oKDUd5fGKK3RRgkRFfelaKvR1rpS7YbGFrUWcaHF
   msYsNMaJSWa9SWbmf3v+9/YmM5M7zj5J/P4wzGQyc+855/edbzuTo+vy1ZWUI38J5AORL/lA
   5AORL/lA5AORL/lA5AORL/lA5AORL/lA5Es+EPlA5Es+EPlA5Es+EPlA5Es+EPlA5Es+EPmS
   D0Q+EPmSD0Q+EPmSD0Q+EPmSD0Q+EPmSD0S+5AORD0S+5AORD0S+5AORD6QratMmoLkZCH3v
   ...etc

One way to reduce those historical file sizes would be running git-filter with an automated way to extract those icons to separate files and add code to load them.
Seems hard.

Following another path of investigation led me first to to "Git Compression of Blobs and Packfiles"

So trying...
$ git gc --aggressive
$ du -sh . 
==> 18M

led me to the same job being done by...
$ git repack -a -d -f --depth=10 --window=250
$ du -sh . 
==> 18M

My understanding is that this is safe and doesn't affect the commit history.  
However its just a local result.  A few things I read gives the feeling that pushing from that repacked repo won't change anything on the server since it only sends a diff to the server, which then repacks in its own time.  

Perhaps the only way is ask GIthub Support if they can repack it.

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: Was there some force push to Roassal?

CyrilFerlicot
In reply to this post by Pharo Smalltalk Users mailing list
On Sun, Nov 10, 2019 at 2:42 AM Alexandre Bergel via Pharo-users
<[hidden email]> wrote:
>
> Hi Cyril,
>
> I tried something to remove some large blob from the history. The code source of Roassal2 is about 7Mb large, but the .git folder is about 150 Mb!
> But at the end, it was the push was rejected because some pullrequests exist. So, I did not suspect that I had an impact. Sorry about that.
>
> Help is welcome to shrink Roassal2’s .git folder.
>

Hi,

A force push is a destructive operation. It's really not recommended
to use it on a used project in any case. Even if it's to win some
space, it's not worth it.

For the .git folder, in general when they grow too much it's often
only local. The .git folder of my local clone of roassal is 384B and I
have it since month and it is up to date.
The "easy" solution is to clone again.

Most of the time when I have a clone that is too big, the command `git
gc` is enough to shrink it.


> Cheers,
> Alexandre
>
>
>


--
Cyril Ferlicot
https://ferlicot.fr