Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

adds retry logic for rnr#772

Open
jsandland wants to merge 3 commits intostagefrom
rnr-retry
Open

adds retry logic for rnr#772
jsandland wants to merge 3 commits intostagefrom
rnr-retry

Conversation

@jsandland
Copy link
Collaborator

@jsandland jsandland commented Nov 10, 2025

Summary

Briefly describe the features or fixes introduced in this PR.

  • adds retry logic for IMS token for ratings and reviews API
  • hide the ratings block if the authToken is not available

Jira Ticket

Resolves: MWPW-182092


Test URLs

Env URL
Before https://main--express-milo--adobecom.aem.page/express/feature/image/convert/png-to-jpg
After https://rnr-retry--express-milo--adobecom.aem.page/express/feature/image/convert/png-to-jpg?martech=off

Verification Steps

  • Steps to reproduce the issue or view the new feature.
  • What to expect before and after the change.

Potential Regressions

  • https://--express-milo--adobecom.aem.live/express/?martech=off

Additional Notes

(If applicable) Add context, related PRs, or known issues here.

@aem-code-sync
Copy link

aem-code-sync bot commented Nov 10, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@github-actions github-actions bot added the Ready for Review Ready for peer review. label Nov 10, 2025
@aem-code-sync
Copy link

aem-code-sync bot commented Nov 10, 2025

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 12.24490% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.21%. Comparing base (a31905e) to head (ed30944).

Files with missing lines Patch % Lines
express/code/scripts/utils/ratings-utils.js 12.24% 43 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            stage     #772      +/-   ##
==========================================
- Coverage   70.38%   70.21%   -0.18%     
==========================================
  Files         108      107       -1     
  Lines       24785    24743      -42     
==========================================
- Hits        17446    17373      -73     
- Misses       7339     7370      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@echen-adobe
Copy link
Collaborator

The test link 404s for me

@nateyolles
Copy link
Collaborator

I updated the test link. It now loads.

const { tokenInfo } = window.adobeIMS ? await window.adobeIMS.refreshToken() : {};
return tokenInfo;
} catch (e) {
return {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this logged somewhere?

Copy link
Collaborator Author

@jsandland jsandland Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't log in getRefreshToken because errors are already logged at the API boundaries where operations fail for fetchRatingsData and submitRating. This avoids redundant logging. If we were to log here we would generate multiple LANA entries for the same underlying issue. The error is properly captured and returned to the caller for handling. We don't show the ratings block if the token is unavailable so the user experience is protected if for some reason they don't receive an IMS accessToken.

@fullcolorcoder fullcolorcoder added Ready for QA and removed Ready for Review Ready for peer review. labels Nov 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants