Shopify / shipit-engine

Deployment coordination
https://shopify.engineering/introducing-shipit
MIT License
1.42k stars 146 forks source link

More explicit wording when failing on missing shipit.yml stanzas #1297

Closed timothysmith0609 closed 8 months ago

timothysmith0609 commented 1 year ago

Makes explicit that you should be looking at a specific shipit.yml when a deploy fails to locate an appropriate stanza

spy-v2[bot] commented 1 year ago

Alistair Willock [2023-02-22 06:19PM UTC]
Hi there, I'm trying to get a specific sandbox multi-deploy working for cluster-service-zookeeper, but I appear to have missed something, which is resulting in the following Shipit deploy error:

Shipit::DeploySpec::Error: Impossible to detect how to deploy this application. Please define `deploy.override` in your shipit.yml
    /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/app/models/shipit/deploy_spec.rb:293:in `cant_detect!'
    /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/app/models/shipit/deploy_spec.rb:118:in `deploy_steps!'
    /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/lib/shipit/deploy_commands.rb:5:in `steps'
    /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/lib/shipit/task_commands.rb:23:in `perform'
    /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/app/models/shipit/task_execution_strategy/default.rb:61:in `perform_task'
    /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/app/models/shipit/task_execution_strategy/default.rb:21:in `run'
    /app/config/initializers/statsd.rb:22:in `run'

<SNIP>

Does anyone know where I need to look to figure out the underlying issue? I haven't found any occurrences of deploy.override in any of the other shipit.yml files in that repo.

<Additional background in :thread:>

:thread: Slack Thread
[Slack Thread](https://shopify.slack.com/archives/C02QJFZFK7S/p1677089962103229?thread_ts=1677089962.103229&cid=C02QJFZFK7S)
**[Alistair Willock](https://github.com/awillock-shopify)** [2023-02-22 06:19PM UTC]
Hi there, I'm trying to get a specific sandbox multi-deploy working for `cluster-service-zookeeper`, but I appear to have missed something, which is resulting in the following Shipit deploy error: ``` Shipit::DeploySpec::Error: Impossible to detect how to deploy this application. Please define `deploy.override` in your shipit.yml /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/app/models/shipit/deploy_spec.rb:293:in `cant_detect!' /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/app/models/shipit/deploy_spec.rb:118:in `deploy_steps!' /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/lib/shipit/deploy_commands.rb:5:in `steps' /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/lib/shipit/task_commands.rb:23:in `perform' /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/app/models/shipit/task_execution_strategy/default.rb:61:in `perform_task' /artifacts/bundle/ruby/3.1.0/bundler/gems/shipit-engine-31705cc9bdcd/app/models/shipit/task_execution_strategy/default.rb:21:in `run' /app/config/initializers/statsd.rb:22:in `run' ``` Does anyone know where I need to look to figure out the underlying issue? I haven't found any occurrences of `deploy.override` in any of the other `shipit.yml` files in that repo. __
**[Alistair Willock](https://github.com/awillock-shopify)** [2023-02-22 06:19PM UTC]
Aforementioned background: [https://shopify.slack.com/archives/C01MXHNTT4Z/p1677014132038829](https://shopify.slack.com/archives/C01MXHNTT4Z/p1677014132038829)
**[Timothy Smith](https://github.com/timothysmith0609)** [2023-02-22 06:44PM UTC]
Hi Alistair, let me take a look
**[Timothy Smith](https://github.com/timothysmith0609)** [2023-02-22 06:46PM UTC]
Do you have a link to the shipit stack you're trying to deploy?
**[Timothy Smith](https://github.com/timothysmith0609)** [2023-02-22 06:46PM UTC]
Ah this one, right? [https://shipit.shopify.io/shopify/cluster-service-zookeeper/sandbox-perftest](https://shipit.shopify.io/shopify/cluster-service-zookeeper/sandbox-perftest)
**[Alistair Willock](https://github.com/awillock-shopify)** [2023-02-22 06:47PM UTC]
Sigh, yes. However: [https://github.com/Shopify/cluster-service-zookeeper/pull/422](https://github.com/Shopify/cluster-service-zookeeper/pull/422)
**[Alistair Willock](https://github.com/awillock-shopify)** [2023-02-22 06:47PM UTC]
I forgot to commit that file :disappointed:
**[Timothy Smith](https://github.com/timothysmith0609)** [2023-02-22 06:47PM UTC]
:check: That's what I was going to check :slightly_smiling_face:
**[Alistair Willock](https://github.com/awillock-shopify)** [2023-02-22 06:47PM UTC]
That's what I figured :sweat_blob:
**[Alistair Willock](https://github.com/awillock-shopify)** [2023-02-22 06:48PM UTC]
Thanks for looking!
**[Timothy Smith](https://github.com/timothysmith0609)** [2023-02-22 06:48PM UTC]
No problem, sorry I just got back or I would have caught it earlier
**[Alistair Willock](https://github.com/awillock-shopify)** [2023-02-22 06:48PM UTC]
I will note however that the error message encountered is... not great.
**[Timothy Smith](https://github.com/timothysmith0609)** [2023-02-22 06:48PM UTC]
:nod2: That's true, it should be a pretty loud: `We can't find a shipit.yml for the associated environment`
**[Alistair Willock](https://github.com/awillock-shopify)** [2023-02-22 06:49PM UTC]
That would be _wonderful_. I wouldn't even have minded if it called me a naughty name or ~two~ five to go along with it :joy: