Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: SurveyCanceller per survey #2337

Merged
merged 17 commits into from
May 17, 2024

Commits on May 9, 2024

  1. BROKEN - Fix: start survey cancellator on startup

    The Supervisor API expects a set of task descriptions to start, not the
    actual tasks already started - as we were sending it.
    
    This is still broken, since the consumers can't subscribe to the
    producer if it hasn't started yet - and the app crashes.
    
    See #2147
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    021ac91 View commit details
    Browse the repository at this point in the history
  2. Refactor: SurveyCanceller per survey

    Instead of using consumers and producers, upon app startup we launch a
    single SurveyCanceller process per each survey.
    
    We still have to change the "online" behaviour (when we start cancelling
    a survey while the app is already started).
    
    See #2147
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    74d07ab View commit details
    Browse the repository at this point in the history
  3. WIP - Using new SurveyCanceller from controller

    Instead of the old consumers and producers.
    
    See #2147
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8dbe8f8 View commit details
    Browse the repository at this point in the history
  4. WIP: Simplify SurveyCanceller per survey

    Instead of having a producer and consumers, have a single actor per
    Survey.
    
    Still have to fix/refactor the canceller tests.
    
    See #2147
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8919f15 View commit details
    Browse the repository at this point in the history
  5. Fix SurveyCanceller tests

    Which may not necessarily be about SurveyCanceller, but this will do for
    the time being.
    
    See #2147
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    35d575f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fab8f76 View commit details
    Browse the repository at this point in the history
  7. Don't override exit code and reason after cancel

    The exit_code and reason are already being set by the SurveyAction
    
    See #2337
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    ece0a25 View commit details
    Browse the repository at this point in the history
  8. Fix SurveyCanceller package and path

    We've dropped the "respondents" part of the name long ago, and it's part
    of the runtime actually.
    
    See #2337
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    eb87acc View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    25bcb33 View commit details
    Browse the repository at this point in the history
  10. Fix imports

    See #2337
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e46eb19 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c96c29b View commit details
    Browse the repository at this point in the history
  12. Fix: check for dispositon changes in tests

    Looks like the log entries are getting stored in different order in the
    CI, which is probably not really an issue.
    
    This commit changes how we check for the last disposition change in the
    tests, so we avoid asserting on a "response" entry log instead.
    
    See #2337
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    81ed71e View commit details
    Browse the repository at this point in the history
  13. Fix: SurveyBroker tests with log entry order

    Doesn't really have to do with the current PR, but are failing anyway
    matiasgarciaisaia committed May 9, 2024
    Configuration menu
    Copy the full SHA
    03be2a3 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Make canceller resilient

    If cancelling a respondent raises an error, we log the issue in Sentry
    and continue cancelling the rest of them.
    
    We keep the survey Cancelling so we wait for human intervention.
    
    See #2337
    matiasgarciaisaia committed May 10, 2024
    Configuration menu
    Copy the full SHA
    58b539f View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Rename internal function

    The function effectively marks the survey as terminated - the
    cancellation is the whole process of managing respondents + the survey.
    
    See #2147
    See #2337
    
    Co-authored-by: Ana Pérez Ghiglia <[email protected]>
    matiasgarciaisaia and anaPerezGhiglia committed May 13, 2024
    Configuration menu
    Copy the full SHA
    863e2df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0e53c4 View commit details
    Browse the repository at this point in the history
  3. Extract assertion as test helper

    Since it's shared in at least two different test modules.
    
    See #2147
    See #2337
    matiasgarciaisaia committed May 13, 2024
    Configuration menu
    Copy the full SHA
    9dc98c3 View commit details
    Browse the repository at this point in the history