-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Refactor [SymfonyInsight] to new service model and rename #2572
Conversation
|
Thanks for picking this up :) As far as testing strategy, Wheelmap is a similar case that @PyvesB recently did some work on in #2486. It's a combination of mocked tests and live tests, with live tests that run when a token is available. We created accounts with tokens for prod, CI, and staging. I forgot that document existed; just opened a PR to bring a couple things up to date. |
Excellent, I was just looking through the wheelmap tests and think I can get that working here. I assume that means that the tokens are already set up for Sensiolabs in CI too? |
They are not, though we probably should add one. All the CI tokens are referenced in the CircleCI config. Probably we should also collect these secrets somewhere. |
From the review app: Are these previews wrong? I feel like the LHS on the first one probably should be grade. Colors look good! These example links are both showing not authorized to access project: |
We can use the tokens I created for building out the tests, although honestly any API/User token will do as those are public analyses/projects |
Do you think we should change the error message when a token is not configured? |
Interesting idea. What exactly were you envisioning? Throwing some kind of error when the tokens are missing, or making the request anyway and adding a new/different error messages? I could see that being helpful for us when looking at staging/prod, and also for any potential self-hosting Shields users that are trying to create badges, especially from their private SymfonyInsight analyses. I definitely think it is worth making a distinction between "oops, you have no tokens" vs. "well you have a token but that token isn't authorized to access project foo" |
Yea, I'm thinking throwing an error when there are no tokens, perhaps a new subclass ImproperlyConfigured. |
I really like that idea. Are you good with updating this PR with a throw, and doing the subclass work in a separate stream? |
Alright the service will now throw an error (I chose I've added a review comment on the relevant portions of the test file on that topic |
… into sensiolabs-refactor
I believe this is ready to merge (barring any final comments/suggestions), but there's now a merge conflict that GH is telling me I don't have access to resolve 🤔 I deleted the |
Have you tried resolving it in the CLI? If you merge master into this branch you should be able to. Added: I took care of it :) |
Thanks! |
Based on some discussion/feedback here, this PR now contains several changes:
Sensiolabs
badge/service content toSymfonyInsight
to reflect the rebranding of that product/serviceBaseXmlService
)symfony/i
as well as a couple tests for the old pathsensiolabs/i
to check for backwards compatibilityRefs #1358