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

feat: add livelogs support #869

Merged
merged 16 commits into from
Jan 25, 2024
Merged

feat: add livelogs support #869

merged 16 commits into from
Jan 25, 2024

Conversation

sebv
Copy link
Contributor

@sebv sebv commented Dec 13, 2023

Proposed changes

Adds livelogs support

saucectl run --live-logs

saucectl imagerunner logs --live-logs $RUNNER

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Sorry, something went wrong.

@sebv sebv requested a review from a team as a code owner December 13, 2023 14:19
@alexplischke alexplischke changed the title adds livelogs support feat: adds livelogs support Jan 8, 2024
@alexplischke alexplischke changed the title feat: adds livelogs support feat: add livelogs support Jan 8, 2024
alexplischke
alexplischke previously approved these changes Jan 8, 2024
@sebv sebv force-pushed the livelogs branch 3 times, most recently from 3fcb25b to 91bee05 Compare January 17, 2024 10:53
Comment on lines +218 to +229
func ignoreError(err error) bool {
if err == nil {
return true
}
if !errors.Is(err, context.Canceled) {
return true
}
if strings.Contains(err.Error(), "websocket: close") {
return true
}
return false
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering that this is a function to be used somewhere and is defined at the package level, it kinda lacks context as to when it should be used (i.e. its name is too generic, suggesting that it could be used for any error check in this package). Has no docs either. If

if !ignoreError(err) {
is the only place, it may have been better as a inlined function.

@alexplischke alexplischke merged commit b5c8e95 into main Jan 25, 2024
18 checks passed
@alexplischke alexplischke deleted the livelogs branch January 25, 2024 00:42
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

Successfully merging this pull request may close these issues.

None yet

3 participants