https://github.com/flyteorg/flytetools
Miscellaneous tools for Flyte contributors
https://github.com/flyteorg/flytetools
flyte testing-tools
Last synced: 11 months ago
JSON representation
Miscellaneous tools for Flyte contributors
- Host: GitHub
- URL: https://github.com/flyteorg/flytetools
- Owner: flyteorg
- License: apache-2.0
- Created: 2019-07-03T19:36:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-30T10:36:46.000Z (almost 2 years ago)
- Last Synced: 2025-06-27T01:40:44.761Z (11 months ago)
- Topics: flyte, testing-tools
- Language: Python
- Size: 37.5 MB
- Stars: 7
- Watchers: 247
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
=============
Flyte Tools
=============
This repository contains miscellaneous tools for Flyte contributors.
Tools
#######
Swagger Client Code Generator
*******************************
Because Flyte IDL takes advantage of the grpc-gateway project, the proto file generated by the Swagger gRPC generator is mostly Swagger/OpenAPI compliant. That is, we can run a code generator on top of the OpenAPI spec that's produced. See the file in ``gen/pb-go/flyteidl/service/admin.swagger.json``.
However, in generating HTTP clients from the publicly available Docker images, we found two issues. The Dockerfile in the ``swagger-codegen-cli`` directory fixes these and the final image is used in the `flyteidl generate script `__)
#. Use version 2.4.0 to solve the pointer struct fields.
To create the image ::
cd swagger-codegen-cli
make docker_build
The ``Dockerfile`` will
* Re-build ``swagger-codegen-cli.jar`` with the `fixed go template `__ using Maven ``mvn clean package``.
* Follows the pattern in the original `CLI `_ to create one with our changes.
Currently, the default host is ``localhost`` for both the clients and the version is ``1.0.0``.
The GO client can be tested creating a main file, like
.. code-block:: go
cfg := flyteadmin.NewConfiguration()
cfg.BasePath += ":30081" // default localhost.
client := flyteadmin.NewAPIClient(cfg)
// e.g. This calls the list projects endpoint.
projects, _, err := client.AdminServiceApi.ListProjects(context.Background())