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

TASK: Optimize cloning in update-neos-ui-compiled.sh #3920

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

kdambekalns
Copy link
Member

The script clones [email protected]:neos/neos-ui-compiled.git – and that is a massive repository. Cloning it uses a lot of space (over 1 GB) and takes long, as the Jenkins log shows (timestamps are elapsed time):

00:00:50.125 + git clone [email protected]:neos/neos-ui-compiled.git tmp_compiled_pkg
00:00:50.137 Cloning into 'tmp_compiled_pkg'...
00:21:54.271 + cd tmp_compiled_pkg
00:21:54.272 + git checkout origin/8.4

That took… more than 20 minutes! Yikes!

I suggest to do this instead:

git clone --depth 1 [email protected]:neos/neos-ui-compiled.git --single-branch --branch=${BRANCH} tmp_compiled_pkg

Takes about 10 seconds for me, transfers around 5 MB of data, uses 23 MB of disk space and even saves us the git checkout, as the branch is already taken care of.

The script clones `[email protected]:neos/neos-ui-compiled.git` – and that is a **massive** repository. Cloning it uses a lot of space (over 1 GB) and takes long, as the Jenkins log shows (timestamps are elapsed time):

```
00:00:50.125 + git clone [email protected]:neos/neos-ui-compiled.git tmp_compiled_pkg
00:00:50.137 Cloning into 'tmp_compiled_pkg'...
00:21:54.271 + cd tmp_compiled_pkg
00:21:54.272 + git checkout origin/8.4
```

That took… more than 20 minutes! Yikes!

I suggest to do this instead:

```
git clone --depth 1 [email protected]:neos/neos-ui-compiled.git --single-branch --branch=${BRANCH} tmp_compiled_pkg
```

Takes about 10 seconds for me, transfers around 5 MB of data, uses 23 MB of disk space and even saves us the `git checkout`, as the branch is already taken care of.
@kdambekalns
Copy link
Member Author

"Fun" fact: All our Neos checkouts on Jenkins (as they prefer source checkouts) have a 1 GB Neos.Neos.Ui.Compiled package… 😑 Too bad we cannot seem to change that, as the dev versions can only be checked out "from cache" via Composer, even overriding the preferred-install for that package doesn't change that.

See also composer/composer#10074 (comment)

@kdambekalns
Copy link
Member Author

New issue with Composer: composer/composer#12310 🤞

Copy link
Member

@markusguenther markusguenther left a comment

Choose a reason for hiding this comment

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

Thanks for that nice improvement. :)

Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

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

Thank you for noticing this and fixing it ;)

This definitely goes into the direction of #3367 -> through our .yarn cache folder the repo just grows quite fast ... we might need to promote similar ways to checkout also for developers so they save diskspace. Maybe in case we still want to merge the Neos Ui repo into Neos.Neos we can avoid these heavy artifacts to be merged.

@kdambekalns kdambekalns merged commit 7c8c3b2 into 8.3 Feb 12, 2025
9 checks passed
@kdambekalns kdambekalns deleted the task/optimize-update-neos-ui-compiled-cloning branch February 12, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants