apigee-edge-drupal icon indicating copy to clipboard operation
apigee-edge-drupal copied to clipboard

Eliminate repated sync of developer/users with no reason

Open mxr576 opened this issue 5 months ago • 4 comments

Closes #1152

TODO

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

mxr576 avatar Jun 18 '25 14:06 mxr576

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 :stop_sign:
  • in the Drupal's database - this may work :heavy_check_mark:

or else...?

mxr576 avatar Jun 18 '25 14:06 mxr576

Codecov Report

:x: Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 43.63%. Comparing base (1f0f840) to head (e335e96).

Files with missing lines Patch % Lines
src/Job/DeveloperCreateUpdate.php 0.00% 4 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##                4.x    #1153       +/-   ##
=============================================
+ Coverage     27.28%   43.63%   +16.34%     
  Complexity     3067     3067               
=============================================
  Files           342      342               
  Lines         11228    11228               
=============================================
+ Hits           3064     4899     +1835     
+ Misses         8164     6329     -1835     
Files with missing lines Coverage Δ
src/Job/DeveloperSync.php 100.00% <100.00%> (+100.00%) :arrow_up:
src/Job/UserCreateUpdate.php 75.67% <100.00%> (+75.67%) :arrow_up:
src/Job/DeveloperCreateUpdate.php 36.00% <0.00%> (+36.00%) :arrow_up:

... and 113 files with indirect coverage changes

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

codecov[bot] avatar Jul 02 '25 14:07 codecov[bot]

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

mxr576 avatar Jul 04 '25 10:07 mxr576

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 avatar Jul 04 '25 12:07 kedarkhaire