Push queue not visible to admins

Created on 5 December 2024, 4 months ago

Problem/Motivation

Site admins have no way to monitor deferred push behavior by inspecting the queue.

Steps to reproduce

In these steps, Entity refers to whatever entity you can create that has a push mapping to Salesforce, eg: Redhen Contact.

1. Salesforce/Mappings/Entity/Settings
2. Disable real-time push, and Save settings.
3. Create a new Entity and save it.
4. Examine Configuration/System/Queue Manager. EXPECT: Salesforce Push queue, particularly since there's a Salesforce Pull queue. ACTUAL: no such queue.

Proposed resolution

Examining the code it appears that the salesforce_pull module used the built-in Drupal queue which has nice Admin UI, but salesforce_push rolled their own custom queue and failed to implement any Admin UI.

I don't know if there's a particular requirement that led to this differing implementation. If there isn't, an ideal fix would refactor salesforce_push to just use Drupal's built-in queue.

I have a pressing need and lack time to do that ideal fix.

A more expedient fix is to implement hook_views_data() which would let site admins build their own UI using Views.

Remaining tasks

Implement the fix and post it as MR and patch!

User interface changes

newly appears as an available view source table.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

5.1

Component

salesforce_push.module

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @josephr5000@yahoo.com
  • Pipeline finished with Failed
    4 months ago
    Total: 237s
    #359809
  • Pipeline finished with Canceled
    4 months ago
    Total: 129s
    #359814
  • Pipeline finished with Failed
    4 months ago
    Total: 219s
    #359816
  • MR added. Here's a patch for convenience.

  • Updated the remaining tasks since fix and MR are done.

  • Issue was unassigned.
  • Status changed to Needs review 19 days ago
  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    Yes, the whole queue system needs an overhaul.

    Ideally, each mapping would define its own derivative, so that we can continue to use the per-mapping settings we have now.
    We probably still need a custom database backend for the push queue, but I don't think we actually need the custom PushQueueProcessorInterface.
    Probably would be useful to have a custom database backed for pull queue as well.

    Anyway, thank you for the patch - this looks fine and good.
    I'm hesitant to merge it because I don't really want to go down the rabbit hole of supporting a views integration in the short and medium term if we're looking towards this longer term change.

  • Thanks Aaron, and I agree this isn't the right solution...it's an expedient workaround. I agree it should not be merged.

    Curious about one item in your comment. Wondering why the current pull queue back-end (the default database queue) wouldn't also work for the push queue? That way you get all the nice Drupal queue UI for free.

  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    One reason is to dedupe the queue entries.
    This is happening already in Push Queue, but not Pull Queue.

    Since the core database queue serializes all the data, there's no simple way to dedupe without loading every single queue item.
    Not feasible.

    For this same reason, I think Pull Queue should also be converted to a custom backend.

    Another reason - not currently happening for push queue, but again not feasible with core queue - is so that queue items can be batched to minimize API usage.

  • Aaron, thanks for the clarification.

    Aside-- advancedqueue added deduplication support. Not sure if that meets your needs but am wondering if it's a way for you to lower the amount of custom queue code (and associated admin UI) required in this module.

  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    oh nice, https://www.drupal.org/project/advancedqueue β†’ might do the trick

    i'm all about maintaining less code whenever possible

Production build 0.71.5 2024