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
Client error occurred. status: 422 Unprocessable Entity Couldn't find a repository matching this job. #1721
Comments
@jrfnl it looks like you're passing I know you said nothing changed with the workflow, but can you try swapping that value for |
@afinetooth Thanks for the quick response! Checked and it looks like that does fix it (for now). Open (draft) PR: PHPCSStandards/PHPCSUtils#490 However, that doesn't change the following:
All in all, while changing back to the Refs:
|
@jrfnl. You bet, my pleasure. Thanks for documenting the inconsistencies here. Personally, I am aware of that plan to switch to the Coveralls Repo Token, and that, at this time, we fall through, one to the other, if there's an issue with one, so, technically, both are supported. So I'm mystified as to why your previously working workflows stopped working with that I have asked for a review by engineering here so we can discover more about what might have suddenly caused this not to work. I'll update you hear when that produces some further insights. |
@afinetooth Thanks James. I'm leaving that PR to change back to the |
Oh, just thinking.... all the PRs with passing builds between the change to the |
@afinetooth Found it! Yes, looks like the PR coming from Dependabot is the reason for the failing build.
While this explains the failing build, I do imagine this kind of thing might be a hindrance for adoption of the I think this issue can now be closed, though hopefully it will help other people who may run into the same thing (including myself in the future...). |
Hi @jrfnl. Helpful discovery! So you're saying that you believe the only reason for the failing PR build was that it came from a dependabot PR (a fork)? And that access permissions to secrets was at play. That makes sense. I was just reporting back with the results of the engineering review I requested (summarized):
So this explains why As I mentioned above, we implemented the integration to try both, and to fall through to the other if one fails. So, in any case, I was wrong to tell you to switch to That does leave the question open of how to deal with forked PRs. Dependabot PRs seem like they have an inherent workaround (use |
Follow up on PR 468. Turns out Dependabot PRs do not have access to secrets with the exception of (read-only) access to the `GITHUB_TOKEN`. As the coverage test runs and the Coveralls status are required builds, this blocks Dependabot PRs from being merged without overruling the required statuses. As I'd like to avoid that situation, I'm special casing Dependabot PRs for the token selection. Refs: * lemurheavy/coveralls-public#1721 * https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#responding-to-events
Follow up on PR 468. Turns out Dependabot PRs do not have access to secrets with the exception of (read-only) access to the `GITHUB_TOKEN`. As the coverage test runs and the Coveralls status are required builds, this blocks Dependabot PRs from being merged without overruling the required statuses. As I'd like to avoid that situation, I'm special casing Dependabot PRs for the token selection. Refs: * lemurheavy/coveralls-public#1721 * https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#responding-to-events
Follow up on PR 468. Turns out Dependabot PRs do not have access to secrets with the exception of (read-only) access to the `GITHUB_TOKEN`. As the coverage test runs and the Coveralls status are required builds, this blocks Dependabot PRs from being merged without overruling the required statuses. As I'd like to avoid that situation, I'm special casing Dependabot PRs for the token selection. Refs: * lemurheavy/coveralls-public#1721 * https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#responding-to-events
Correct.
Forked PRs in general should be fine. If I read things correctly, it's only the PRs from Dependabot which should be affected by this issue. As I'd prefer to stay on the Coveralls token as the default, I'm going to change the workflows, as I prefer to have the least amount of "What is wrong with this PR, oh, hang on, I remember this issue" moments (and having to remember that kind of things for different repos and such). Originally, I intended to change the token setting to:
... but that doesn't seem to work as the expression will not evaluate to the token, but to So instead, looks like I need to duplicate the steps to special case Dependabot. While not pretty, it's still better than having to remember there is an exception in play every time the repo receives a Dependabot PR. I've updated PR PHPCSStandards/PHPCSUtils#490 to make that change instead of reverting the original PR to switch to the I've also confirmed this workflow logic works by letting Dependabot rebase the open PR after I merged the workflow change. @afinetooth This might be something which needs to be called out in the documentation/example workflows.... (and probably good to mention it to the engineering team too as it may throw a spanner in the wheels of the switch to the One thing I'm left to wonder about its how to get this working for |
I stand corrected. Just ran into the a 422 error for a PR from an external contributor... this is not good... |
@jrfnl , darn it. I'm sorry to hear that. Our engineering team won't be available to help for a few days, but if you want to share the URL for the action run (and, ideally, a verbose build log), I'll be happy to have a look. (I could not find it in your actions history, just the failed dependabot PRs.) Question: coveralls-python is a great integration and well-maintained, it's just that, clearly, we haven't done the best job of coordinating with the maintainer to make sure that Coveralls, and our official integrations, are always backwards-compatible. I know for a fact that we consider that integration when we make changes, and try to avoid potential issues, but, like I say, we have definitely not nailed it. |
Yes, sorry, different repo, same setup. This was the PR: PHPCSStandards/PHPCSExtra#258
I'm not using The problem is that the standard output from PHPUnit cannot be handled by Coveralls, so it needs to be converted from the Would be nice to be able to drop those steps, but I don't think it's an option at this time. |
@jrfnl Oh, shoot. I'm so sorry. I confused this momentarily with another issue from a coveralls-python user with practically the same behavior. My bad. Actually, There might be an option right now, if you're using PHPUnit, which is to export to I have also raised the priority of our own internal task to add In the meantime, I realize you are an OpenSource user, but if you are inclined to contribute a new parser (official support for a coverage report format) to the Coverage Reporter, we offer a free month of paid service, which we'd also be happy to donate to someone of your choice. Here's an example of a parser, for Cobertura XML format. You can see the other parsers here. |
@afinetooth No worries, I actually referred to a similar issue with
That would be amazing!
Unfortunately, using the Cobertura format doesn't look to be a realistic option. From what I can see, that reporting option is available since PHPUnit 9.4, while these projects are open source and support a wide range of PHP versions, which, in this case, means the tests need to run on PHPUnit 4.x - 10.x and code coverage will generally be created using high/low builds to get the coverage report correct, so just sending in the "high" builds, which have access to the Cobertura report format, is not really an option. I also imagine that mixing the two formats (high using Cobertura, low using Clover) may not be optimal and would make the workflows even more complex than they already are. It might be an option soonish for one of my customers (which has a Pro account), but at this time, they still support PHP 7.2, so for high/low builds they still need PHPUnit 8.x. I'll explore this option for them once they've dropped support for PHP 7.2 (which is planned some time over the next year).
👍🏻
If wish I could find the time for it, but I'm overloaded (and underpaid) as is ;-) |
HI @jrfnl:
Got it! Makes sense. No problem. We'll see when we can complete the
I can relate! No worries, maybe some rich PHP developer with a lot of time on their hands will come along in the next few weeks. LOL. 🎠 |
By the looks of the specs though, you don't need a PHP dev, but a Crystal one. (which is one of the blockers for me to even contemplate working on this, I'd never even heard of Crystal until now, so while I could probably get the basics done with some copy/paste trial and error, I don't have a test environment, will probably create parse/compile errors, definitely won't write things in a "smart" way etc etc Learning a new language from scratch is not something I currently have time for.) |
Very true! My bad. I was thinking more about the format ( Appreciate you even considering it! It's on the near horizon. I have added it as a hopeful to our next sprint backlog, but it's probably more likely to be part of the next one. I'll be sure you update you here as soon as I have an ETA. |
That would be awesome! I look forward to being able to switch over soon(ish) (presuming your sprints are not three months long 😂 ) |
LOL. Our sprints are 2-weeks each. Once it's in the queue it shouldn't be too long. |
@afinetooth Just ran into the 422 error again with an external contributor, so thought I'd check in how things are progressing ? |
Hi @jrfnl. While we didn't get to it in our last sprint, it's in this one and currently assigned to a team member, so I've checked in so get a sense of when we'll start it and ETA. Will update you when I know something. |
Hi @jrfnl. Still don't have an exact date but I'd guess ETA is this week as we have a WIP PR that looks pretty close and should go to review this week. We would love it if you'd help us test in production. If you can do that, I'll connect you with our engineer who worked on it to respond to your feedback after release. Will update you. |
@afinetooth @iurev Please let me know if there is anything else you'd like me to test. If not, I'll proceed with switching out all repos within my purview to the new workflow setup for uploading to Coveralls over the next few days. |
@jrfnl Thanks for the updates! Before you start the switchover, it would be ideal to let us review your results and also post the updates that will go into our documentation. We have a draft right now, but there were a couple of decisions made that were different than expected. The updates will make those clear, and from that point your switchover steps will be obvious and, we hope, simple. Will do my best to get you that today so you can proceed as soon as Mon. |
@afinetooth Of course, take your time and please let me know if you'd like me to review any of the documentation updates. |
@afinetooth Just checking in to see how things are progressing on your end ? |
HI @jrfnl. We're a little pressed for time here due to incidents this week, working through a backlog of support requests. We still have that draft though and had more conversation on it, so I hope to work on it and share something tomorrow. Will at-mention you. |
@afinetooth Understood. Good luck with getting the incidents resolved. |
@afinetooth Just checking in to see how things are going... ? |
@afinetooth Anything I can do to move this forward ? How can I help ? |
@jrfnl Thanks, I appreciate you checking back and apologize for the lack of response. If you don't mind me asking for a little help re-orienting around the exact deliverables to help you proceed, I plan to carve out a couple of hours this Fri to complete them for you. To review: On Sep 14 you had said:
To which, on Sep 21, I had replied:
So my understanding of what I hoped to provide as a deliverable is a final list of updated recommendations, which also take into consideration both Dependabot PRs and forked PRs. I have that, in the form of my last draft, which I wanted to review again before sharing it because it pivots on the earlier recommendation, from us, to use the In order to further justify that reversal, I was hoping to compare my recommendations to each of your test cases above to verify they work with the new recommendations, and why, but, TBH, that is the effort I am struggling to find time for. So here is a proposal:What if I share my latest draft of updated recommendations, along with excerpts of our internal engineering conversation, to the extent they are helpful / illuminating? Then, at least, you can get a sense as to why our basic recommendation is to continue using the So far, I have only addressed the first of those cases:
At least for this case, I know our recommendations to work for that case because removing the I'll strike a line here to separate the updated recommendations: RecommendationsSummaryWe are basically back where we have always been in terms of recommending that users of the Coveralls GitHub Action always use the Furthermore, as this is the default behavior of the Coveralls GitHub Action, users need do nothing to select this token by which their repo will be authenticated by the Coveralls API. The only caveat here is that, for this to work, the incoming Follow-On RecommendationsFor Dependabot PRs:Workflow runs triggered by Dependabot PRs run as if they were from a forked repository, so follow the recommendations for forked repositories. For Forked PRs:
Other important details:
ConversationThe internal engineering conversation that resulted in the above recommendations: Please note: Names and handles have been redacted to protect the innocent. |
@afinetooth Thanks for getting back to me.
Well, that + updated documentation on the Coveralls website based on those recommendations ?
AFAICS this is correct as demonstrated via this PR: PHPCSStandards/PHPCSUtils#514 Other than that, the recommendations so far look good. I think the most important bit for the updated documentation is to recommend to always use the Just to reiterate what I have tested with the
In contrast to that, using the
Also note that Dependabot PRs are a special breed. There are repo local PRs, not PRs from forks, but get special treatment in GitHub Actions. Hope this helps. Let me know if you want me to read through/review further texts. |
@afinetooth Any update ? |
Also wondering about the value to use for As per #1721 (comment), I've used |
@afinetooth Ping ? |
Simplify the code coverage workflow by removing the dependency on the `php-coveralls/php-coveralls` package and switching to the `coverallsapp/github-action` action runner, which, as of the release of the [0.6.5 version of the Coverage Reporter](https://github.com/coverallsapp/coverage-reporter/releases/tag/v0.6.5) now natively supports the Clover format. The `COVERALLS_TOKEN` can now be removed from Settings -> Secrets. Ref: lemurheavy/coveralls-public#1721
@afinetooth I'm getting to the point where I'm done waiting. It's been two months since I ran those test scenarios. You asked me to hold off from using this workflow for the time being while you double-checked things, but in the mean time repos are still running into the issues described above, so I would really really really like to start using the new setup... |
@jrfnl Im truly sorry for the miscommunication. I was under the impression you were using the new workflow. Have you tried that? Or are you still waiting on confirmation? We are go on the new workflow, we are just behind on updating documentation. My goal at this point would be to get you on the new workflow and make sure you're not having any issues with it. Can you please try and confirm either way. |
@afinetooth I am for the repo which was used to run the tests...
... but was waiting for confirmation before updating the workflows in all the other repos as you requested.
I have the branches ready to go locally, so I'll pull & merge over the weekend. |
@afinetooth I've started pulling the changes and the workflows are fine, but I am seeing some changes in the reported coverage. In most cases, the changes are small, but sometimes they are more significant. Looks to be related to a difference in line counts between This might be an interesting build to have a look at: https://coveralls.io/builds/64166567 (coverage changed gives the best view): |
@jrfnl Yes, this is a known issue we're investigating right now, likely a regression from a recent release. Hoping for a quick fix by Mon. Thanks for the example build. 🙏 |
@afinetooth In case it helps: I have the feeling (though haven't dug in deep to confirm) that it is the |
@jrfnl Ok, thanks for that. I'll look at your coverage report to confirm. Do you not see function definitions being counted as relevant in your native reports? (I believe there's a debate about that.) I'll share a JSON version so you can compare. |
@afinetooth This is a screenshot from the PHPUnit native HTML report (for another package) and as you can see, the function declaration lines itself are not counted: |
@jrfnl Haven't had a chance to look yet, but sharing the reports for this build in case it's helpful: |
@jrfnl Just an update: I created an Engineering ticket for this and, while we're still working through a backlog from the holiday, someone should at least look at it today, so I'll get you an update as soon as I see one. |
@jrfnl I just got to examining this and, unfortunately, it looks like the coverage reports you exported were our already-converted ones (they match the ones processed by our API as you'll see below): I understand the original I did some digging around for example Here's that test fixture file. I'm not sure if it's full and identical to what must have been taken from a locally-run coverage report, but I did see that it was created around Sep 1, so I found the nearest Source File Report at Coveralls: And I did notice that, back then, the report was not marking function declarations as relevant: But recent reports, as we know, do: So, depending on the date you switched to the Coveralls GitHub Action, we can probably prove that our
|
Similar to issue #1710 (which is still open, but seems resolved and involves
coveralls-python
).I've started seeing the same as of today with GH Actions builds involving
php-coveralls
. The builds still worked find yesterday and no changes have been made to the workflows and PHP Coveralls have not released any new versions between yesterday and today.Relevant part of the workflow:
In the GH Actions log:
Link to the workflow file: https://github.com/PHPCSStandards/PHPCSUtils/blob/aa23fbf1cbdfa15ac381eec08169b8cb8dea1e49/.github/workflows/test.yml#L258-L385
Link to the GH Actions transcript for a failing build: https://github.com/PHPCSStandards/PHPCSUtils/actions/runs/5517110692/jobs/10074460474
Link to the repo on Coveralls: https://coveralls.io/github/PHPCSStandards/PHPCSUtils
The text was updated successfully, but these errors were encountered: