Code Monkey home page Code Monkey logo

Comments (12)

oliversalzburg avatar oliversalzburg commented on May 27, 2024

I didn't even know Strider does anything when a branch is deleted. That makes no sense.

from strider-github.

xgalen avatar xgalen commented on May 27, 2024

I mean when you delete a branch on GitHub and if you have configured the event (and we want this, in order to exec some scripts through Strider), GitHub send the event to Strider.

Strider doesn't know if the event is a branch creation, deletion or just update.

The error occured is this (obviously because the branch does not exist):

2016-08-02T10:05:06.525Z - error: Job 57a0704f8df8b67e01b3d07b  Git clone failed with code 128 Error: Git clone failed with code 128
    at badCode (/home/ubuntu/strider/node_modules/strider-git/worker.js:90:11)
    at updateCache (/home/ubuntu/strider/node_modules/strider-git/worker.js:154:19)
    at ChildProcess.<anonymous> (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/lib/job.js:203:9)
    at ChildProcess.emit (events.js:98:17)
    at Process.ChildProcess._handle.onexit (child_process.js:820:12)
2016-08-02T10:05:06.526Z - info: [runner:simple-runner] Job done with error. Project: mediasmart/api Job ID: 57a0704f8df8b67e01b3d07b
2016-08-02T10:05:06.527Z - info: [runner:simple-runner] Job done without error. Project: mediasmart/api Job ID: 57a0704f8df8b67e01b3d0

from strider-github.

knownasilya avatar knownasilya commented on May 27, 2024

We could execute cleanup probably..

from strider-github.

oliversalzburg avatar oliversalzburg commented on May 27, 2024

Well, the webhook is supposed to be called on pushes to a branch. You can call it for whatever you want, but that's not what it is intended for and, thus, the result you're seeing.

What do you want Strider to actually do when this event happens? Like, if you just want to run some custom script, why even involve Strider in this? It would probably be trivial to write a small Express application that handles this job for you.

from strider-github.

xgalen avatar xgalen commented on May 27, 2024

We want to involve Strider on this because the script is to remove things created before by Strider as a part of our CD process. It's a way to close the circle, doing all the process with Strider. It's much robust maintain all of the process on Strider than one things on Strider and others in a small app.

If we could execute cleanup as knownasilya says and continue with the other plugins would be perfect.

from strider-github.

knownasilya avatar knownasilya commented on May 27, 2024

Another idea would be to add an error phase, which could have STRIDER_JOB_ERROR_MSG and STRIDER_JOB_ERROR_CODE envs. This might be more useful since errors happen for many reasons.

from strider-github.

oliversalzburg avatar oliversalzburg commented on May 27, 2024

I dunno, the whole thing seems like an XY problem. If there is something that is performed in Strider which creates persistent information, then Strider should probably clean it up itself.

If someone decides to create persistent information for every branch that is tested, then that's really not a problem Strider should solve.

If we were to introduce an error phase, then that would only enable people to write their own plugins to do something in that case, but then why not create your own plugin in the first place to handle this situation?

If we were to support webhooks for branch deletions, then we would want to support them in all provider plugins and I don't see the point.

from strider-github.

knownasilya avatar knownasilya commented on May 27, 2024

Really this is the issue that Strider is too narrow in it's handling of provider events (branches only - commit/pr) and falls under the task of "Strider needs environments" Strider-CD/strider#367

from strider-github.

xgalen avatar xgalen commented on May 27, 2024

And what about to execute the cleanup phase? This does not create a new phase, does not affect other plugins and add a new feature (support branch deletions).

from strider-github.

oliversalzburg avatar oliversalzburg commented on May 27, 2024

Well, I guess it would be a good idea to always run the cleanup phase. I can't see anything wrong with that.

from strider-github.

xgalen avatar xgalen commented on May 27, 2024

I think we can close this after the latest update.

from strider-github.

knownasilya avatar knownasilya commented on May 27, 2024

Thanks for the reminder

from strider-github.

Related Issues (20)

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.