cli icon indicating copy to clipboard operation
cli copied to clipboard

`tuple delete` should support CSV files

Open aaguiarz opened this issue 1 year ago • 6 comments

Given tuple write supports CSV file, we should add support for CSVs in tuple delete for consistency reasons.

We'd be able to run the command below if we want to delete the tuples we just added

fga tuple write --file tuples.csv
fga tuple delete --file tuples.csv

aaguiarz avatar Feb 14 '24 13:02 aaguiarz

I can attempt this, it will be my first issue / enhancement ever. It may take me some time, hopefully that's alright.

kindlyturnips avatar Feb 14 '24 16:02 kindlyturnips

@kindlyturnips sounds great, I'll assign it to you. Thanks a lot!

aaguiarz avatar Feb 14 '24 16:02 aaguiarz

Hi @aaguiarz, I have an update of what I have accomplished today. It's mostly getting all the dependencies and the project up and running.

Accomplishments

  1. Downloaded and launched the openfga server with docker
  2. Created stores & authorization models for the stores
  3. Successfully written a json ./dist/fga tuple write --store-id=<> --file ./cmd/tuple/testdata/tuples.json
  4. Successfully written a csv ./dist/fga tuple write --store-id=<> --file ./cmd/tuple/testdata/tuples_without_optional_fields.csv

Tomorrow I will start working on the fga tuple delete --file tuples.csv . Thanks for your patience and allowing me to participate.

kindlyturnips avatar Feb 14 '24 22:02 kindlyturnips

Hello @aaguiarz I think I have it solved. I'm having difficulty with my git push, It appears that I don't have the authority to do so. Could you check this out for me?

kindlyturnips avatar Feb 15 '24 22:02 kindlyturnips

Hi @kindlyturnips

You need to follow the process described here:

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#propose-changes-to-someone-elses-project

  • Fork
  • Push to their fork
  • Open a PR

aaguiarz avatar Feb 15 '24 22:02 aaguiarz

Hello @aaguiarz Thank you for your patience, I've submitted the pull request. Let me know if I made a mistake somewhere in the process. Thanks again for letting me contribute.

kindlyturnips avatar Feb 19 '24 16:02 kindlyturnips