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

[RFC]: stop testing latest dependencies #194

Open
Ocramius opened this issue Feb 27, 2023 · 7 comments
Open

[RFC]: stop testing latest dependencies #194

Ocramius opened this issue Feb 27, 2023 · 7 comments
Labels
BC Break RFC Request for Comment; proposal for major new feature or changes.
Milestone

Comments

@Ocramius
Copy link
Member

RFC

While running tests over the last few days, I noticed that we have test failure due to runtime depreciations (which I still firmly believe to be an abomination) when running latest dependencies against the lowest supported PHP version of a repository.

We have to consider 2 problems in this test matrix entry:

  1. lowest PHP version will hardly ever receive latest dependencies anyway
  2. we refresh the composer.lock of all repositories on a nightly basis, therefore detecting upstream breakages

Given that updating lock files is equivalent to testing latest dependencies, I therefore suggest dropping the latest entries from our generated CI matrix.

Q A
Proposed Version(s) 2.0.0
BC Break? Yes

Note: I counted this as BC break, because it changes assumptions around testing depth

@Ocramius Ocramius added BC Break RFC Request for Comment; proposal for major new feature or changes. labels Feb 27, 2023
@Ocramius Ocramius added this to the 2.0.0 milestone Feb 27, 2023
@internalsystemerror
Copy link
Member

Yeah makes sense. With the lock file constantly updated, that now makes the latest tests redundant. +1 from me.

@weierophinney
Copy link
Member

I was going to say "hell no", but then read the bit about updating composer.lock nightly, and it all makes sense. 👍 from me.

@Xerkus
Copy link
Member

Xerkus commented Feb 28, 2023

The point of latest is to notice those upstream breakages. And point of lock file is to quickly detect when those breakages are not something introduced by tested changes. With lock file maintenance in place the lock file covers both points so it make sense to remove latest. BUT lock file is only usable for the php version it was generated on. So latest would need to stay on any other php versions.

@Ocramius
Copy link
Member Author

Ocramius commented Feb 28, 2023

The problem with latest as it is configured right now is that it conflicts with completely unrelated CI pipelines. Contributors would get red builds for changes they had nothing to do with, and the same would apply to Renovate overnight updates.

So latest would need to stay on any other php versions.

Kinda agree that we need to somehow probe newer PHP versions with newer dependencies, and that we cannot run locked against newer PHP dependencies either (simply won't run, sometimes).

Perhaps sticking with lowest only (for newer PHP versions) is a safe-ish solution here, for now 🤔

@boesing
Copy link
Member

boesing commented Mar 1, 2023

I see the point here and I am fine with the change.

Still want to say that my current pipelines (in pet projects) do depend somehow on that (which I only trigger via weekly builds as I do not have renovate up and running - yet).

So whatever change we make here should ofc reflect the needs of the laminas ecosystem but we should keep in mind where this all comes from and who is using this - since we published it as a publicly available action, we should kinda try to stick with decisions we made before - even tho they start being inconvenient at some point. If we start building a CI pipeline around renovate, we should properly note this in the documentation and create proper documentation on how to have a proper build pipeline along with renovate + the laminas CI stuff.

@Ocramius
Copy link
Member Author

Ocramius commented Mar 3, 2023

I'll implement this (it's mostly code removal), and will patch the docs accordingly.

/cc @lcobucci IMO this is the last 2.0.0 change, then we can try out 2.0.x on some repos, and finally release :)

Ocramius added a commit to Ocramius/laminas-ci-matrix-action that referenced this issue Mar 3, 2023
…erated pipelines

This change removes `latest` from default composer dependencies in the generated CI matrix.

The rationale is that `latest` dependencies tend to break our builds, and we usually run @renovate-bot
or @dependabot on our repositories, keeping both `composer.json` and `composer.lock` fairly updated.

Because of this kind of disciplined approach, we can assume that `latest` dependencies are already
regularly tested by refreshing `composer.lock` regularly, and further testing with explicit
`composer update` is considered risky, because it moves into unexplored land, breaking builds that
are otherwise quite stable.

We also don't want to break builds by contributors, or builds that upgrade perfectly safe to upgrade
dependencies, just because a specific `latest` upstream dependency broke, and we didn't really touch
it.

The final objective is that CI can break, but only in commits that change `composer.json` and `composer.lock`,
and those are handled every day by automation.

Therefore, the default testing approach will cover `lowest` and `locked` dependencies, which both move
much less than `latest`, and don't cause instability.
Ocramius added a commit to Ocramius/laminas-ci-matrix-action that referenced this issue Mar 3, 2023
…erated pipelines

This change removes `latest` from default composer dependencies in the generated CI matrix.

The rationale is that `latest` dependencies tend to break our builds, and we usually run @renovate-bot
or @dependabot on our repositories, keeping both `composer.json` and `composer.lock` fairly updated.

Because of this kind of disciplined approach, we can assume that `latest` dependencies are already
regularly tested by refreshing `composer.lock` regularly, and further testing with explicit
`composer update` is considered risky, because it moves into unexplored land, breaking builds that
are otherwise quite stable.

