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

Flipper UI crashes if feature key contains a '/' #357

Closed
alainravet opened this issue May 15, 2018 · 1 comment · Fixed by #362
Closed

Flipper UI crashes if feature key contains a '/' #357

alainravet opened this issue May 15, 2018 · 1 comment · Fixed by #362
Assignees

Comments

@alainravet
Copy link

alainravet commented May 15, 2018

How to reproduce:

Step 1 : create a key in the console

  bin/rails c
  > Flipper.enabled? 'a/b'
    => false
  > Flipper.enable 'a/b'
    => true
  > Flipper.enabled? 'a/b'
    => true

Step 2 : try and edit the feature in flipper ui

 open https://mydomain.com/features/features
 click on the 'a/b' key
 -> https://mydomain.com/features/features/a/b
                                           ^^^

result (in the browser)

  Flipper::UI::Actions::Gate does not support request method "get"
@jnunemaker jnunemaker self-assigned this May 18, 2018
@jnunemaker
Copy link
Collaborator

I think I've always imagined that feature keys would be string/number, but I don't think it is enforced. I'll take a stab at making this work. If someone else gets itchy first, feel free.

jnunemaker added a commit that referenced this issue May 20, 2018
refs #357

This is a tricky one. The issue is that I was assuming no one would use slashes. Using a slash completely broke all the routing. I changed the routing to be a block so it is more flexible. Now it is possible to route based on anything in request.

The API will likely need the same work.
jnunemaker added a commit that referenced this issue Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants