Lookout-sdk

Latest version: v0.6.3

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.6.3

Identical to v0.6.2.
This release fixes a build problem with the python sdk library.

0.6.2

Bug Fixes

The Go gRPC interceptors were executed in an order that did not allow to use `pb.AddFields` inside a client interceptor (85).

0.6.1

You might want to check out the changes made to `examples/language-analyzer.go` and `examples/language-analyzer.py` in the [comparison view](https://github.com/src-d/lookout-sdk/compare/v0.5.0...v0.6.1files_bucket).

Go SDK

Except for using `pb.DialContext` and `pb.NewServer` or their corresponding `pb.DialContextWithInterceptors` and `pb.NewServerWithInterceptors`, you don't have anything else to do in order to activate the audit trail.

Python SDK

Follow these steps to activate the audit trail.
1. Rename the following:
- `NotifyReviewEvent` -> `notify_review_event`,
- `NotifyPushEvent` -> `notify_push_event`.
2. Use `create_server`.
3. Use `DataStub` imported from `lookout.sdk.service_data` and not from `pb`. The returned stub has a more pythonic api. You have to rename the following calls:
- `GetChanges` -> `get_changes`,
- `GetFiles` -> `get_files`.
Both methods needs as first positional argument the context.

0.6.0

**Not recommended**

This release brings new functionality that breaks compatibility with `v0.5.0`. Please use the [v0.6.1 release](https://github.com/src-d/lookout-sdk/releases/tag/v0.6.1) instead, that includes the same new features but in a backwards-compatible way.

Breaking Changes

71: The SDK library now applies gRPC interceptors to the gRPC client and server. These connectors allow to keep log fields during the message exchange between `lookoutd` and your analyzer.

An example of the logs fields that are kept in the message exchange would be
json
{
"repository": "github.com/src-d/lookout-sdk",
"github.pr": 17
}


In practice this means that your analyzer will be able to add relevant information to its logs; and `lookoutd` will have a context for each call you make. A sort of audit trail for each `GetChanges` or `GetFiles` call.

You might want to check out the changes made to `examples/language-analyzer.go` and `examples/language-analyzer.py` in the [comparison view](https://github.com/src-d/lookout-sdk/compare/v0.5.0...v0.6.0files_bucket).

0.5.0

Breaking Changes

This release removes the `merge` field from `ReviewEvent` (74).
When a pull request is created on GitHub, they create a merge commit to test whether the head branch can be automatically merged into the base branch. The `merge` field stored a reference pointer to this merge.
This field is specific to GitHub, and is only present when the pull request is mergeable. We have removed it to make the SDK easier to use.

0.4.1

New Features

Go

- In previous versions we instructed analyzer authors to disable secure connections to source{d} Lookout using `grpc.WithInsecure()`. This is not needed anymore because the SDK library performs it when you use `pb.DialContext` (67).
- New instructions to use `conn.ResetConnectBackoff` to reset the gRPC backoff when your analyzer receives a new event. See the [documentation here](https://github.com/src-d/lookout-sdk/dataservice) (66).

Python

- The library is now also published as a Source Distribution, sdist (68).

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.