---
tags: locaweb
image: https://www.locaweb.com.br/images/open-graph.jpg
---
# Atualização de clientes para TLS
## Dependências
Gráfico de dependências dos sistemas e clients ([baixar]( https://cdn.discordapp.com/attachments/578990536913059862/715209329292214272/client-dependency.graph)). Ele pode ser visualizado com o [Graphviz Interactive Preview](https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview) no vscode.
## Checklist de atualização de cliente:
- Atualizar `ea-api-client` para `~> '~> 4.0.0-pre.ruby23'`
- Atualizar `cassette` para `~> 1.4` (se estiver presente no gemspec).
- Executar o bundle install/update para a atualizar dependências. (`bundle update ea-api-client`)
- Incluir `.ruby-version` com versão do ruby utilizada para build.
- incrementar versão da lib (major)
- Executar `gem build <client>.gemspec` e verificar warnings sobre limites de versões dependências
- Corrigir limites de dependências usando major e minor (<x.y>) das versões já resolvidas no `Gemfile.lock`.
```
bundle && be rspec spec && gem build *.gemspec
```
## Padrão de Branching
Sugestão de branch para clientes: `ft/EAAT-1688-update_ea_api_client`
## Nome de commit padrão
Update 'ea-api-client' to support multiple TLS versions
## Padrão de CHANGELOG
```
## [x.0.0]
### Added
- Create .ruby-version file
### Changed
- Update ea-api-client to 4.0.0 version was 3.10
- Update zenon-client to 2.0.0 version was 1.20.3
- Update cassete to 1.2.7 was 1.4.0
- Update concurrent-ruby to 1.1.6 was 1.1.5
- Update minitest to 5.14.1 was 5.14.0
- Update tzinfo to 1.2.7 was 1.2.6
### Fixed
- gem limit on gemspec
### Removed
- Remove version_spec.rb
```
## Clientes atualizados
#### Legenda
- :heavy_check_mark: Aprovado/Concluído
- :warning: In Progress/Não aprovado mas aberto
- :no_entry: Bloqueado
| Cliente | Ver. Ruby | ver `ea-api-client` | MR | Publicado |
|----------|-----------|---------------------|----|----|
| :heavy_check_mark: `auditing-api-client` (`2.0.0`) | `2.4.2` | `~> 4.0` | :heavy_check_mark: | :heavy_check_mark: |
| :heavy_check_mark: `murray-client` (`4.0.0`) | `2.3.3` | `~> 4.0` | :heavy_check_mark: | :heavy_check_mark: |
| :heavy_check_mark: `boleto-avulso-client` (`1.0.0`| `2.3.3` | `~> 4.0` | :heavy_check_mark: | :heavy_check_mark: |
| :heavy_check_mark: `zenon-client` (`2.0.0`) | `2.3.3` | `~> 4.0` | :heavy_check_mark: | :heavy_check_mark: |
| :heavy_check_mark: `scrooge-client` (`2.0.0`) | `2.3.3` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
| :heavy_check_mark: `suba-client` (`2.0.0`) | `2.4.2` | `~> 4.0` | :heavy_check_mark: | :heavy_check_mark: |
| :heavy_check_mark: `notification-client` (`3.0.0`) | `2.4.2` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
| :heavy_check_mark: `bluebird-client` (`1.0.0`) | `2.4.2` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
| :heavy_check_mark: `sapi-client` (`2.0.0`) | `2.3.3` | `~> 4.0` | :heavy_check_mark: | :heavy_check_mark: |
| :heavy_check_mark: `coupons-client` (`2.0.0`) | `2.3.3` | `~> 4.0` |:heavy_check_mark:| :heavy_check_mark: |
| :heavy_check_mark: `corleone-client` (`1.0.0`) | `2.4.2` | `~> 4.0` | :heavy_check_mark: |:heavy_check_mark:|
| :heavy_check_mark: `cardapio-client` (`1.0.0`) | `2.3.3` | `~> 4.0` |:heavy_check_mark:| :heavy_check_mark: |
| :heavy_check_mark: `customer-api-client` (`2.0.0`) | `2.4.2` | `~> 4.0` |:heavy_check_mark:| :heavy_check_mark:|
| :heavy_check_mark: `sales-payment-client` (`1.0.0`) | `2.3.3` | `~> 4.0` | :heavy_check_mark: |:heavy_check_mark:|
| :heavy_check_mark: `iaas-dedicated-api-client` (`1.0.0`) | `2.3.3` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
| :heavy_check_mark: `iaas-cloud-api-client ` (`1.0.0`) | `2.3.3` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
| :heavy_check_mark: `active_ticket` (`1.0.0`) | `2.3.3` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
| :heavy_check_mark: `checkout-api-client` (`1.0.0`) | `2.4.2` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
| :heavy_check_mark: `ramsay-client` (`1.0.0`) | `2.4.2` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
| :heavy_check_mark: `developer-survey` (`2.2.0`) | `2.3.1` | `~> 4.0` |:heavy_check_mark:|:heavy_check_mark:|
## App's atualizadas
#### Changes (todos pacotes promovidos e changes para master abertas)
##### 25/06/2020
scrooge 10h
murphy 10h30
checkout-order-processor 11h
cardapio 11h30
support-workbench 12h
##### 02/07/2020
Primeira change do Suba 15h00 (RITM0347499)
##### 06/07/2020
sales-payment2 10h
cerberus 10h30
| Sistema | Atualizado | Deploy em QA | Usando versão default TLS | Deploy em Prod |
|------|---------|---------|--------|--------|
|`scrooge` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|`murphy` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|`zenon` | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark:| :heavy_check_mark: |
|`febronio` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|`suba` | :heavy_check_mark: |:construction_worker: <img width=32px src="https://www.jimphicdesigns.com/downloads/imgs-mockup/hourglass.gif">| ||
|`boleto-file-processor` | :heavy_check_mark: | :heavy_check_mark: | ||
|`corleone` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|`sapi` | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: | :heavy_check_mark: |
|`checkout-order-processor`* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|`customer-api` | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: | :heavy_check_mark: |
|`cardapio` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|`sales-payment2` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|`fake-orders` | :heavy_check_mark: |:heavy_check_mark: | ||
|`customer-workbench` | :heavy_check_mark: |:heavy_check_mark:| :heavy_check_mark: | :heavy_check_mark: |
|`cerberus` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:| :heavy_check_mark: |
|`support-workbench` | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark:| :heavy_check_mark: |
<!--
:construction_worker: <img width=32px src="https://www.jimphicdesigns.com/downloads/imgs-mockup/hourglass.gif">
-->
* `fake-orders` está com problema pois compartilha a máquina com o corleone que tem outra versão do ruby. Ele tenta buildar a gem com a versão 2.3 do ruby. (pedido de nova máquina RITM0342106)
* Pipeline do`checkout-order-processor` foi movido para o gitlab-ci.
## Macetes
Para remover todas as versões instaladas de uma gem , execute: `gem uninstall gemname -a -I`
## Padrão de MR
```
[EAAT-1688] Atualização de cliente para suportar versões de TLS 1.2+
### Motivação
É necessário suportar a versão de TLS 1.2+ para a comunicação entre as apis dos sistemas de EA
### Solução proposta
Os clientes baseados na lib `ea-api-client` terão sua dependência atualizada dessa lib (4.0.0) para ter suporte à configuração da versão de TLS das requisições.
### Comentários
[EAAT-1688](https://locaweb.atlassian.net/browse/EAAT-1688)
### Revisores
@enterprise-applications
```
## Ajuda para publicar a gem via Jenkins
- Caso receba essa msg `pending—All nodes of label ‘debian_wheezy’ are offline` ao tentar buildar o pacote basta trocar a slave para `debian_stretch` é a opção `Label Expression` das configs no Jenkins.
- Caso tenha problema com a versão do Ruby no Jenkins, algo como: `Using /var/lib/jenkins/.rvm/gems/ruby-1.9.3-p551 with gemset coupons-client
ERROR: Error installing geminabox:
rack requires Ruby version >= 2.3.0.` Suba a versão do ruby no campo `build/execute shell` das configs do Jenkins.
- Caso tenha problem com o Jenkins não encontrando a versão do bundler pode colocar `gem install bundler:2.1.4` na config do Jenkins em `build/execute shell`
- Caso tenha problema com o simplecov: `file not found: /var/lib/jenkins/workspace/ea_ea/ea_gems_folder/ea_gem_coupons-client/coverage/rcov
rcov report directory wasn't found using the pattern 'coverage/rcov'.` remova esse step na config do Jenkins , delete o `Post-build Actions` relacionado ao `cov`
## Dúvidas
Subir a versão de ruby dos clients para atualizar gems de desenvolvimento como bybug?
---
O que fazer com este contexto ?
```
Warning: the gem 'faraday' was found in multiple sources.
Installed from: https://gems.locaweb.com.br/
Also found in:
* https://rubygems.org/
You should add a source requirement to restrict this gem to your preferred source.
For example:
gem 'faraday', :source => 'https://gems.locaweb.com.br/'
Then uninstall the gem 'faraday' (or delete all bundled gems) and then install again.
Warning: the gem 'cassette' was found in multiple sources.
Installed from: https://gems.locaweb.com.br/
Also found in:
* https://rubygems.org/
You should add a source requirement to restrict this gem to your preferred source.
For example:
gem 'cassette', :source => 'https://gems.locaweb.com.br/'
Then uninstall the gem 'cassette' (or delete all bundled gems) and then install agai
```
É possível inserir no Gemfile o source da gem:
Ex:
```
gem 'faraday', '~> 0.10', source: 'https://rubygems.org/'
```
---
### Problemas dos Clientes
* `zenon` -> `scrooge-client` -> `zenon-client`
* `sapi-client` -> `boleto-avulso-client`
* `developer-survey`-> `notifications-client`
---
### Exemplo de change
- Change log
O mesmo da aplicação só que em pt-br
- Impacto da change?
Sem essa alteração novas versões do TLS não seram suportadas.
- Plano de testes
Verificar versão do TLS no graylog