Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after uninstall: Plugin not found #10

Open
emcniece opened this issue Feb 4, 2016 · 2 comments
Open

Error after uninstall: Plugin not found #10

emcniece opened this issue Feb 4, 2016 · 2 comments

Comments

@emcniece
Copy link

emcniece commented Feb 4, 2016

Tried uninstalling via UI "uninstall" button, and now tests/builds fail with a message:

Plugin required but not found: webhooks

Error log:

2016-02-04T23:14:25.790Z - info: job.prepare - strider.json not found, skipping config merge
2016-02-04T23:14:25.792Z - info: [runner:simple-runner] Queued new job. Project: company/repo Job ID: 56b3db51fe1714ea56105788
2016-02-04T23:14:25.811Z - info: [runner:simple-runner] Job started. Project: company/repo Job ID: 56b3db51fe1714ea56105788
2016-02-04T23:14:25.812Z - info: [runner:simple-runner] Error: Plugin not found webhooks Project: company/repo Job ID: 56b3db51fe1714ea56105788
2016-02-04T23:14:25.812Z - warn: Plugin not found webhooks
2016-02-04T23:14:25.813Z - info: [runner:simple-runner] Job done with error. Project: company/repo Job ID: 56b3db51fe1714ea56105788

Issue persists after restarting strider service, as well as system reboot.

@emcniece
Copy link
Author

emcniece commented Feb 5, 2016

The problem was that the plugin was uninstalled before it was deactivated in the project configuration page. Here's a sample project, note the null config on the "webhooks" plugin subdoc:

> db.projects.find().pretty()
{
    "_id" : ObjectId("56afeeb32c67b7560e33013d"),
    "name" : "company/repo",
    "display_name" : "company/repo",
    "display_url" : "https://github.com/company/repo",
    "creator" : ObjectId("56afed9398f30d2f0ebda90e"),
    "provider" : {
        "id" : "github",
        "account" : "13321207",
        "repo_id" : "31740187",
        "config" : {
            "secret" : "8f92ea46aca38a319fc4159fdc27105fdbc22c74f7971121870a29a8fa0a8d90",
            "auth" : {
                "type" : "https"
            },
            "repo" : "repo",
            "owner" : "company",
            "url" : "git://github.com/company/repo.git"
        }
    },
    "branches" : [
        {
            "name" : "master",
            "_id" : ObjectId("56afeeb32c67b7560e33013f"),
            "runner" : {
                "id" : "simple-runner",
                "config" : {
                    "pty" : false
                }
            },
            "plugins" : [
                {
                    "id" : "node",
                    "enabled" : true,
                    "config" : {
                        "globals" : [ ],
                        "test" : "npm test",
                        "caching" : "loose",
                        "runtime" : "whatever",
                        "fork" : "Node.js"
                    },
                    "_id" : ObjectId("56b3c279ac9fbb8d54434c57"),
                    "showStatus" : true
                },
                {
                    "id" : "custom",
                    "enabled" : true,
                    "config" : {
                        "environment" : "# put your shell code here\n\n\n",
                        "prepare" : "bower install --allow-root\nexport DISPLAY=:1\n",
                        "test" : "# put your shell code here\nexport DISPLAY=:1",
                        "deploy" : "cd playbooks;\n/usr/bin/script.sh -l -vvvv;\n",
                        "cleanup" : "# put your shell code here\n",
                        "shell" : "Bash"
                    },
                    "_id" : ObjectId("56b3c279ac9fbb8d54434c56"),
                    "showStatus" : true
                },
                {
                    "id" : "slack",
                    "enabled" : true,
                    "config" : {
                        "webhookURL" : "slackUrl",
                        "deploy_fail_message" : ":boom: (<%= ref.branch %>) :: <<%= process.env.strider_server_name %>/<%= project.name %>/job/<%= _id %>|Deploy exited with a non-zero status!> :: <%= trigger.message.trim() %>",
                        "deploy_pass_message" : ":ship: (<%= ref.branch %>) :: <<%= process.env.strider_server_name %>/<%= project.name %>/job/<%= _id %>|Deploy was successful> :: <%= trigger.message.trim() %>",
                        "test_fail_message" : ":exclamation: (<%= ref.branch %>) :: <<%= process.env.strider_server_name %>/<%= project.name %>/job/<%= _id %>|Tests are failing> :: <%= trigger.message.trim() %>",
                        "test_pass_message" : ":white_check_mark: (<%= ref.branch %>) :: <<%= process.env.strider_server_name %>/<%= project.name %>/job/<%= _id %>|Tests are passing> :: <%= trigger.message.trim() %>",
                        "icon_url" : "http://site.ca/ext/slack/bot_avatar",
                        "username" : "<%= project.name %>",
                        "channel" : "#channel"
                    },
                    "_id" : ObjectId("56b3c279ac9fbb8d54434c55"),
                    "showStatus" : true
                },
                {
                    "id" : "github-status",
                    "enabled" : true,
                    "_id" : ObjectId("56b3c279ac9fbb8d54434c54"),
                    "showStatus" : true
                },
                {
                    "config" : [
                        null
                    ],
                    "id" : "webhooks",
                    "enabled" : true,
                    "_id" : ObjectId("56b3c279ac9fbb8d54434c53"),
                    "showStatus" : true
                }
            ],
            "deploy_on_green" : true,
            "mirror_master" : false,
            "active" : true
        },
        {
            "name" : "production",
            "privkey" : "-----BEGIN RSA PRIVATE KEY-----",
            "pubkey" : "ssh-rsa AAAA",
            "runner" : {
                "id" : "simple-runner",
                "config" : {
                    "pty" : false
                }
            },
            "plugins" : [
                {
                    "id" : "node",
                    "enabled" : true,
                    "config" : {
                        "fork" : "Node.js",
                        "runtime" : "whatever",
                        "caching" : "loose",
                        "test" : "npm test",
                        "globals" : [ ]
                    },
                    "_id" : ObjectId("56afeeb32c67b7560e330140"),
                    "showStatus" : true
                },
                {
                    "config" : {
                        "environment" : "# put your shell code here",
                        "prepare" : "# put your shell code here\nbower install --allow-root\nexport DISPLAY=:1\n\n",
                        "test" : "# put your shell code here\nexport DISPLAY=:1\n\n\n",
                        "deploy" : "cd playbooks;\n/usr/bin/script.sh -vvvv;\n\n",
                        "cleanup" : "# put your shell code here\n",
                        "shell" : "Bash"
                    },
                    "id" : "custom",
                    "enabled" : true,
                    "_id" : ObjectId("56aff12fb130b7c007dd3848"),
                    "showStatus" : true
                },
                {
                    "config" : {
                        "deploy_fail_message" : ":boom: (<%= ref.branch %>) :: <<%= process.env.strider_server_name %>/<%= project.name %>/job/<%= _id %>|Deploy exited with a non-zero status!> :: <%= trigger.message.trim() %>",
                        "deploy_pass_message" : ":ship: (<%= ref.branch %>) :: <<%= process.env.strider_server_name %>/<%= project.name %>/job/<%= _id %>|Deploy was successful> :: <%= trigger.message.trim() %>",
                        "test_fail_message" : ":exclamation: (<%= ref.branch %>) :: <<%= process.env.strider_server_name %>/<%= project.name %>/job/<%= _id %>|Tests are failing> :: <%= trigger.message.trim() %>",
                        "test_pass_message" : ":white_check_mark: (<%= ref.branch %>) :: <<%= process.env.strider_server_name %>/<%= project.name %>/job/<%= _id %>|Tests are passing> :: <%= trigger.message.trim() %>",
                        "icon_url" : "http://site.ca/ext/slack/bot_avatar",
                        "username" : "<%= project.name %>",
                        "channel" : "#channel",
                        "webhookURL" : "slackhook"
                    },
                    "id" : "slack",
                    "enabled" : true,
                    "_id" : ObjectId("56aff12fb130b7c007dd3847"),
                    "showStatus" : true
                }
            ],
            "deploy_on_green" : true,
            "mirror_master" : false,
            "active" : true
        }
    ],
    "prefetch_config" : true,
    "public" : false,
    "__v" : 26
}

The solution (aside from users doing things in the proper order) is to remove any active configs from the project during uninstall. I'm not familiar with plugin creation for Strider - is there a hook for the uninstall process?

@knownasilya
Copy link
Member

Ran into this today as well, although unsure if there is a plugin uninstall hook; doubt it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants