threefoldtech / web3gw

Proxy for the web3 world
Apache License 2.0
1 stars 1 forks source link

3lang: tfgrid: define actions and do the implementation #95

Closed MarioBassem closed 1 year ago

MarioBassem commented 1 year ago

Issue: https://github.com/threefoldtech/web3_proxy/issues/94

MarioBassem commented 1 year ago

@brandonpille i think we can do both, customizable and simple, and it should still be easy to use. for the actions part, if this is the users gateway to deploying stuff, then the options are many. so i need to know which solutions would be exposed. right now we have solutions for deploying:

brandonpille commented 1 year ago

@brandonpille i think we can do both, customizable and simple, and it should still be easy to use. for the actions part, if this is the users gateway to deploying stuff, then the options are many. so i need to know which solutions would be exposed. right now we have solutions for deploying:

  • machines
  • kubernetes clusters
  • gateways
  • discourse
  • funkwhale
  • peertube
  • presearch
  • zdbs
  • taiga
  • machine with a mounted qsfs

Eventually all should be possible. So we can already start defining the actions

brandonpille commented 1 year ago

@robvanmieghem what do you mean by have main as default instead of tgrid.main?

robvanmieghem commented 1 year ago

@brandonpille Don't call the action tfgrid.main to indicate mainnet but a grid property for example that deploys to mainnet by default if not specified.

brandonpille commented 1 year ago

@brandonpille Don't call the action tfgrid.main to indicate mainnet but a grid property for example that deploys to mainnet by default if not specified.

Ah yes makes sense! Or I would introduce an action load or keys where you put your mnemonic or seed and where you can add the grid property too.

robvanmieghem commented 1 year ago

a separate action with tfgrid.settings does make sense, it's better than a property on every action. It's context, which might be provided in a different way too. It's also meant to be usable in wiki's and the main story states "when info needs to requested, it will just return json formatted info"

MarioBassem commented 1 year ago

i added some code, it should be a bit more clear now how parsing works.

brandonpille commented 1 year ago

i added some code, it should be a bit more clear now how parsing works.

Can you first define the actions in a markdown file? It's not a good idea to start the implementation if the input is not yet known. Let's define the input first, provide some examples. After that we can start the implementation.

MarioBassem commented 1 year ago

i added some code, it should be a bit more clear now how parsing works.

Can you first define the actions in a markdown file? It's not a good idea to start the implementation if the input is not yet known. Let's define the input first, provide some examples. After that we can start the implementation.

@Omarabdul3ziz and i udpated the parser.md file, and added tfgrid actions' docs here

MarioBassem commented 1 year ago

@Omarabdul3ziz and i were discussing some specifications about 3lang, and we had some questions:

MarioBassem commented 1 year ago

i resolved some comments, commented on some others. i'll just work on the machines with gateways solution to allow updates, then add the appropriate documentation for it

brandonpille commented 1 year ago

i resolved some comments, commented on some others. i'll just work on the machines with gateways solution to allow updates, then add the appropriate documentation for it

Alright thanks! Could you also check why CI is red?

MarioBassem commented 1 year ago

@Omarabdul3ziz and i did the required refactoring for the tfgrid actions. we had some remarks, which may or may not be important, but here they are anyway:

regardless of the remarks above, we did the refactoring as proposed for most of the basic tfgrid, but i think it would be useful to get some feedback on this before continuing

MarioBassem commented 1 year ago

resolved @brandonpille latest comments in https://github.com/threefoldtech/web3_proxy/pull/132

robvanmieghem commented 1 year ago

I understand this PR is about 3lang for tfgrid and the implementation requires tfgrid to be implemented. The examples are not just 3lang in this PR but also tfgrid solutions but those are not documented in the manual

robvanmieghem commented 1 year ago

Do want all solution structs and definitions like peertube and funkwhale to be directly in the threefoldtech.threebot.tfgrid module in the v client? Same for the serverside go package.

brandonpille commented 1 year ago

solutions

I think they are. Look under manual/src/threelang/tfgrid

brandonpille commented 1 year ago

Do want all solution structs and definitions like peertube and funkwhale to be directly in the threefoldtech.threebot.tfgrid module in the v client? Same for the serverside go package.

What do you mean? Do you want all structs and definitions under lib/tfgrid?

MarioBassem commented 1 year ago

solutions

I think they are. Look under manual/src/threelang/tfgrid

actually these are the docs for the old examples, they're there but they still need to be updated. will update them.

robvanmieghem commented 1 year ago

Do want all solution structs and definitions like peertube and funkwhale to be directly in the threefoldtech.threebot.tfgrid module in the v client? Same for the serverside go package.

What do you mean? Do you want all structs and definitions under lib/tfgrid?

It was a question, I misformulated it ( should have been "Do we want"). I actually don't like it all flat in the root tfgrid module/package. Off course, this does not mean that 3lang ( which is an easy to use intermediate language) should follow the same naming as the modules/packages do.

robvanmieghem commented 1 year ago

solutions

I think they are. Look under manual/src/threelang/tfgrid

Well, the non 3lang examples/tfgrid have been heavily modified while the non 3lang manual is not.

brandonpille commented 1 year ago

Do want all solution structs and definitions like peertube and funkwhale to be directly in the threefoldtech.threebot.tfgrid module in the v client? Same for the serverside go package.

What do you mean? Do you want all structs and definitions under lib/tfgrid?

It was a question, I misformulated it ( should have been "Do we want"). I actually don't like it all flat in the root tfgrid module/package. Off course, this does not mean that 3lang ( which is an easy to use intermediate language) should follow the same naming as the modules/packages do.

Where else woudl you put it?

brandonpille commented 1 year ago

Oh I see. @MarioBassem can you make sure that the documentation on the tfgrid examples is up to date?