Skip to content

warm up cache does not work #18933

Closed

Description

@kachely

A clear and concise description of what the bug is.

How to reproduce the bug

  1. Start celery
  2. Start beat
  3. Start flask
  4. There is a request from cache_warmup, but data is not be cached.

Expected results

request will be send by this order: /explore/xxx -> /explore_json/xxx or /api/v1/data/xxx

Actual results

request will be sent by this order: /explore/xxx -> break.

Screenshots

I actually setup a cookie in the request to login in with a warmup user. If I do not add this cookie, it will be redirect to login page.
image
here is the code I used in warm_up

Environment

(please complete the following information):

  • browser type and version:
  • superset version: superset version
  • python version: python --version
  • node.js version: node -v
  • any feature flags active:

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [Y ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • [Y ] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

Activity

  1. srinify commented on Feb 24, 2022

    @srinify
    Contributor

    Hey @kachely this is a start but a bit more context would be useful to the community:

    • What version of Superset are you using and how are you deploying it?
    • What errors / screenshots / etc can you provide and share?
  2. added and removed on Feb 25, 2022
  3. zhaoyongjie commented on Feb 25, 2022

    @zhaoyongjie
    Member

    Hi @kachely, I can't reproduce on the latest master. warm-up cache works well in my local.

    warm-cache.mov
  4. kachely commented on Mar 1, 2022

    @kachely
    Author

    Hi @zhaoyongjie , I believe we do not use "warm_up_cache" api in the latest master in celery.
    We use explore api to refresh
    image
    Please correct me if I am wrong.

  5. kachely commented on Mar 1, 2022

    @kachely
    Author

    Hi @srinify , please see my responses below.

    • What version of Superset are you using and how are you deploying it?
      We do not use the latest version. But we have merged the code of latest master on celery part.
      We start celery instance to call the refresh api.
    • What errors / screenshots / etc can you provide and share?
      /explore api in celery does not work for us. But /warm_up_cache does not support "pie".
  6. zhaoyongjie commented on Mar 1, 2022

    @zhaoyongjie
    Member

    Hi @kachely, Could you point out which URL do you use for cache "warm up"?

  7. kachely commented on Mar 2, 2022

    @kachely
    Author

    Hi @kachely, Could you point out which URL do you use for cache "warm up"?

    I use the url in get_rul function. It returns /superset/explore/?form_data={}.

  8. stale commented on May 1, 2022

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

  9. musicmuthu commented on Jun 1, 2022

    @musicmuthu

    still the issue not solved

  10. musicmuthu commented on Jun 2, 2022

    @musicmuthu

    #.pinned #bug #pinned

  11. atticoos commented on Jun 4, 2022

    @atticoos
    Contributor

    @zhaoyongjie in your video, it appears you are sharing the same web session as the authenticated user.

    The problem is that the celery worker is an unauthorized agent, and gets a 302 redirect to login. eg
    image

  12. atticoos commented on Jun 4, 2022

    @atticoos
    Contributor

    @kachely would you mind sharing your patches for authorizing the cache worker? I've been stuck with this for days, and #9597 has been dead for 2 years.

  13. rgarrigue commented on Jun 7, 2022

    @rgarrigue

    A workaround would be nice to share, we're having performance issues, a functional warm up could help

  14. vnaidu-wish commented on Jun 8, 2022

    @vnaidu-wish

    Any updates on this.
    Seems like even the superset/warm_up_cache/?slice_id=XXX does not work for many charts.
    i.e. echarts_area / echarts_timeseries_line

  15. atticoos commented on Jun 8, 2022

    @atticoos
    Contributor

    I got a workaround working locally on my fork, f57fab7, discussed here #9597 (comment)

    But I haven't successfully built an image yet, as I am running into unrelated issues with node building the frontend

  16. ensky commented on Jun 15, 2022

    @ensky
    Contributor

    @ajwhite I sent a PR to address this issue, which is working in my environment.

  17. rgarrigue commented on Jun 22, 2022

    @rgarrigue

    Anyone can push this PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions