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

Missing Segment.MatchType in export #710

Closed
kevin-ip opened this issue Feb 18, 2022 · 3 comments · Fixed by #711
Closed

Missing Segment.MatchType in export #710

kevin-ip opened this issue Feb 18, 2022 · 3 comments · Fixed by #711
Labels

Comments

@kevin-ip
Copy link
Contributor

Describe the bug
Exporting a segment with match type = "Match Any" and import it back updates the match type to "Match All"

Version Info
Run flipt --version and paste the output here.

/ $ ./flipt -v

 _____ _ _       _
|  ___| (_)_ __ | |_
| |_  | | | '_ \| __|
|  _| | | | |_) | |_
|_|   |_|_| .__/ \__|
          |_|

Version: 1.6.1
Commit: 8ea0d0a8c150305e72b079f44a6b01d74b917bc0
Build Date: 2022-02-18T16:55:17Z
Go Version: go1.17.6
/ $

To Reproduce
Steps to reproduce the behavior.

  1. start container with the following docker-compose.yaml
version: "3.9"

services:
  flipt:
    image: markphelps/flipt:v1.6.1
    ports:
      - 8080:8080
    volumes:
      - ${PWD}/settings:/opt/settings
  1. visit localhost:8080
  2. create a segment with Match Type = "Match Any"
  3. create two constraints
  4. logon to the container: docker exec -it $containerID sh
  5. export the settings: ./flipt export -o /opt/settings/out.yaml
  6. go back to the host terminal
  7. shutdown and restart the docker compose: docker-compose down && docker-compose up -d
  8. logon to the container: docker exec -it $containerID2 sh
  9. import the settings: ./flipt import /opt/settings/out.yaml
  10. visit localhost:8080 and see the segment
  11. the Match Type is updated to "Match All"

Expected behavior
Expected the match type of the imported segment be "Match Any"

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Examples:

  • OS
  • Config file used
  • Database used (SQLite or Postgres)
    SQLite
@kevin-ip kevin-ip added the bug label Feb 18, 2022
@markphelps
Copy link
Collaborator

Thanks for reporting @kevin-ip ! I've got a fix PR for this

@markphelps
Copy link
Collaborator

@kevin-ip this should be fixed in v1.6.2

@kevin-ip
Copy link
Contributor Author

Awesome! Thanks for the quick fix.

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

Successfully merging a pull request may close this issue.

2 participants