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

race condition when closing SNow tickets #415

Closed
michamos opened this issue Nov 9, 2023 · 1 comment
Closed

race condition when closing SNow tickets #415

michamos opened this issue Nov 9, 2023 · 1 comment
Assignees
Labels
type: bug Something isn't working

Comments

@michamos
Copy link
Collaborator

michamos commented Nov 9, 2023

When a user submission gets accepted, we send them an email with the link to the record and close the ticket. This is currently done in two different steps (first adding the message to the ticket then closing with the message The ticket has been closed). The problem is that seems racy on SNow: the user gets the email with the message The ticket has been closed twice as the first email often gets sent after the ticket has already been closed. Example (check activity tab to see the whole history of events): https://cern.service-now.com/nav_to.do?uri=%2Fu_request_fulfillment.do%3Fsys_id%3Dccc2699f479a31508c97ed4c736d43f6.

It might be a bug in SNow (though they're saying we're holding it wrong in the ticket I opened) but it would be better if the ticket closing API call would take a closing message as payload to avoid them being two separate SNow events.

We should probably review the whole API to make sure we're doing things properly.

@michamos michamos added the type: bug Something isn't working label Nov 9, 2023
@PascalEgn
Copy link
Collaborator

Tech notes:

  • Refactor inspirehep snow views
    • Combine reply_ticket_with_template and reply_ticket functions into one with optional template and template_context parameter
    • Add parameter to resolve_ticket function to take template and template_context parameter
  • Refactor logic in inspire-next replacing reply_ticket with close_ticket (and adding a template) incase the ticket will get closed in the next step anyways

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants