Open dmnc opened 3 years ago
@dmnc you mean the problem you describe happens within minutes of between:
No I am afraid it's because https://github.com/symplify/monorepo-builder which I use here to split the monorepo and push to individual package repos takes ~20 minutes to go through and roll out all packages, one by one.
I will need to look into it to see if monorepo-builder
would allow me to first do the split and update all repos without pushing tags (to avoid triggering packagist, and then quickly just push only tags at the end of the process. It would still be possible to "break" some of the installations if they update during the final tags push, but at least if they fall back to dev-master
(the case mentioned by @dmnc when "minimum-stability": "dev"
is configured), that would be already the latest code. 🤔
@dmnc you mean the problem you describe happens within minutes of between:
- developer releases zf1 new version
- packagist updates each of the packages
As above, it's because there is quite a time gap between the first package being on packagist and the last. I had assumed it was due to a manual process, but the effect is the same.
the final push impact could be minimized if dependencies are sorted first. i.e packages that have no dependencies are pushed first, then packages that depend only on packages pushed in the first round, etc.
but it may be an impossible task if there are cross-dependencies.
perhaps the simple way to prevent this problem in the first place is to push monorepo tag last, i.e that's probably why @dmnc started to update their dependencies, as they got email notification of released tag (same as me).
btw, I started a branch at some point to automate the release process:
idea was if the process is scriptable with a simple command, integrate it with CI (GitHub Actions).
The newest monorepo-builder is very promising (9.0.0 beta2 released just a week ago) - they dropped handling the split through php code in favor of github actions: https://github.com/symplify/symplify/pull/2490 And it does its job in a matter of only few minutes on their monorepo: https://github.com/symplify/symplify/actions?query=workflow%3A%22Split+Monorepo%22 (pushing all packages in parallel)
The monorepo builder being replaced with bunch of git commands, seems to me going backward in time.
If the previous version preserved commit messages:
then new version just has commit messages titled "$link_to_github":
maybe fine for their use, but not ready for general use.
but otoh, if you only update the splits with new version only, probably doesn't matter much.
new version just has commit messages titled "$link_to_github":
I don't like it either tbh
also, the previous version synchronized every commit when you made release (I think), then the new version with the github actions (that's implemented now) is unreliable as if the action fails, the sync will be omitted, and there's no way to retry it. and when you make new push (unaware that previous failed), it will commit over previous change that was left unsynchronized, in effect merge two commits.
Perhaps there are other open-source tools for the repo splitting. I don't know what tool they use, but here's some:
if I'd ought wrote a repo splitter from scratch, I'd probably use:
there's nothing wrong using GitHub actions (I like event based flows), just the action code must not assume everything done before completed successfully.
Just noticed this during the push out of 1.13.4.
If you have
"minimum-stability": "dev",
in an app composer.json, then when some of the zf1s/zend-* packages have been released but others haven't you can pull in dev-master.I think this is a combination of the branch alias in each package (1.x-dev to dev-master) and the fact that when there is a release, all requirements get bumped to
^1.13.4
.As an example, https://github.com/zf1s/zend-xml/blob/master/composer.json requires
"zf1s/zend-exception": "^1.13.4"
but if only1.13.3
is visible in packagist, it picks dev-master instead.I know this is an edge case, but it isn't ideal. I can see a couple of potential solutions:
I am assuming the second would be a pretty painful change to process.