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

Flappy test runs #120

Closed
schneems opened this issue Aug 28, 2020 · 4 comments
Closed

Flappy test runs #120

schneems opened this issue Aug 28, 2020 · 4 comments

Comments

@schneems
Copy link
Contributor

schneems commented Aug 28, 2020

Here's an issue where we can track failures that shouldn't have happened so we can see if there's a recurring problem in Hatchet that can be updated.

List your component name and then a link to logs and the test failure for each incident of a flappy/failing CI run that should have not failed.

Provider: Heroku CI

Heroku Buildpack Ruby

Hatchet

PHP

@edmorley
Copy link
Member

edmorley commented Sep 23, 2020

Heroku Buildpack Python

schneems added a commit to heroku/heroku-buildpack-ruby that referenced this issue Oct 7, 2020
When manipulating the results of a shell result, it's common to want to remove the newline.

```
puts `ruby -v`.inspect # => "ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19]\n"
```

This is commonly done by calling `chomp`. However there are some situations that are suspected to sometimes (but not always) contain two extra lines being tracked in heroku/hatchet#120

## Chomp fails

- https://dashboard.heroku.com/pipelines/ac057663-170b-4bdd-99d0-87560eb3a570/tests/1195
- https://dashboard.heroku.com/pipelines/ac057663-170b-4bdd-99d0-87560eb3a570/tests/1197
- Maybe there are multiple newlines in the original string. We can switch to strip instead of chomp.

This PR replaces all uses of `chomp` that are intended to strip off trailing newlines with strip

```ruby
puts "/hello\n\n".chomp.inspect # => "/hello\n"
puts "/hello\n\n".strip.inspect # => "/hello"
```

It's not a perfect replacement, because `strip` also removes other whitespace characters and it modifies the beginning and end of the string. That being said, the ability to remove multiple newlines or any excess whitespace is the behavior we want.
schneems added a commit to heroku/heroku-buildpack-ruby that referenced this issue Oct 7, 2020
When manipulating the results of a shell result, it's common to want to remove the newline.

```
puts `ruby -v`.inspect # => "ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19]\n"
```

This is commonly done by calling `chomp`. However there are some situations that are suspected to sometimes (but not always) contain two extra lines being tracked in heroku/hatchet#120

## Chomp fails

- https://dashboard.heroku.com/pipelines/ac057663-170b-4bdd-99d0-87560eb3a570/tests/1195
- https://dashboard.heroku.com/pipelines/ac057663-170b-4bdd-99d0-87560eb3a570/tests/1197
- Maybe there are multiple newlines in the original string. We can switch to strip instead of chomp.

This PR replaces all uses of `chomp` that are intended to strip off trailing newlines with strip

```ruby
puts "/hello\n\n".chomp.inspect # => "/hello\n"
puts "/hello\n\n".strip.inspect # => "/hello"
```

It's not a perfect replacement, because `strip` also removes other whitespace characters and it modifies the beginning and end of the string. That being said, the ability to remove multiple newlines or any excess whitespace is the behavior we want.
@edmorley
Copy link
Member

edmorley commented Jan 25, 2021

I just got failures like:

Retrying failed Attempt #1/3 to push for 'hatchet-t-ddbe2cb3b6' due to error: 
Hatchet::App::FailedDeployError Could not deploy 'hatchet-t-ddbe2cb3b6' (spec/fixtures/python_3.6_outdated) using 'Hatchet::GitApp' at path: 'spec/fixtures/python_3.6_outdated'
if this was expected add `allow_failure: true` to your deploy hash.
Buildpack: nil
Repo: https://git.heroku.com/hatchet-t-ddbe2cb3b6.git
output:
remote: Compressing source files... done.        
remote: Building source:        
remote: 
remote: -----> Building on the Heroku-20 stack        
remote: -----> Python app detected        
remote:  !     Python has released a security update! Please consider upgrading to python-3.6.12        
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes        
remote: -----> Installing python-3.6.11        
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2        
remote: -----> Installing SQLite3        
remote: -----> Installing requirements with pip        
remote: -----> Discovering process types        
remote:        Procfile declares types -> (none)        
remote: 
remote: -----> Compressing...        
remote:        Done: 47.1M        
remote: -----> Launching...        
remote:        Released v3        
remote:        https://hatchet-t-ddbe2cb3b6.herokuapp.com/ deployed to Heroku        
remote: 
remote: 
remote: !	Heroku Git error, please try again shortly.        
remote: !	See http://status.heroku.com for current Heroku platform status.        
remote: !	If the problem persists, please open a ticket        
remote: !	on https://help.heroku.com/tickets/new        
remote: !	and provide the Request ID 687f8a07-24f4-4a19-be70-6aa8119ec924  

Checking request ID 687f8a07-24f4-4a19-be70-6aa8119ec924 in internal logs showed that the failure was due to exceeding the rate limit.

It looks like Endosome isn't handling this case gracefully, and as a result isn't outputting the rate limit error message, so Hatchet doesn't know to rate limit, and instead keeps on retrying, making the situation worse.

I've filed an internal ticket against Endosome: W-8786987.

@edmorley
Copy link
Member

I got another failure from hitting the rate limit, where the rate limit was mentioned in the Git server response (unlike the above), but uses a different wording from the ones Hatchet recognises, causing Hatchet not to treat it as a rate limit error.

I've filed #176 for that.

@edmorley
Copy link
Member

I think this issue has run its course - since the most prevalent issues have since been fixed in Hatchet.

We're also prioritising libcnb-test moving forwards.

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