Code Monkey home page Code Monkey logo

api-saagie's People

Contributors

augustinpeyridieux avatar courbeb avatar guillaumeprevost76 avatar hugopoupon avatar julienfrc avatar m0lekul avatar nicolas-renard avatar qiwei08 avatar rvsaagie avatar saagie-service avatar tfellet avatar tquiviger avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-saagie's Issues

instances information are not the same as you get it by the job or by the instance id

Describe the bug
There is no consistency on the instance information we can get as we go by the job or by the instance.
When I called job.get_instance, it didn't return the start date and end date of the instance.
When I called job.get_info, I had the dates but not the version information.

Expected behavior
I want the same level of information on the instance as I use one or another method.

this is a test

Describe the bug
A clear and concise description of what the bug is.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Test

This is a test

Refactoring

To ensure maintainability of the current codebase, the following refactoring should be done

  • Remove the manager(V1) code
  • All the code under projects should be moved directly under the saagieapi directory
  • Code in the auth.py file should be put in saagieapi.py file
  • Code regarding jobs, pipelines, projects should be separated by functionality, same for the gql queries. The new code structure would be something like :
saagieapi
    saagie_api
    pipelines
        pipelines.py
        gql.py
    jobs
    apps
    projects
    env_vars
    docker_credentials

This would mean creating new classes for each main functionnality (pipelines, jobs...) that inherits the SaagieApi main class.
Let's take an example with the create_job function that would be now in the jobs.py file, and named create so that calling this function would mean calling saagieapi.jobs.create. The original create_job in saagieapi would be tagged as deprecated and will call the new function.

Impossible to specify the catalog of the technology when creating a job

Currently, when creating a job, only the technology name is specified. If this technology name is used in different catalogs, the saagie-api will get the first one available.
It would be nice to be able to specify the catalog (if no catalog specified, take the official) to deal with that.

Multiple groups on project creation

When creating a project, only one group can be assigned to it. It should be possible to specify a list with multiple groups and their corresponding roles on the project.

Can't list jobs or apps of project if one has a deleted technology

When I tried to list the app of a project, I got the following error message :
TransportQueryError: {'message': 'io.saagie.projectsandjobs.domain.exception.NonExistingTechnologyException: Technology <technology_id> does not exist', 'locations': [], 'extensions': {'classification': 'DataFetchingException'}}
In Saagie UI, I saw that one of the app has a deleted technology. In the developper console, I saw there is 2 results for the graphql request: an error and some data.
It will be great if the package can do the same.

The correction can be performed in utils>gqlclient.py>execute() link this:
except TransportQueryError as transport_error: #if data not null #return data and print error or warning to show the error message print(transport_error.data)

Add features

  • create pipeline
  • get pipeline instance information
  • create job without archive

manage refresh token

tester et documenter le endpoint "/api/open/refresh" pour prolonger la vie d'un token

Upgrade to gql 3.0

Upgrade to gql 3.0 that now supports file uploads (instead of using requests library)

Cannot configure pprint result

Describe the bug
There is no option to configure the print in the different methods

Expected behavior
A parameter in all methods which prints results to configure it, and a global parameter to turn everything on or off

new test updated

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Add the ability to upgrade a job

Currently, it's only possible to edit the following parameters of a job :
job_name
description
is_scheduled
cron_scheduling
schedule_timezone
resources

It should also be possible to upgrade a job (creating a now job version) :
runtime_version,
command_line
release_note
file

The upgrade should be able by passing either :
-the name of the job and its project (name is unique inside a project)
-the id of the job and its project

Improve logging

Improve logging:

  • have the same logging format everywhere
  • have info logs when jobs, apps, pipelines....are successfully created
  • in jobs with callbacks, remove logs every x seconds an replace them wuith a status in the console only

function edit_pipeline doesn't work when parameters changed

Impossible to launch the edit_pipeline function when one parameters changed between 2 versions of this pipeline.
Example : if we didn't set the "alerting" parameter in the first version of the pipeline and we set this parameter to None in the second version, the function doesn't work.

image

Add the create App feature

Add the features for creating an app :

  • creating an app from a pre-configured app (mlflow, jupyter....)
  • creating a custom app by entering docker information

Fix integration tests

When the project creation is taking too much tiome on Saagie, the integration tests are failing without explicit messages.
To do :

  • increase the timeout
  • when timeout is reached, raise a Timeout error with an explicit message

Add requests_toolbelt as dependencies

Add requests_toolbelt librairy as dependencies

requests_toolbelt is needed when we import the package saagieapi, it will be better if we include this package in the dependencies

There is no way to know which version of saagieapi is compatible with which version of Saagie

Is your feature request related to a problem? Please describe.
Our platform got a breaking change in its API. I wanted to know which version of saagieapi I should use, but the release description does not specify which version of Saagie is compatible with the releases of saagieapi.

Describe the solution you'd like
In each release note, it should be specified which version(s) of Saagie is supported.
Additionnaly, saagieapi package should check directly with the Saagie platform if it is compatible.
For example, When creating an object from SaagieApi class, the init should query /version (or something similar) to check if the version of the API is handled by the package. If not, raise Exception with specific message.

Add get_pipeline_id by name

Function to return pipeline ID with pipeline name argument.

get_pipeline_id(self, project_id, pipeline_name) :
"""
"""
return id

Add an environment variable update feature

Is your feature request related to a problem? Please describe.
Currently, there is no feature to change an environment variable

Describe the solution you'd like
Add two methods to up either global or porject environment variable

Jobs and pipelines creation/update from json files

It should be possible to have a folder containing json with jobs and pipelines definitions and a function that gets this definitions and create the corresponding jobs and pipelines (or update them if they exist)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.