Giter Club home page Giter Club logo

component-pusher's People

Contributors

a3a3e1 avatar khanzadyan avatar shulkaolka avatar stas-fomenko avatar umkaline avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

component-pusher's Issues

do not delete the reporistories after failed deployment

Please do not delete the repositories after the failed push.

Normally this would not be a problem since if the repositories can be clearly deleted, creating them again should not be a problem. However, since we delete only the DB record of this the slug-server value is still present, and it is impossible to write there again. See this bug: https://github.com/elasticio/gitreceiver/issues/78

This creates an additional problem if you need push the failed ones again. The deployment would fail and git push -f would not work as well. So the only way around is to do an empty commit and push it again. This creates a huge overhead and makes automatic deployment unusable anymore.

Logs are not represent actual state of push process after component is pushed

Preconditions:

  1. Export.vars and component-list are configured correctly.

  2. Component revision is already pushed to current team, but in different repo.

  3. tested on flint

  4. Start script.

  5. see logs:

About to update components...
About to create repos...
>>>>>>>> Tenant tenants/Luzhompany/. Team stas_team. Component petstore-component-nodejs-201 >>>>>>>>
About to clone petstore-component-nodejs-201, version for_comp_pusher_test from [email protected]:elasticio/petstore-component-nodejs.git
Identity added: /home/stas/.ssh/id_rsa (/home/stas/.ssh/id_rsa)
Cloning into '/tmp/elasticio-components-pusher/petstore-component-nodejs-201'...
/tmp/elasticio-components-pusher/petstore-component-nodejs-201 ~/component-pusher
Adding the remote...
Switched to a new branch 'for_comp_pusher_test'
Branch 'for_comp_pusher_test' set up to track remote branch 'for_comp_pusher_test' from 'origin'.
About to push the component...
remote: Received push to: [email protected]/petstore-component-nodejs-201.git remote: Team: stas_team remote: Repository: petstore-component-nodejs-201 remote: Revision: 4ef821fb2815ba1a12113dd8a56bf3e17500493a remote: Build ID: 06de0cd5-457c-4591-8c7a-ad0faf2633e7 remote: Successfully validated parameters remote: Authorizing access of stas_team to petstore-component-nodejs-201 remote: About to bui-----> Compiled slug size is 21M remote: remote: remote: Slug built successfully remote: Successfully created directory for slug on the host machine remote: About to copy slug from container remote: Slug copied successfully remote: Reading component.json remote: Parsing component.json remote: Found 3 triggers and 2 actions remote: Found metadata for getPetsByStatusWithGenerators remote: Reading file ./lib/schemas/getPetsByStatus.out.json remote: Found metadata for getPetsByStatusWithPromises remote: Reading file ./lib/schemas/getPetsByStatus.out.json remote: Found metadata for getPetsByStatusWithDynamicSelectModel remote: Reading file ./lib/schemas/getPetsByStatus.out.json remote: Found metadata for createPetWithPromise remote: Reading file ./lib/schemas/createPet.in.json remote: Reading file ./lib/schemas/createPet.out.json remote: Found metadata for createPetWithGenerators remote: Reading file ./lib/schemas/createPet.in.json remote: Reading file ./lib/schemas/createPet.out.json remote: Parsing ./lib/schemas/getPetsByStatus.out.json remote: Parsing ./lib/schemas/createPet.out.json remote: Parsing ./lib/schemas/getPetsByStatus.out.json remote: Parsing ./lib/schemas/getPetsByStatus.out.json remote: Parsing ./lib/schemas/createPet.out.json remote: Parsing ./lib/schemas/createPet.in.json remote: Parsing ./lib/schemas/createPet.in.json remote: Reading icon.png remote: Removing build container and slug remote: Cleanup completed successfully remote: Deactivating previous builds remote: Updating repository remote: Saving build remote: Detaching from log stream remote: Build completed successfully To stas.elastic.io:petstore-component-nodejs-201 component.json lib logo.png package.json README.md verifyCredentials.js [new branch] for_comp_pusher_test -> master
Removing the remote...
~/component-pusher
Latest component version on the platform:4ef821fb2815ba1a12113dd8a56bf3e17500493a
============================================================================================================================
COMP NAME                      COMP ID                      LATEST VERSION                             STATUS                    

============================================================================================================================                                                                                                   
petstore-component-nodejs-201  5c51a2c469c93300107645ba     ---                                        Failed                    
============================================================================================================================
                 

AR:

  1. component is pushed to new repo
  2. Error is shown in logs

ER:

  1. Component is not pushed because this version is already pushed
  2. Logs are represent actual state and result of component push.

Initial version feedback

The tool is working in general. However, there are several limitations which can make this tool difficult to use.

  • Team name must be one word. If you use example_team repository creation would not work.
  • SSH-Key alias must be one word. If you have it something like tenant-key the push of components would not work.
  • If you are pushing to flint there is a high chance that repository name you use is used and the creation of new repositories would not be possible. Only if you choose a unique name, the push would work. This is not necessarily the problem of this tool, but a problem which one can encounter if the repo name is already used in the tenant.

component pusher is not creating remote repositories and not usable anymore

Component pusher is unable to create remote repositories although it is possible to create by hand in UI. In general, it gives numerous errors and not particularly useable.

Logs are available per request.

One portion of the logs:

Check if environment variables are OK...
Environment variables are OK
Error: unable to verify the first certificate
(node:6917) UnhandledPromiseRejectionWarning: Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1260:34)
    at TLSSocket.emit (events.js:196:13)
    at TLSSocket._finishInit (_tls_wrap.js:737:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:569:12)
(node:6917) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:6917) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:6928) UnhandledPromiseRejectionWarning: Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1260:34)
    at TLSSocket.emit (events.js:196:13)
    at TLSSocket._finishInit (_tls_wrap.js:737:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:569:12)
(node:6928) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:6928) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

component list extra line problem

When the component list contains an extra empty line, the component pusher behaves wrong. Instead of just stopping and giving the summary it tries to fetch an empty repo from our GitHub repositories and fails miserably with the following error:

~/Operations/component-pusher
Latest component version on the platform:94eb294cb4ea4ff1537b04cab4ca722af1e96a0c
>>>>>>>> Tenant tenants/******/. *******. Component  >>>>>>>>
About to clone , version  from 
Identity added: /Users/tigran/.ssh/id_rsa (/Users/tigran/.ssh/id_rsa)
fatal: repository '/tmp/elasticio-components-pusher/' does not exist
/tmp/elasticio-components-pusher ~/Operations/component-pusher
fatal: not a git repository (or any of the parent directories): .git
Adding the remote...
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
About to push the component...
fatal: not a git repository (or any of the parent directories): .git
Removing the remote...
fatal: not a git repository (or any of the parent directories): .git
~/Operations/component-pusher
Latest component version on the platform:94eb294cb4ea4ff1537b04cab4ca722af1e96a0c
./push.sh: line 51: tenant_map[$component]: bad array subscript

To Replicate

Create a component list with a couple of components and after the last line press Return twice to create one empty line. Start the pusher script and observe the result.

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.