We also don't want to break builds by contributors, or builds that upgrade perfectly safe to upgrade
dependencies, just because a specific `latest` upstream dependency broke, and we didn't really touch
it.

The final objective is that CI can break, but only in commits that change `composer.json` and `composer.lock`,
and those are handled every day by automation.

Therefore, the default testing approach will cover `lowest` and `locked` dependencies, which both move
much less than `latest`, and don't cause instability.
Ocramius added a commit to Ocramius/laminas-ci-matrix-action that referenced this issue Mar 3, 2023
…erated pipelines

This change removes `latest` from default composer dependencies in the generated CI matrix.

The rationale is that `latest` dependencies tend to break our builds, and we usually run @renovate-bot
or @dependabot on our repositories, keeping both `composer.json` and `composer.lock` fairly updated.

Because of this kind of disciplined approach, we can assume that `latest` dependencies are already
regularly tested by refreshing `composer.lock` regularly, and further testing with explicit
`composer update` is considered risky, because it moves into unexplored land, breaking builds that
are otherwise quite stable.

We also don't want to break builds by contributors, or builds that upgrade perfectly safe to upgrade
dependencies, just because a specific `latest` upstream dependency broke, and we didn't really touch
it.

The final objective is that CI can break, but only in commits that change `composer.json` and `composer.lock`,
and those are handled every day by automation.

Therefore, the default testing approach will cover `lowest` and `locked` dependencies, which both move
much less than `latest`, and don't cause instability.
Ocramius added a commit to Ocramius/laminas-ci-matrix-action that referenced this issue Mar 3, 2023
…erated pipelines

This change removes `latest` from default composer dependencies in the generated CI matrix.

The rationale is that `latest` dependencies tend to break our builds, and we usually run @renovate-bot
or @dependabot on our repositories, keeping both `composer.json` and `composer.lock` fairly updated.

Because of this kind of disciplined approach, we can assume that `latest` dependencies are already
regularly tested by refreshing `composer.lock` regularly, and further testing with explicit
`composer update` is considered risky, because it moves into unexplored land, breaking builds that
are otherwise quite stable.

We also don't want to break builds by contributors, or builds that upgrade perfectly safe to upgrade
dependencies, just because a specific `latest` upstream dependency broke, and we didn't really touch
it.

The final objective is that CI can break, but only in commits that change `composer.json` and `composer.lock`,
and those are handled every day by automation.

Therefore, the default testing approach will cover `lowest` and `locked` dependencies, which both move
much less than `latest`, and don't cause instability.
Ocramius added a commit to Ocramius/laminas-ci-matrix-action that referenced this issue Mar 3, 2023
…erated pipelines

This change removes `latest` from default composer dependencies in the generated CI matrix.

The rationale is that `latest` dependencies tend to break our builds, and we usually run @renovate-bot
or @dependabot on our repositories, keeping both `composer.json` and `composer.lock` fairly updated.

Because of this kind of disciplined approach, we can assume that `latest` dependencies are already
regularly tested by refreshing `composer.lock` regularly, and further testing with explicit
`composer update` is considered risky, because it moves into unexplored land, breaking builds that
are otherwise quite stable.

We also don't want to break builds by contributors, or builds that upgrade perfectly safe to upgrade
dependencies, just because a specific `latest` upstream dependency broke, and we didn't really touch
it.

The final objective is that CI can break, but only in commits that change `composer.json` and `composer.lock`,
and those are handled every day by automation.

Therefore, the default testing approach will cover `lowest` and `locked` dependencies, which both move
much less than `latest`, and don't cause instability.
Ocramius added a commit to Ocramius/laminas-ci-matrix-action that referenced this issue Mar 3, 2023
…erated pipelines

This change removes `latest` from default composer dependencies in the generated CI matrix.

The rationale is that `latest` dependencies tend to break our builds, and we usually run @renovate-bot
or @dependabot on our repositories, keeping both `composer.json` and `composer.lock` fairly updated.

Because of this kind of disciplined approach, we can assume that `latest` dependencies are already
regularly tested by refreshing `composer.lock` regularly, and further testing with explicit
`composer update` is considered risky, because it moves into unexplored land, breaking builds that
are otherwise quite stable.

We also don't want to break builds by contributors, or builds that upgrade perfectly safe to upgrade
dependencies, just because a specific `latest` upstream dependency broke, and we didn't really touch
it.

The final objective is that CI can break, but only in commits that change `composer.json` and `composer.lock`,
and those are handled every day by automation.

Therefore, the default testing approach will cover `lowest` and `locked` dependencies, which both move
much less than `latest`, and don't cause instability.
@boesing
Copy link
Member

boesing commented Mar 4, 2023

When I read this correct, most issues were runtime deprecations? Pretty sure that we explicitly want these - I was like "hell disable phpunit deprecation exceptions" in the past 😁

Might still be a way to go. I was working on testing if we can have Jobs which may fail. Could still be something to be added to the matrix as a dedicated Job tho. Having deprecation warnings in phpunit confuse a lot but I see why we might want them - its just not a good place to trigger contributors attention because of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Break RFC Request for Comment; proposal for major new feature or changes.
Projects
None yet
Development

No branches or pull requests

5 participants