Giter Site home page Giter Site logo

satellite's Introduction

satellite's People

Contributors

actions-user avatar clemzarch avatar gplanchat avatar jomessina avatar nicolas43000 avatar programgames avatar sebprt avatar sylvainraye avatar thibault43 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

satellite's Issues

Build : ""./composer.json" does not contain valid JSON"

when building:

Building Satellite prestashop to something
============

[INFO] Writing ./composer.json
[INFO] 
[INFO] In JsonFile.php line 349:
[INFO]                                                                           
[INFO]   "./composer.json" does not contain valid JSON                           
[INFO]   Parse error on line 1:                                                  
[INFO]                                                                           
[INFO]   ^                                                                       
[INFO]   Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['  
[INFO]                                                                           
[INFO] require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]
In Composer.php line 35:
                                                                                              
  Process exited unexpectedly. 'composer' 'require' '--with-dependencies' '--prefer-dist' '-  
  -no-progress' '--prefer-stable' '--sort-packages' '--optimize-autoloader' 'php-etl/pipelin  
  e-contracts:0.4.*' 'php-etl/pipeline:*' 'php-etl/console-state:*' 'php-etl/pipeline-consol  
  e-runtime:*' 'php-etl/workflow-console-runtime:*' 'psr/log:*' 'monolog/monolog:*' 'symfony  
  /console:^6.0' 'symfony/dependency-injection:^6.0' 'monolog/monolog:^2.5' 'php-etl/pipelin  
  e-contracts:0.4.*' 'php-etl/bucket-contracts:0.2.*' 'php-etl/bucket:*' 'php-etl/json-flow:  
  *'                                                                                          
                                                                                              

build [-o|--output OUTPUT] [--] <config>

after that, a composer.json appears but it is empty. Deleting the composer.json and re-building fixes the issue sometimes but not always.

Might be related to these lines and jq:

public function autoload(array $autoloads): void
    {
        foreach ($autoloads as $type => $autoload) {
            match ($type) {
                'psr4' => $this->pipe(
                    $this->subcommand('cat', 'composer.json'),
                    $this->subcommand('jq', '--indent', '4', sprintf('.autoload."psr-4" |= . + %s', json_encode($autoload, \JSON_THROW_ON_ERROR))),
                    $this->subcommand('tee', 'composer.json'),
                ),
                'file' => $this->pipe(
                    $this->subcommand('cat', 'composer.json'),
                    $this->subcommand('jq', '--indent', '4', sprintf('.autoload."file" |= . + %s', json_encode($autoload, \JSON_THROW_ON_ERROR))),
                    $this->subcommand('tee', 'composer.json'),
                )
            };
        }
    }

`from-local` copie `vendor/` ET fait un `composer install`

src/Adapter/Filesystem/Factory ligne 44: le contenu de vendor/ est copié (alors qu'on est pas sûr qu'il soit à jour)
src/Adapter/Filesystem/SatelliteBuilder ligne 112: composer install

Avec from-local: true, est-ce qu'on doit:

  • exécuter composer install avec le composer.json original puis copier les vendors dans build/
    ou
  • copier le composer.json dans build/ puis exécuter composer install dans build/

run:pipeline sur un Workflow

quand on essaie de lancer run:pipeline build/ mais que build/ est un Workflow, on a une erreur qui n'est pas facilement compréhensible.
Il faudrait expliquer que c'est run:workflow qui doit être lancé.

Capture d’écran 2023-05-11 à 09 19 36

batch size after first occurence

Hello,

When you use batch tranformer option in your pipeline configuration, you have an error on the batch size after the first occurence.
For exemple , with the batch size to 100 :

-
  batch:
    merge:
      size: 100

Your first batch will contain 100 items, but the other batches will contain 101 items.

The generated code :

public function transform() : \Generator
        {
            $this->storage = [];
            $line = yield;
            $count = 1;
            while (true) {
                if ($count++ >= 100) {
                    $count = 0;
                    $this->storage[] = $line;
                    $line = (yield new \Kiboko\Component\Bucket\AcceptanceResultBucket($this->storage));
                    $this->storage = [];
                } else {
                    $this->storage[] = $line;
                    $line = (yield new \Kiboko\Component\Bucket\EmptyResultBucket());
                }
            }
        }

Geoffrey

Dependency injection for states

Add the possibility to define a state at the same config level as the steps that can be used as a service in any step

pipeline:
  state: #...
  steps: 
	- csv: 
		extractor:
      state:
	    destinations: 
		  - rabbitmq: # ...
		  - "@state.general"

[Cloud] Normalisation des expressions

Lors de l'envoi de la configuration d'un satellite vers le Cloud, il y a une normalisation qui transforme le YAML en tableau PHP avec des objets Symfony\Component\ExpressionLanguage\Expression.

Dans la classe Kiboko\Component\Satellite\Cloud\Workflow, l'utilisation de la fonction array_walk_recursive n'est pas correct car les objet Expression prenant de fast-map ne doivent pas être précédé par @=

image

Build image satellite

Lors du build de l'image Satellite, il faut pouvoir changer la valeur de l'option memory_limit dans la config PHP présente dans l'image car certains satellites sont gros et il peut y avoir une erreur.

image (1)

Composer autoload

Add the possibility to configure autoload paths for a satellite.

