- Issue created by @tedbow
- Status changed to Postponed
almost 2 years ago 5:29pm 30 January 2023 - 🇺🇸United States tedbow Ithaca, NY, USA
we have the 2 related issues in
but this is
core-post-mvp
so removing from sprint - Status changed to Active
almost 2 years ago 8:57pm 6 February 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I think this is the intent? To automatically ignore the error output if it's just complaining about something deprecated?
- 🇺🇸United States tedbow Ithaca, NY, USA
We had a related problem in 🐛 anonymous ProcessOutputCallbackInterface class ComposerInspector::getConfig() assumes __invoke does receive any data in error buffer Closed: duplicate and now
\Drupal\package_manager\ComposerInspector::getConfig
is not using JsonProcessOutputCallback but has an anonymous callback that has a similar problem - @tedbow opened merge request.
- Status changed to Needs work
almost 2 years ago 4:35pm 17 February 2023 - Assigned to omkar.podey
- 🇮🇳India omkar.podey
- Adding
trim
toerror buffer
andoutput buffer
. - Adding back
validate()
at the start ofgetConfig()
.
- Adding
- Assigned to wim leers
- Status changed to Needs review
almost 2 years ago 10:58am 9 March 2023 - Assigned to omkar.podey
- Status changed to Needs work
almost 2 years ago 11:34am 10 March 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Quoting the IS:
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
👆 Not yet addressed!
- Assigned to wim leers
- Status changed to Needs review
almost 2 years ago 2:43pm 13 March 2023 - 🇺🇸United States phenaproxima Massachusetts
This handle the error buffer as:
1. If it has output buffer data even if there is also error buffer output return the output buffer
2. If there is error buffer data and no output buffer data throw an exception with the error buffer dataThis seems very dangerous.
It is entirely possible that data could have been written to the output buffer for a while, and THEN some kind of show-stopping problem was encountered that ended the process, and data was written to the error buffer.
- Assigned to omkar.podey
- Status changed to Needs work
almost 2 years ago 9:28am 14 March 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
IMHO the only surefire way to detect an error is the exit code.
That is correct. In fact, in various issues at https://github.com/composer/composer, the confusing nature of Composer writing to both
stdout
andstderr
even when no error occurred has been discussed. This is intentional behavior, because Composer writes things like deprecation errors tostderr
even when there is general success ⇒ which is why the exit code is the only way to know an error has occurredBut that's also the reason we can reliably ignore the error output if the exit code is
0
!Still, it's valuable to have explicit handling for deprecation error output, and I think @omkar.podey's approach to detecting & handling deprecations captures the spirit of what @tedbow wrote 👍, even though I think we should have a follow-up issue to allow tests to fail on Composer deprecations (because that's out of scope here).
- Assigned to wim leers
- Status changed to Needs review
almost 2 years ago 12:28pm 14 March 2023 - Issue was unassigned.
- Status changed to Needs work
almost 2 years ago 12:39pm 14 March 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The shape of the solution looks good to me, but there are a lot of details that are now wrong/outdated.
Please self-review before asking others to review!
- Assigned to omkar.podey
- Assigned to wim leers
- Status changed to Needs review
almost 2 years ago 11:24am 15 March 2023 - Assigned to omkar.podey
- Status changed to Needs work
almost 2 years ago 12:08pm 15 March 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Tests looking good, starting to look good overall!
Attempted to RTBC, but ran into language nits and consistency issues — but this is definitely approaching completion!
Note that this cannot be RTBC without that follow-up having been created.
- Assigned to wim leers
- Status changed to Needs review
over 1 year ago 9:36am 20 March 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@omkar.podey created that follow-up: 📌 Update ProcessOutputCallback to fail on Composer deprecations, to get early notifications of Composer changes Postponed . 👍
- Assigned to omkar.podey
- Status changed to Needs work
over 1 year ago 11:28am 20 March 2023 - Assigned to wim leers
- Status changed to Needs review
over 1 year ago 4:20am 21 March 2023 - Issue was unassigned.
- Status changed to RTBC
over 1 year ago 10:52am 21 March 2023 - 🇺🇸United States phenaproxima Massachusetts
This mostly looks great. There are a few small things I'd like to see changed, and honestly I can probably do that myself. But, just making sure nobody commits this right now...
- Status changed to Needs work
over 1 year ago 12:40pm 21 March 2023 - Assigned to wim leers
- Status changed to Needs review
over 1 year ago 1:52pm 21 March 2023 - 🇺🇸United States phenaproxima Massachusetts
Assigning to Wim to sign off on my changes.
- Assigned to phenaproxima
- Status changed to Needs work
over 1 year ago 3:09pm 21 March 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I really wanted to RTBC, but I can't quite agree with all of the changes 😅
- Assigned to wim leers
- Status changed to Needs review
over 1 year ago 2:34pm 31 March 2023 - 🇺🇸United States phenaproxima Massachusetts
Assigning to Wim for a re-review and to accept or reject my explanations for the more questionable changes...
- Assigned to phenaproxima
- Status changed to Needs work
over 1 year ago 1:32pm 5 April 2023 - 🇺🇸United States phenaproxima Massachusetts
Just to keep it clear where we're at:
Ted noticed, while reviewing this issue, that throwing exceptions if there's error output (even if it only has certain words) is too heavy-handed and could interfere with otherwise working Composer commands.
The thing is, a deprecation error should not be a show-stopper. It means the command succeeded, but will fail in the future. After some discussion, we feel the correct thing to do is throw an exception if the Composer process exits with a non-zero exit code -- Composer Stager already does this (and tests it). If there is error output, we should log it as a warning.
This means we'll need to have a logger channel for Package Manager, which is also given to the process callback by ComposerUtility. We should also alter PackageManagerKernelTestBase so that, if any warnings or errors are logged to that channel, the test fails.
- Assigned to tedbow
- Status changed to Needs review
over 1 year ago 3:20pm 5 April 2023 - Status changed to Needs work
over 1 year ago 8:23pm 5 April 2023 - 🇺🇸United States tedbow Ithaca, NY, USA
I pushe 1 comment addition and add note about missing test coverage, otherwise looks good
- Issue was unassigned.
- Assigned to omkar.podey
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 10:22am 6 April 2023 - Assigned to phenaproxima
- 🇺🇸United States phenaproxima Massachusetts
I think that is definitely the coverage we want.
I think it could be a little clearer in some parts so I'll do some clean-up, but otherwise I'm happy with it. Nice work!
- Assigned to tedbow
- 🇺🇸United States phenaproxima Massachusetts
Back to @tedbow for final review.
- Issue was unassigned.
- Status changed to RTBC
over 1 year ago 4:19pm 6 April 2023 -
phenaproxima →
committed f8ca6abd on 3.0.x authored by
tedbow →
Issue #3337667 by omkar.podey, phenaproxima, tedbow, Wim Leers: Allow...
-
phenaproxima →
committed f8ca6abd on 3.0.x authored by
tedbow →
- 🇺🇸United States phenaproxima Massachusetts
Finally! Great to get this done.
- Status changed to Fixed
over 1 year ago 4:34pm 20 April 2023 Automatically closed - issue fixed for 2 weeks with no activity.