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

Feed 404 causes internal 500 error when creating a label #47

Open
PeterJCLaw opened this issue Mar 13, 2018 · 3 comments
Open

Feed 404 causes internal 500 error when creating a label #47

PeterJCLaw opened this issue Mar 13, 2018 · 3 comments
Labels

Comments

@PeterJCLaw
Copy link
Contributor

PeterJCLaw commented Mar 13, 2018

If you have a config like:

state_machines:
  the_workflow:
    feeds:
      - name: jacquard
        url: http://localhost:1212/<label>
    states:
      - gate: choice
        triggers:
          - event: entry
        exit_condition: true
        next:
          type: context
          path: feeds.jacquard.has_option_b
          default: option_a
          destinations:
            - value: true
              state: option_b

      - gate: option_a
        exit_condition: false

      - gate: option_b
        exit_condition: false

which uses a feed in the exit of the first state, but that feed returns a 404 (likely because it's misconfigured, though that might also be a correct response), then the overall creation request will error with LabelAlreadyExists.

@PeterJCLaw PeterJCLaw changed the title Feed 404 causes LabelAlreadyExists error when creating a label Feed 404 causes LabelAlreadyExists error from the sdk when creating a label Mar 13, 2018
@PeterJCLaw
Copy link
Contributor Author

Note: I'm using the routemaster_sdk to access routemaster, so it's possible that this is a result of the automatic retries I have configured. If that's the case, then the issue is more likely that routemaster is erroring internally.

@PeterJCLaw PeterJCLaw changed the title Feed 404 causes LabelAlreadyExists error from the sdk when creating a label Feed 404 causes internal 500 error when creating a label Mar 13, 2018
@PeterJCLaw
Copy link
Contributor Author

PeterJCLaw commented Mar 13, 2018

Update: the LabelAlreadyExists is indeed a result of the retrying I was doing. It looks like the label is indeed created fine, but then the processing of the first gate errors, which results in emitting a 500. I was then seeing an (arguably valid) LabelAlreadyExists from the retries.

I think that in the config outlined above, this also means that the label becomes stuck as nothing will cause the gate to be re-evaluated.

@danpalmer danpalmer added the Bug label Apr 19, 2018
@prophile
Copy link
Contributor

prophile commented Oct 9, 2018

Related: we now roll back the entire transaction correctly on a 500.

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

No branches or pull requests

3 participants