But, there is one problem : the project uses composer commands but there is no way provided by composer to manage autoloads with the command line.

Add the Workflow runtime

Add the Workflow runtime, a workflow is a combination of several pipelines and actions.

Workflows declarations should look like:

satellite:
  workflow:
    name: 'Lorem ipsum dolor'
    jobs:
    - name: 'Sit amet consecutir'
      pipeline:
        steps:
        - akeneo:
// ...
    - name: 'Nulla rutrum non purus at iaculis'
      pipeline:
        steps:
        - akeneo:
// ...

Add serverless support

Add a serverless adapter in order to help deploy easily lambdas in the cloud

Check compatibility with:

  • Amazon Web Services
  • Google Cloud Platform
  • Azure
  • Kubernetes, through (see which option is the most interesting)
    • Kubeless
    • Knative
    • OpenWhisk

[Rejection] Deprecation notice si on ne met pas de "exchange"

Si l'option exchange n'est pas renseignée, par exemple:

              rejection:
                destinations:
                  - rabbitmq:
                      host: '@=env("RABBITMQ_HOST")'
                      port: '@=env("RABBITMQ_PORT")'
                      user: '@=env("RABBITMQ_USER")'
                      password: '@=env("RABBITMQ_PASSWORD")'
                      vhost: '@=env("RABBITMQ_VHOST")'
                      topic: products

l'execution affiche:

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/clementzarch/project/build/vendor/bunny/bunny/src/Bunny/ClientMethods.php on line 1780

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/clementzarch/project/build/vendor/bunny/bunny/src/Bunny/ClientMethods.php on line 1784

parce que strlen prend forcément une string
image

Différences YAML -> JSON (pour import dans le cloud)

Il y a des différences entre un YAML valide qui se compile et s'execute, et un JSON qu'execution-domain accepte via l'api.

YAML valide:

version: '0.3'
satellites:
  tags:
    label: 'Tags'
    composer:
      repositories:
        - name: prestashop/prestashop-webservice-lib
          type: vcs
          url: 'https://github.com/php-etl/prestashop-webservice-lib.git'
    workflow:
      jobs:
        - pipeline:
            steps:
              - example:
                  foo: bar

JSON valide:

{
  "code": "tags",          #1
  "label": "Tags",
  "composer": {
    "repositories": [
      {
        "name": "prestashop/prestashop-webservice-lib",
        "type": "vcs",
        "url": "https://github.com/php-etl/prestashop-webservice-lib.git"
      }
    ]
  },
  "jobs": [
    {
      "pipeline": {
        "code": "pipeline1",         #2
        "steps": [
          {
            "code": "step",         #3
            "configuration": {         #4
              "example": {
                "foo": "bar"
              }
            },
            "probes": [
              { "code": "read", "label": "Read" },                ]
              { "code": "rejected", "label": "Rejected" },        ]  #5
              { "code": "errors", "label": "Errors" }             ]
            ]
          }
        ]
      }
    }
  ]
}

par rapport au yaml local, un json pour le cloud veut obligatoirement:

  • code sur le satellite (#1) : node n'existe pas, mais dans le yaml d'exemple c'est la clé tags:
  • code sur la pipeline (#2) : node existe, il faut le rendre obligatoire dans la validation et dans la doc

peut-être pas à traiter coté satellite, apparemment ce serait la route dans execution-domain qui les ajouterai automatiquement:

  • code sur la step (#3)
  • encapsulation de la config de la step dans une configuration (#4)
  • probes sur la step (#5)

[BUG] Update command

On a plusieurs problèmes avec la commande \Kiboko\Component\Satellite\Cloud\Console\Command\UpdateCommand :

image

image

De plus, il y a 2 types de configurations pour les satellites, une où l'on précise une version et l'autre non. Et la commande marche uniquement avec celle sans version.

1 Test ne passe pas

TarArchiveTest.php: public function testArchiveFileHeaderContainsChecksum() (ligne 90):

Failed asserting that '013607' matches PCRE pattern "/^\d+\s$/ ".

[Cloud] Composer Authentication

Pour la partie Composer du contexte Cloud, il existe plusieurs types d'authentications (token, basic)

Il faut pouvoir implémenter chacune de ces alternatives.

Dans la classe src/Cloud/Handler/Pipeline/DeclarePipelineCommandHandler.php, il faut poivoir utiliser d'autres types d'uthentications en plus de celle qui utilise des tokens.

[BUG] Package sans version

Il y a une erreur dans la classe Kiboko\Component\Satellite\Cloud\DTO\Package, il faut pouvoir prendre en compte qu'aucune version de package soit précisée dans le fichier de configuration YAML.

image

TODO pour faire fonctionner API Runtime

todo :

  • Kiboko\Component\Satellite\Console\StateOutput\API -> est-ce qu'il faut implementer les States ?
  • Kiboko\Component\Satellite\Console\APIConsoleRuntime
  • compileApiJob dans src/Service : est-ce qu'il faut les plugins ?

A quoi sert function: ?

[Cloud] Composer Repository

Pour la partie Composer du contexte Cloud, il existe plusieurs types de dépôts (vcs, git)

Il faut pouvoir implémenter chacune de ces alternatives.

Dans la classe src/Cloud/Handler/Pipeline/DeclarePipelineCommandHandler.php, il faut pouvoir utiliser d'autres types de dépots.

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.