Skip to content

Eliminate repated sync of developer/users with no reason#1153

Open
mxr576 wants to merge 7 commits intoapigee:4.xfrom
mxr576:issue/1152
Open

Eliminate repated sync of developer/users with no reason#1153
mxr576 wants to merge 7 commits intoapigee:4.xfrom
mxr576:issue/1152

Conversation

@mxr576
Copy link
Copy Markdown
Contributor

@mxr576 mxr576 commented Jun 18, 2025

Closes #1152

TODO

  • Code clean up would be nice but the code as-is should also work

@mxr576 mxr576 changed the title Eliminate repeated update of Drupal users Eliminate repated sync of developer/users with no reason Jun 18, 2025
@mxr576
Copy link
Copy Markdown
Contributor Author

mxr576 commented Jun 18, 2025

Okay, so the same trick is not going to work inside \Drupal\apigee_edge\Job\DeveloperCreateUpdate::executeRequest() because the last modified date on the developer is a immutable and calculated on the server (as it should), so we either store the last sync date:

  • in an attribute, which could lead to sync issues when multiple Drupal instances syncs from the same Apigee instance 🛑
  • in the Drupal's database - this may work ✔️

or else...?

@mxr576 mxr576 force-pushed the issue/1152 branch 2 times, most recently from 3bf3d29 to b673014 Compare June 19, 2025 07:59
for all developer/users
@mxr576 mxr576 marked this pull request as ready for review June 19, 2025 08:12
@kedarkhaire kedarkhaire self-assigned this Jun 25, 2025
@kedarkhaire kedarkhaire self-requested a review June 25, 2025 07:03
@kedarkhaire kedarkhaire added this to the 4.0.3 milestone Jun 25, 2025
Copy link
Copy Markdown
Contributor

@kedarkhaire kedarkhaire left a comment

Choose a reason for hiding this comment

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

Hi @mxr576
Testcases are not passing - https://github.com/kedarkhaire/apigee-edge-drupal/actions/runs/15880850942/job/44780502524#step:13:43

Please check & update the test cases also as per the changes.

Thanks!

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 2, 2025

Codecov Report

❌ Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.23%. Comparing base (f11c080) to head (54db20e).
⚠️ Report is 1 commits behind head on 4.x.

Files with missing lines Patch % Lines
src/Job/DeveloperSync.php 0.00% 19 Missing ⚠️
src/Job/UserCreateUpdate.php 0.00% 5 Missing ⚠️
src/Job/DeveloperCreateUpdate.php 0.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##                4.x    #1153       +/-   ##
=============================================
- Coverage     43.55%   27.23%   -16.32%     
  Complexity     3112     3112               
=============================================
  Files           345      345               
  Lines         11382    11382               
=============================================
- Hits           4957     3100     -1857     
- Misses         6425     8282     +1857     
Files with missing lines Coverage Δ
src/Job/DeveloperCreateUpdate.php 0.00% <0.00%> (-36.00%) ⬇️
src/Job/UserCreateUpdate.php 0.00% <0.00%> (-75.68%) ⬇️
src/Job/DeveloperSync.php 0.00% <0.00%> (-100.00%) ⬇️

... and 116 files with indirect coverage changes

🚀 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.

@mxr576
Copy link
Copy Markdown
Contributor Author

mxr576 commented Jul 4, 2025

Thanks for the notice. I need to investigate what happens and what would be a proper fix

@kedarkhaire
Copy link
Copy Markdown
Contributor

Thanks for the notice. I need to investigate what happens and what would be a proper fix

Marking this PR to draft as testcase fix need to be implemented.

@kedarkhaire kedarkhaire marked this pull request as draft July 4, 2025 12:12
@kedarkhaire kedarkhaire removed this from the 4.0.3 milestone Sep 17, 2025
@mxr576
Copy link
Copy Markdown
Contributor Author

mxr576 commented Feb 25, 2026

Hm, previously failing tests got fixed in HEAD? 🤔

This looks unrelated:

1) Drupal\Tests\apigee_edge_apiproduct_rbac\FunctionalJavascript\ApiProductRoleBasedAccessAuthenticatedInternalTest::testApiProductAccess
WebDriver\Exception\JavaScriptError: javascript error: jQuery is not defined

@mxr576 mxr576 marked this pull request as ready for review February 25, 2026 13:51
@mxr576 mxr576 requested a review from kedarkhaire February 25, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drush apigee:sync always updates users

2 participants