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

[3] Conversão asgard.models.* -> chronos.models.* #140

Conversation

@daltonmatos
Copy link
Member

daltonmatos commented Jul 18, 2019

No description provided.

@codecov

This comment has been minimized.

Copy link

codecov bot commented Jul 18, 2019

Codecov Report

Merging #140 into feature/scheduled-jobs-from-client-to-asgard-model will increase coverage by 0.18%.
The diff coverage is 100%.

Impacted file tree graph

@@                                  Coverage Diff                                   @@
##           feature/scheduled-jobs-from-client-to-asgard-model     #140      +/-   ##
======================================================================================
+ Coverage                                               88.39%   88.57%   +0.18%     
======================================================================================
  Files                                                      97       97              
  Lines                                                    2887     2924      +37     
  Branches                                                  160      160              
======================================================================================
+ Hits                                                     2552     2590      +38     
+ Misses                                                    322      321       -1     
  Partials                                                   13       13
Flag Coverage Δ
#typehint 43.84% <100%> (+1.77%) ⬆️
#unittest 92.58% <100%> (+0.08%) ⬆️
Impacted Files Coverage Δ
asgard/clients/chronos/models/job.py 100% <100%> (ø) ⬆️
asgard/backends/chronos/models/converters.py 100% <100%> (+0.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df4521e...1a7f785. Read the comment docs.

@daltonmatos daltonmatos changed the title Conversão asgard.models.* -> chronos.models.* [3] Conversão asgard.models.* -> chronos.models.* Jul 18, 2019
daltonmatos added 12 commits Jul 18, 2019
As chaves são name e value e não `key` e `value`
Estava chamendo com os parametros invertidos
Se não fechamos a sessão, caso o loop seja trocado, o http_client
que já foi usado antes (e por isso já tem uma session aberta) para
de funcionar com o erro "loop is closed".

O que temos que fazer é melhorar a API desse http_client. Idealmente
exigino que ele seja instanciado antes de ser usado.
Em vez de fazermos assim:

```python
from asgard.http.client import http_client

async with http_client as client:
  await client.get(...)
```

Fazer algo nessa linha:
```python
from asgard.http.client import HttpClient

client = HttpClient(headers=..., ...)
await client.get(...)
```
namespace

Essa interface é quem vai implementar a adição/remoção do namespace
no nome das aplicações.
@pabrrs
pabrrs approved these changes Jul 19, 2019
daltonmatos added 3 commits Jul 19, 2019
O início do teste faz um registro de um job novo no chronos,
mas log em seguida, quando buscamos esse job o chronos responde que ele
não existe.

Essa espera é para dar tempo do chronos registrar tudo e responder HTTP 200.
daltonmatos added 7 commits Jul 22, 2019
Explica a nova arquitetura de models e ModelConverters.
Atualiza pontos onde o Chronos pode ser mencionado.
@pabrrs
pabrrs approved these changes Jul 22, 2019
daltonmatos added 2 commits Jul 23, 2019
…uled-jobs-get-job-by-id
…duled-jobs-from-asgard-to-client-model
@daltonmatos daltonmatos merged commit 1a7f785 into feature/scheduled-jobs-from-client-to-asgard-model Jul 23, 2019
2 of 3 checks passed
2 of 3 checks passed
ci/circleci: py368 CircleCI is running your tests
Details
ci/circleci: py36x Your tests passed on CircleCI!
Details
ci/circleci: py37x Your tests passed on CircleCI!
Details
@daltonmatos daltonmatos deleted the feature/scheduled-jobs-from-asgard-to-client-model branch Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.