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

Symfony Insight Badges show "invalid response data" on projects that haven't been analyzed recently #2928

Closed
1 of 3 tasks
arcanedev-maroc opened this issue Feb 5, 2019 · 8 comments · Fixed by #2971
Closed
1 of 3 tasks
Assignees
Labels
bug Bugs in badges and the frontend service-badge Accepted and actionable changes, features, and bugs

Comments

@arcanedev-maroc
Copy link

Are you experiencing an issue with...

🪲 Description

Insight Badge

I saw this problem on multiple PHP projects that are using symfony/insight and i have no clue what is the issue.

🔗 Link to the badge

https://img.shields.io/sensiolabs/i/ae37b4c0-5478-4afb-9a71-1fe5534d8ef5.svg?style=flat-square

Repos

@calebcartwright calebcartwright self-assigned this Feb 5, 2019
@calebcartwright calebcartwright added service-badge Accepted and actionable changes, features, and bugs bug Bugs in badges and the frontend labels Feb 5, 2019
@calebcartwright
Copy link
Member

calebcartwright commented Feb 6, 2019

The root cause is that our schema validation for Symfony Insight is expecting there to be a value for status from an expected/known set, but it looks like for the projects you linked there is no status. From the XML response: <status />

I think we'll need to relax the schema a bit

@calebcartwright
Copy link
Member

@arcanedev-maroc by any chance do you have any guesses as to why there's no status values for those projects? We use the value of the status field to handle scenarios when a badge is requested for a project that is mid-analysis, so I want to make sure we don't break that.

Would you be willing to re-run an analysis on one of your projects so that I can check the values before/during/after analysis? I don't use the service myself but would love to get this fixed, and that'd be a big help!

@arcanedev-maroc
Copy link
Author

arcanedev-maroc commented Feb 7, 2019

@calebcartwright

I have no idea about the status values !

I've been using the badges for years with a default project skeleton and i'm not aware about the value of the status field. Is there something i need to setup in my projects or third party services ?

I've just re-run manually the analysis on one of my projects: https://insight.symfony.com/projects/ae37b4c0-5478-4afb-9a71-1fe5534d8ef5/analyses/106

@calebcartwright
Copy link
Member

Perfect thanks! The Symfony API response now has a status value of finished for that project which is what our code was expecting.

The badges are working for that project now:
https://img.shields.io/symfony/i/grade/ae37b4c0-5478-4afb-9a71-1fe5534d8ef5.svg?style=flat

https://img.shields.io/symfony/i/violations/ae37b4c0-5478-4afb-9a71-1fe5534d8ef5.svg?style=flat

In the short term I think the easiest way to get the badges working again for your project would be to re-run analyses on them. My guess is that the status field may only have a value when there's been a recent analysis, but I'll keep digging into it

@arcanedev-maroc
Copy link
Author

Yes indeed, i re-ran the analysis and it's seems the problem was solved for the projects i've mentioned.

Thanks for your work & time 👍

@calebcartwright
Copy link
Member

Hey @bkdotcom do you have any projects using Symfony Insight you could share? I'm trying to determine the range of values we can expect to see in the API response, in particular for projects that haven't been analyzed in a while (ideally not analyzed for a few weeks/months).

I don't use the service myself, and the projects listed in the Public Analysis section have all been run within the last few hours.

@arcanedev-maroc
Copy link
Author

arcanedev-maroc commented Feb 11, 2019

Hi @calebcartwright,

You can check my organization's profile: https://github.com/ARCANEDEV

It has some old repos with Symfony Insight.

@calebcartwright
Copy link
Member

Just an FYI that I've added a fix for this in #2971 (which is also adding a Stars badge for Symfony Insight)

@calebcartwright calebcartwright changed the title [BUG] Badge shows "invalid response data" for symfony/insight Symfony Insight Badges show "invalid response data" on projects that haven't been analyzed recently Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs in badges and the frontend service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
2 participants