Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cloudquery/plugin-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2174761
Choose a base ref
...
head repository: cloudquery/plugin-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d9d2b9a
Choose a head ref
  • 6 commits
  • 7 files changed
  • 4 contributors

Commits on Dec 24, 2022

  1. feat: Add basic periodic metric INFO logger (#496)

    - Logs very basic stats about the sync every 30 seconds.
    - Used `ctx` and a new waitgroup - because it's importat to shut it down gracefully (concurrent map read-writes are dangerous in golang).
    - Used `TotalResourcesAtomic` - see this stackoverflow answer: https://stackoverflow.com/a/46557083
    shimonp21 authored Dec 24, 2022
    1 Configuration menu
    Copy the full SHA
    8d1d32e View commit details
    Browse the repository at this point in the history
  2. refactor: Use status.Convert instead of FromError (#484)

    
    Similar to #478.
    `status.Convert` calls `FromError` internally.
    Some notes:
    1. No need to check `s != nil` as `status.Convert` always returns a non `nil` value if `err != nil`
    2. `FromError` returns `false` if `err` is not a gRPC error. This can never happen in this case. Also I believe the `failed to call GetProtocolVersion` is wrong as it should be `err is not a gRPC error`. Regardless I don't think we need it
    
    ---
    erezrokah authored Dec 24, 2022
    1 Configuration menu
    Copy the full SHA
    30d07ff View commit details
    Browse the repository at this point in the history
  3. 1 Configuration menu
    Copy the full SHA
    b47c8ed View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2022

  1. fix(destinations): Stop writing resources when channel is closed (#460)

    
    Related to cloudquery/cloudquery#5152.
    
    This fixes an issue when if the channel gets closed (for example there's an error during write), we report the `EOF` error instead of the original error.
    
    Scenario from the issue:
    1. Users runs `sync --no-migrate` on a non initialized database
    2. [`Write`](https://github.com/cloudquery/plugin-sdk/blob/ab7ca972e0b187a7dfb66132a03f07479cd29bb7/internal/servers/destinations.go#L84) fails on the first table write, returning an error from this function:
    https://github.com/cloudquery/plugin-sdk/blob/ab7ca972e0b187a7dfb66132a03f07479cd29bb7/internal/servers/destinations.go#L65, causing the channel to close
    3.  The next iteration of `for resource := range resources` starts, receiving an `EOF` error since the channel is closed, and `EOF` error is reported.
    
    > This is only a patch. I think we should separate application level errors (e.g. write) from protocol/communication level errors. I'll open a separate issue for that
    
    **Also, [another related fix coming](#461
    
    ---
    erezrokah authored Dec 27, 2022
    1 Configuration menu
    Copy the full SHA
    5590845 View commit details
    Browse the repository at this point in the history
  2. 1 Configuration menu
    Copy the full SHA
    d91f94f View commit details
    Browse the repository at this point in the history
  3. chore(main): Release v1.14.0 (#530)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ## [1.14.0](v1.13.1...v1.14.0) (2022-12-27)
    
    
    ### Features
    
    * Add basic periodic metric INFO logger ([#496](#496)) ([8d1d32e](8d1d32e))
    
    
    ### Bug Fixes
    
    * **destinations:** Stop writing resources when channel is closed ([#460](#460)) ([5590845](5590845))
    * Don't hide errors in destination server ([#529](#529)) ([d91f94f](d91f94f))
    
    ---
    This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
    cq-bot authored Dec 27, 2022
    1 Configuration menu
    Copy the full SHA
    d9d2b9a View commit details
    Browse the repository at this point in the history
Loading