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: v4.73.4
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: v4.74.0
Choose a head ref
  • 19 commits
  • 32 files changed
  • 5 contributors

Commits on Feb 3, 2025

  1. chore(deps): Update module github.com/cloudquery/plugin-sdk/v4 to v4.…

    …73.4 (#2073)
    
    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [github.com/cloudquery/plugin-sdk/v4](https://togithub.com/cloudquery/plugin-sdk) | require | patch | `v4.73.3` -> `v4.73.4` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>cloudquery/plugin-sdk (github.com/cloudquery/plugin-sdk/v4)</summary>
    
    ### [`v4.73.4`](https://togithub.com/cloudquery/plugin-sdk/releases/tag/v4.73.4)
    
    [Compare Source](https://togithub.com/cloudquery/plugin-sdk/compare/v4.73.3...v4.73.4)
    
    ##### Bug Fixes
    
    -   **deps:** Update aws-sdk-go-v2 monorepo ([#&#8203;2061](https://togithub.com/cloudquery/plugin-sdk/issues/2061)) ([7346223](https://togithub.com/cloudquery/plugin-sdk/commit/7346223d04dd709ab5e89b35f3914971ba8677d9))
    -   **deps:** Update aws-sdk-go-v2 monorepo ([#&#8203;2067](https://togithub.com/cloudquery/plugin-sdk/issues/2067)) ([21125d0](https://togithub.com/cloudquery/plugin-sdk/commit/21125d0c4f39553312fe0c82578d41bde6c707ca))
    -   **deps:** Update Google Golang modules ([#&#8203;2060](https://togithub.com/cloudquery/plugin-sdk/issues/2060)) ([d3a180d](https://togithub.com/cloudquery/plugin-sdk/commit/d3a180d8968b6fc30f645d7f34cf6a63d5632497))
    -   **deps:** Update Google Golang modules ([#&#8203;2066](https://togithub.com/cloudquery/plugin-sdk/issues/2066)) ([6c32c4a](https://togithub.com/cloudquery/plugin-sdk/commit/6c32c4a75a5fda58efc40b0da149bf339ccd54ff))
    -   **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.26.6 ([#&#8203;2072](https://togithub.com/cloudquery/plugin-sdk/issues/2072)) ([00ce2d7](https://togithub.com/cloudquery/plugin-sdk/commit/00ce2d772ee4e27629252c0b222843cc71036d2c))
    -   **deps:** Update module github.com/invopop/jsonschema to v0.13.0 ([#&#8203;2068](https://togithub.com/cloudquery/plugin-sdk/issues/2068)) ([c8122a2](https://togithub.com/cloudquery/plugin-sdk/commit/c8122a2685b057f1f522991d55a78859e7ed67e2))
    -   **deps:** Update module golang.org/x/oauth2 to v0.25.0 ([#&#8203;2069](https://togithub.com/cloudquery/plugin-sdk/issues/2069)) ([9448009](https://togithub.com/cloudquery/plugin-sdk/commit/944800907fa7b065a0bb2ee81cae12598fae07e6))
    -   **deps:** Update opentelemetry-go monorepo ([#&#8203;2070](https://togithub.com/cloudquery/plugin-sdk/issues/2070)) ([66793b9](https://togithub.com/cloudquery/plugin-sdk/commit/66793b9e2ec5694c5aa186ff951aee8aeee1530b))
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Feb 3, 2025
    Copy the full SHA
    3ca94a2 View commit details

Commits on Feb 8, 2025

  1. fix(deps): Update aws-sdk-go-v2 monorepo (#2074)

    This PR contains the following updates:
    
    | Package | Type | Update | Change | Pending |
    |---|---|---|---|---|
    | [github.com/aws/aws-sdk-go-v2](https://redirect.github.com/aws/aws-sdk-go-v2) | require | minor | `v1.34.0` -> `v1.36.0` | `v1.36.1` |
    | [github.com/aws/aws-sdk-go-v2/config](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.29.2` -> `v1.29.4` | `v1.29.6` (+1) |
    | [github.com/aws/aws-sdk-go-v2/service/licensemanager](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.29.13` -> `v1.29.15` | `v1.29.17` (+1) |
    | [github.com/aws/aws-sdk-go-v2/service/marketplacemetering](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.25.12` -> `v1.25.14` | `v1.25.15` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>aws/aws-sdk-go-v2 (github.com/aws/aws-sdk-go-v2)</summary>
    
    ### [`v1.36.0`](https://redirect.github.com/aws/aws-sdk-go-v2/compare/v1.35.0...v1.36.0)
    
    [Compare Source](https://redirect.github.com/aws/aws-sdk-go-v2/compare/v1.35.0...v1.36.0)
    
    ### [`v1.35.0`](https://redirect.github.com/aws/aws-sdk-go-v2/compare/v1.34.0...v1.35.0)
    
    [Compare Source](https://redirect.github.com/aws/aws-sdk-go-v2/compare/v1.34.0...v1.35.0)
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - "before 3am on Saturday" (UTC), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjQuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE2NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Feb 8, 2025
    Copy the full SHA
    091e2c7 View commit details

Commits on Feb 10, 2025

  1. fix(deps): Update module github.com/cloudquery/plugin-pb-go to v1.26.7 (

    #2076)
    
    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [github.com/cloudquery/plugin-pb-go](https://redirect.github.com/cloudquery/plugin-pb-go) | require | patch | `v1.26.6` -> `v1.26.7` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>cloudquery/plugin-pb-go (github.com/cloudquery/plugin-pb-go)</summary>
    
    ### [`v1.26.7`](https://redirect.github.com/cloudquery/plugin-pb-go/releases/tag/v1.26.7)
    
    [Compare Source](https://redirect.github.com/cloudquery/plugin-pb-go/compare/v1.26.6...v1.26.7)
    
    ##### Bug Fixes
    
    -   Generate Go Code from `plugin-pb` ([#&#8203;476](https://redirect.github.com/cloudquery/plugin-pb-go/issues/476)) ([4a9eb63](https://redirect.github.com/cloudquery/plugin-pb-go/commit/4a9eb63b33476a437fa0f74fb4930396524a8907))
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Feb 10, 2025
    Copy the full SHA
    dbdae2f View commit details

Commits on Feb 11, 2025

  1. chore: Switch test workflows to ubicloud runners (#2078)

    #### Summary
    
    Uses ubicloud runners which are 10x cheaper for testing workflows.
    Publishing related workflows will still use GitHub runners for security reasons
    
    ---
    erezrokah authored Feb 11, 2025
    Copy the full SHA
    e389c35 View commit details
  2. chore(deps): Migrate renovate config (#2079)

    The Renovate config in this repository needs migrating. Typically this is because one or more configuration options you are using have been renamed.
    
      You don't need to merge this PR right away, because Renovate will continue to migrate these fields internally each time it runs. But later some of these fields may be fully deprecated and the migrations removed. So it's a good idea to merge this migration PR soon. 
    
    
    
    #### [PLEASE NOTE](https://docs.renovatebot.com/configuration-options#configmigration): JSON5 config file migrated! All comments & trailing commas were removed.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about config migration again, but one day your current config may no longer be valid.
    
    ❓ Got questions? Does something look wrong to you? Please don't hesitate to [request help here](https://redirect.github.com/renovatebot/renovate/discussions).
    
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    cq-bot authored Feb 11, 2025
    Copy the full SHA
    da8e9b6 View commit details

Commits on Feb 12, 2025

  1. feat: Add way to get Configtype time value for hashing (#2077)

    #### Summary
    
    First option was using exported fields, but even that would require additional logic- e.g. what should happen, if the user provided input is `50 minutes ago` and the sync is run twice at different times?
    
    I think this approach makes more sense, but let me know if there are any other ideas or comments to consider.
    
    ---
    closes cloudquery/cloudquery-private#6478
    blesniewski authored Feb 12, 2025
    Copy the full SHA
    ed27292 View commit details

Commits on Feb 15, 2025

  1. fix(deps): Update module google.golang.org/protobuf to v1.36.5 (#2081)

    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [google.golang.org/protobuf](https://redirect.github.com/protocolbuffers/protobuf-go) | require | patch | `v1.36.4` -> `v1.36.5` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>protocolbuffers/protobuf-go (google.golang.org/protobuf)</summary>
    
    ### [`v1.36.5`](https://redirect.github.com/protocolbuffers/protobuf-go/releases/tag/v1.36.5)
    
    [Compare Source](https://redirect.github.com/protocolbuffers/protobuf-go/compare/v1.36.4...v1.36.5)
    
    **Full Changelog**: protocolbuffers/protobuf-go@v1.36.4...v1.36.5
    
    Bug fixes:
    [CL/644437](https://go-review.googlesource.com/c/protobuf/+/644437): protogen: fix name mangling for fields with identical GoCamelCase
    
    Maintenance:
    [CL/641655](https://go-review.googlesource.com/c/protobuf/+/641655): all: remove weak field support
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - "before 3am on Saturday" (UTC), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Feb 15, 2025
    Copy the full SHA
    833b19c View commit details

Commits on Feb 17, 2025

  1. Copy the full SHA
    7d27045 View commit details
  2. fix(deps): Update aws-sdk-go-v2 monorepo (#2080)

    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [github.com/aws/aws-sdk-go-v2](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.36.0` -> `v1.36.1` |
    | [github.com/aws/aws-sdk-go-v2/config](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.29.4` -> `v1.29.6` |
    | [github.com/aws/aws-sdk-go-v2/service/licensemanager](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.29.15` -> `v1.29.17` |
    | [github.com/aws/aws-sdk-go-v2/service/marketplacemetering](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.25.14` -> `v1.25.15` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>aws/aws-sdk-go-v2 (github.com/aws/aws-sdk-go-v2)</summary>
    
    ### [`v1.36.1`](https://redirect.github.com/aws/aws-sdk-go-v2/compare/v1.36.0...v1.36.1)
    
    [Compare Source](https://redirect.github.com/aws/aws-sdk-go-v2/compare/v1.36.0...v1.36.1)
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - "before 3am on Saturday" (UTC), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Feb 17, 2025
    Copy the full SHA
    14ad9db View commit details

Commits on Feb 19, 2025

  1. feat: Add description to time JSONschema (#2083)

    When generating table docs with table options, the new description will be used
    blesniewski authored Feb 19, 2025
    Copy the full SHA
    fc27b14 View commit details

Commits on Feb 25, 2025

  1. feat: Add WithNullableFieldTransformer to transformers.TransformWithS…

    …truct options (#2084)
    
    
    
    <!--
    Explain what problem this PR addresses
    -->
    
    Fixes cloudquery/cloudquery#20286
    
    Add `transformers.WithNullableFieldTransformer(func ...)` to allow the SDK user to have custom rules to decide for a field nullability.
    This is especially useful when the user defines its struct with some pointers and some regular value types: we can have the that set `nil` for pointers, non `nil` for non-pointers.
    
    ---
    jeromewir authored Feb 25, 2025
    Copy the full SHA
    2175946 View commit details

Commits on Mar 1, 2025

  1. fix(deps): Update aws-sdk-go-v2 monorepo (#2085)

    This PR contains the following updates:
    
    | Package | Type | Update | Change | Pending |
    |---|---|---|---|---|
    | [github.com/aws/aws-sdk-go-v2](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.36.1` -> `v1.36.2` | `v1.36.3` |
    | [github.com/aws/aws-sdk-go-v2/config](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.29.6` -> `v1.29.7` | `v1.29.8` |
    | [github.com/aws/aws-sdk-go-v2/service/licensemanager](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.29.17` -> `v1.29.18` | `v1.30.0` |
    | [github.com/aws/aws-sdk-go-v2/service/marketplacemetering](https://redirect.github.com/aws/aws-sdk-go-v2) | require | patch | `v1.25.15` -> `v1.25.16` | `v1.26.0` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>aws/aws-sdk-go-v2 (github.com/aws/aws-sdk-go-v2)</summary>
    
    ### [`v1.36.2`](https://redirect.github.com/aws/aws-sdk-go-v2/compare/v1.36.1...v1.36.2)
    
    [Compare Source](https://redirect.github.com/aws/aws-sdk-go-v2/compare/v1.36.1...v1.36.2)
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - "before 3am on Saturday" (UTC), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Mar 1, 2025
    Copy the full SHA
    3da5572 View commit details
  2. fix(deps): Update module github.com/goccy/go-json to v0.10.5 (#2086)

    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [github.com/goccy/go-json](https://redirect.github.com/goccy/go-json) | require | patch | `v0.10.4` -> `v0.10.5` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>goccy/go-json (github.com/goccy/go-json)</summary>
    
    ### [`v0.10.5`](https://redirect.github.com/goccy/go-json/releases/tag/v0.10.5): 0.10.5
    
    [Compare Source](https://redirect.github.com/goccy/go-json/compare/v0.10.4...v0.10.5)
    
    #### What's Changed
    
    -   fix: data race in AnalyzeTypeAddr for v0.10.4 by [@&#8203;sunadoi](https://redirect.github.com/sunadoi) in [https://github.com/goccy/go-json/pull/531](https://redirect.github.com/goccy/go-json/pull/531)
    
    #### New Contributors
    
    -   [@&#8203;sunadoi](https://redirect.github.com/sunadoi) made their first contribution in [https://github.com/goccy/go-json/pull/531](https://redirect.github.com/goccy/go-json/pull/531)
    
    **Full Changelog**: goccy/go-json@v0.10.4...v0.10.5
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - "* 0-3 1 * *" (UTC), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Mar 1, 2025
    Copy the full SHA
    b238237 View commit details
  3. fix(deps): Update module github.com/google/go-cmp to v0.7.0 (#2088)

    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [github.com/google/go-cmp](https://redirect.github.com/google/go-cmp) | require | minor | `v0.6.0` -> `v0.7.0` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>google/go-cmp (github.com/google/go-cmp)</summary>
    
    ### [`v0.7.0`](https://redirect.github.com/google/go-cmp/releases/tag/v0.7.0)
    
    [Compare Source](https://redirect.github.com/google/go-cmp/compare/v0.6.0...v0.7.0)
    
    New API:
    
    -   ([#&#8203;367](https://redirect.github.com/google/go-cmp/issues/367)) Support compare functions with SortSlices and SortMaps
    
    Panic messaging:
    
    -   ([#&#8203;370](https://redirect.github.com/google/go-cmp/issues/370)) Detect proto.Message types when failing to export a field
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - "* 0-3 1 * *" (UTC), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Mar 1, 2025
    Copy the full SHA
    1895ddf View commit details

Commits on Mar 5, 2025

  1. fix(deps): Update module github.com/cloudquery/cloudquery-api-go to v…

    …1.13.6 (#2089)
    
    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [github.com/cloudquery/cloudquery-api-go](https://redirect.github.com/cloudquery/cloudquery-api-go) | require | patch | `v1.13.5` -> `v1.13.6` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>cloudquery/cloudquery-api-go (github.com/cloudquery/cloudquery-api-go)</summary>
    
    ### [`v1.13.6`](https://redirect.github.com/cloudquery/cloudquery-api-go/releases/tag/v1.13.6)
    
    [Compare Source](https://redirect.github.com/cloudquery/cloudquery-api-go/compare/v1.13.5...v1.13.6)
    
    ##### Bug Fixes
    
    -   Generate CloudQuery Go API Client from `spec.json` ([#&#8203;274](https://redirect.github.com/cloudquery/cloudquery-api-go/issues/274)) ([aeebd1d](https://redirect.github.com/cloudquery/cloudquery-api-go/commit/aeebd1d47e505f6fb09f57c08c41cbca4a71a7b0))
    -   Generate CloudQuery Go API Client from `spec.json` ([#&#8203;276](https://redirect.github.com/cloudquery/cloudquery-api-go/issues/276)) ([0406903](https://redirect.github.com/cloudquery/cloudquery-api-go/commit/040690319106ba9d245a2052fc7ccea794ce426d))
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4Ny4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Mar 5, 2025
    Copy the full SHA
    4faff6a View commit details
  2. chore(deps): Update dependency golangci/golangci-lint to v1.64.5 (#2087)

    This PR contains the following updates:
    
    | Package | Update | Change | Pending |
    |---|---|---|---|
    | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v1.63.4` -> `v1.64.5` | `v1.64.6` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>golangci/golangci-lint (golangci/golangci-lint)</summary>
    
    ### [`v1.64.5`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1645)
    
    [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.4...v1.64.5)
    
    1.  Bug fixes
        -   Add missing flag `new-from-merge-base-flag`
    2.  Linters bug fixes
        -   `asciicheck`: from 0.3.0 to 0.4.0
        -   `forcetypeassert`: from 0.1.0 to 0.2.0
        -   `gosec`: from 2.22.0 to 2.22.1
    
    ### [`v1.64.4`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1644)
    
    [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.3...v1.64.4)
    
    1.  Linters bug fixes
        -   `gci`: fix standard packages list for go1.24
    
    ### [`v1.64.3`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1643)
    
    [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.2...v1.64.3)
    
    1.  Linters bug fixes
        -   `ginkgolinter`: from 0.18.4 to 0.19.0
        -   `go-critic`: from 0.11.5 to 0.12.0
        -   `revive`: from 1.6.0 to 1.6.1
        -   `gci`: fix standard packages list for go1.24
    2.  Misc.
        -   Build Docker images with go1.24
    
    ### [`v1.64.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1642)
    
    [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.63.4...v1.64.2)
    
    This is the last minor release of golangci-lint v1.
    The next release will be golangci-lint [v2](https://redirect.github.com/golangci/golangci-lint/issues/5300).
    
    1.  Enhancements
        -   🎉 go1.24 support
        -   New `issues.new-from-merge-base` option
        -   New `run.relative-path-mode` option
    2.  Linters new features
        -   `copyloopvar`: from 1.1.0 to 1.2.1 (support suggested fixes)
        -   `exptostd`: from 0.3.1 to 0.4.1 (handles `golang.org/x/exp/constraints.Ordered`)
        -   `fatcontext`: from 0.5.3 to 0.7.1 (new option: `check-struct-pointers`)
        -   `perfsprint`: from 0.7.1 to 0.8.1 (new options: `integer-format`, `error-format`, `string-format`, `bool-format`, and `hex-format`)
        -   `revive`: from 1.5.1 to 1.6.0 (new rules: `redundant-build-tag`, `use-errors-new`. New option `early-return.early-return`)
    3.  Linters bug fixes
        -   `go-errorlint`: from 1.7.0 to 1.7.1
        -   `gochecknoglobals`: from 0.2.1 to 0.2.2
        -   `godox`: from [`006bad1`](https://redirect.github.com/golangci/golangci-lint/commit/006bad1f9d26) to 1.1.0
        -   `gosec`: from 2.21.4 to 2.22.0
        -   `iface`: from 1.3.0 to 1.3.1
        -   `nilnesserr`: from 0.1.1 to 0.1.2
        -   `protogetter`: from 0.3.8 to 0.3.9
        -   `sloglint`: from 0.7.2 to 0.9.0
        -   `spancheck`: fix default `StartSpanMatchersSlice` values
        -   `staticcheck`: from 0.5.1 to 0.6.0
    4.  Deprecations
        -   ⚠️ `tenv` is deprecated and replaced by `usetesting.os-setenv: true`.
        -   ⚠️ `exportloopref` deprecation step 2
    5.  Misc.
        -   Sanitize severities by output format
        -   Avoid panic with plugin without description
    6.  Documentation
        -   Clarify `depguard` configuration
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - "* 0-3 1 * *" (UTC), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Mar 5, 2025
    Copy the full SHA
    9fd9da4 View commit details
  3. fix(deps): Update module github.com/cloudquery/plugin-pb-go to v1.26.8 (

    #2090)
    
    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [github.com/cloudquery/plugin-pb-go](https://redirect.github.com/cloudquery/plugin-pb-go) | require | patch | `v1.26.7` -> `v1.26.8` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>cloudquery/plugin-pb-go (github.com/cloudquery/plugin-pb-go)</summary>
    
    ### [`v1.26.8`](https://redirect.github.com/cloudquery/plugin-pb-go/releases/tag/v1.26.8)
    
    [Compare Source](https://redirect.github.com/cloudquery/plugin-pb-go/compare/v1.26.7...v1.26.8)
    
    ##### Bug Fixes
    
    -   **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.13.6 ([#&#8203;482](https://redirect.github.com/cloudquery/plugin-pb-go/issues/482)) ([804376c](https://redirect.github.com/cloudquery/plugin-pb-go/commit/804376c3daa2c3438532d3bc0c3421650aa5f190))
    -   **deps:** Update module github.com/google/go-cmp to v0.7.0 ([#&#8203;481](https://redirect.github.com/cloudquery/plugin-pb-go/issues/481)) ([22ee30b](https://redirect.github.com/cloudquery/plugin-pb-go/commit/22ee30b72088842d4e58570ffe9661fdd6591105))
    -   **deps:** Update module google.golang.org/protobuf to v1.36.5 ([#&#8203;478](https://redirect.github.com/cloudquery/plugin-pb-go/issues/478)) ([e8f2d4d](https://redirect.github.com/cloudquery/plugin-pb-go/commit/e8f2d4d0868c28c5e1953bb5c396aa96d0474af5))
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
    
    ---
    
    This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4Ny4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
    cq-bot authored Mar 5, 2025
    Copy the full SHA
    c4c9cd6 View commit details

Commits on Mar 7, 2025

  1. fix: Ignore context cancelled errors. (#2091)

    fixes cloudquery/cloudquery-issues#3451
    
    The CLI closes the context that the Transformer plugin uses upon completion of the sync. This is not an error, so the SDK should not raise it in the `Transform` function.
    
    This error is benign in that the sync still works as expected, but it looks bad in the logs, which end up showing up in `cloudquery.log`, and it bubbles up to other products like Asset Inventory which happens to show errors in bright red colours.
    
    Here's a typical current run
    
    <img width="877" alt="Screenshot 2025-03-07 at 10 57 36" src="https://github.com/user-attachments/assets/5ce61a18-b7a1-4f47-89ca-c3a8e620487d" />
    
    Here's a fixed run
    
    <img width="949" alt="Screenshot 2025-03-07 at 10 54 49" src="https://github.com/user-attachments/assets/239f7665-48b1-49c5-a0bc-84db8a89efee" />
    marianogappa authored Mar 7, 2025
    Copy the full SHA
    bc50fd3 View commit details
  2. chore(main): Release v4.74.0 (#2075)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ## [4.74.0](v4.73.4...v4.74.0) (2025-03-07)
    
    
    ### Features
    
    * Add description to time JSONschema ([#2083](#2083)) ([fc27b14](fc27b14))
    * Add way to get Configtype time value for hashing ([#2077](#2077)) ([ed27292](ed27292))
    * Add WithNullableFieldTransformer to transformers.TransformWithStruct options ([#2084](#2084)) ([2175946](2175946))
    
    
    ### Bug Fixes
    
    * **deps:** Update aws-sdk-go-v2 monorepo ([#2074](#2074)) ([091e2c7](091e2c7))
    * **deps:** Update aws-sdk-go-v2 monorepo ([#2080](#2080)) ([14ad9db](14ad9db))
    * **deps:** Update aws-sdk-go-v2 monorepo ([#2085](#2085)) ([3da5572](3da5572))
    * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.13.6 ([#2089](#2089)) ([4faff6a](4faff6a))
    * **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.26.7 ([#2076](#2076)) ([dbdae2f](dbdae2f))
    * **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.26.8 ([#2090](#2090)) ([c4c9cd6](c4c9cd6))
    * **deps:** Update module github.com/goccy/go-json to v0.10.5 ([#2086](#2086)) ([b238237](b238237))
    * **deps:** Update module github.com/google/go-cmp to v0.7.0 ([#2088](#2088)) ([1895ddf](1895ddf))
    * **deps:** Update module google.golang.org/protobuf to v1.36.5 ([#2081](#2081)) ([833b19c](833b19c))
    * Ignore context cancelled errors. ([#2091](#2091)) ([bc50fd3](bc50fd3))
    
    ---
    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 Mar 7, 2025
    Copy the full SHA
    0a4a8b1 View commit details
10 changes: 6 additions & 4 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
extends: [
"github>cloudquery/.github//.github/renovate-go-default.json5",
"github>cloudquery/.github//.github/renovate-node-default.json5",
'github>cloudquery/.github//.github/renovate-go-default.json5',
'github>cloudquery/.github//.github/renovate-node-default.json5',
],
packageRules: [
{
matchPackagePatterns: ["github.com/cloudquery/plugin-sdk/*"],
commitMessagePrefix: "chore(deps): ",
commitMessagePrefix: 'chore(deps): ',
matchPackageNames: [
'/github.com/cloudquery/plugin-sdk/*/',
],
},
],
}
4 changes: 2 additions & 2 deletions .github/workflows/lint_golang.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ on:
jobs:
golangci:
name: Lint with GolangCI
runs-on: large-ubuntu-plugin-sdk
runs-on: ubicloud-standard-8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
@@ -20,4 +20,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.63.4
version: v1.64.5
8 changes: 4 additions & 4 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ jobs:
unitests:
strategy:
matrix:
os: [large-ubuntu-plugin-sdk, large-windows-plugin-sdk, macos-latest]
os: [ubicloud-standard-8, large-windows-plugin-sdk, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
@@ -26,13 +26,13 @@ jobs:
- name: Run tests
run: make test
- name: Run benchmark
if: matrix.os == 'large-ubuntu-plugin-sdk'
if: matrix.os == 'ubicloud-standard-8'
run: make benchmark-ci
- name: Save PR number
if: matrix.os == 'large-ubuntu-plugin-sdk' && github.event_name == 'pull_request'
if: matrix.os == 'ubicloud-standard-8' && github.event_name == 'pull_request'
run: echo ${{ github.event.number }} > ./pr_number
- name: Upload deltas
if: matrix.os == 'large-ubuntu-plugin-sdk'
if: matrix.os == 'ubicloud-standard-8'
uses: actions/upload-artifact@v4
with:
name: delta-action-benchmarks
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ run:
linters-settings:
errcheck:
check-blank: false
ignore: fmt:.*,[rR]ead|[wW]rite|[cC]lose,io:Copy
gocritic:
disabled-checks:
- commentFormatting
@@ -87,3 +86,6 @@ linters:
- unconvert
- unparam
- unused
issues:
max-issues-per-linter: 0
max-same-issues: 0
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.73.4"
".": "4.74.0"
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.74.0](https://github.com/cloudquery/plugin-sdk/compare/v4.73.4...v4.74.0) (2025-03-07)


### Features

* Add description to time JSONschema ([#2083](https://github.com/cloudquery/plugin-sdk/issues/2083)) ([fc27b14](https://github.com/cloudquery/plugin-sdk/commit/fc27b14c801d44ffba458fc676a6e3f0d577dfec))
* Add way to get Configtype time value for hashing ([#2077](https://github.com/cloudquery/plugin-sdk/issues/2077)) ([ed27292](https://github.com/cloudquery/plugin-sdk/commit/ed27292685e032027802410265e92e96fbfc375e))
* Add WithNullableFieldTransformer to transformers.TransformWithStruct options ([#2084](https://github.com/cloudquery/plugin-sdk/issues/2084)) ([2175946](https://github.com/cloudquery/plugin-sdk/commit/217594694dfa253f1534aead73c3481978210a9d))


### Bug Fixes

* **deps:** Update aws-sdk-go-v2 monorepo ([#2074](https://github.com/cloudquery/plugin-sdk/issues/2074)) ([091e2c7](https://github.com/cloudquery/plugin-sdk/commit/091e2c7c028717a8dc91cf6440bd6307468f2fdc))
* **deps:** Update aws-sdk-go-v2 monorepo ([#2080](https://github.com/cloudquery/plugin-sdk/issues/2080)) ([14ad9db](https://github.com/cloudquery/plugin-sdk/commit/14ad9db4509fdf38516b7140b519af040ea8f218))
* **deps:** Update aws-sdk-go-v2 monorepo ([#2085](https://github.com/cloudquery/plugin-sdk/issues/2085)) ([3da5572](https://github.com/cloudquery/plugin-sdk/commit/3da55726a9264d8d74883d40886de122f0377e1c))
* **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.13.6 ([#2089](https://github.com/cloudquery/plugin-sdk/issues/2089)) ([4faff6a](https://github.com/cloudquery/plugin-sdk/commit/4faff6a844959875d43a5ceb8e1d18ca9d35e3ce))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.26.7 ([#2076](https://github.com/cloudquery/plugin-sdk/issues/2076)) ([dbdae2f](https://github.com/cloudquery/plugin-sdk/commit/dbdae2f4829cfd440e395dfaa9047e12f87d1fb2))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.26.8 ([#2090](https://github.com/cloudquery/plugin-sdk/issues/2090)) ([c4c9cd6](https://github.com/cloudquery/plugin-sdk/commit/c4c9cd60e35cd50e6567afdfc9901381bb293dd7))
* **deps:** Update module github.com/goccy/go-json to v0.10.5 ([#2086](https://github.com/cloudquery/plugin-sdk/issues/2086)) ([b238237](https://github.com/cloudquery/plugin-sdk/commit/b23823758f6a0d74a7ab9a96c3dfd5bdc09dce40))
* **deps:** Update module github.com/google/go-cmp to v0.7.0 ([#2088](https://github.com/cloudquery/plugin-sdk/issues/2088)) ([1895ddf](https://github.com/cloudquery/plugin-sdk/commit/1895ddf6d5438df771a16f2ad33e14c9ee77cbd4))
* **deps:** Update module google.golang.org/protobuf to v1.36.5 ([#2081](https://github.com/cloudquery/plugin-sdk/issues/2081)) ([833b19c](https://github.com/cloudquery/plugin-sdk/commit/833b19c406de76be59c19bb9c53695c675468325))
* Ignore context cancelled errors. ([#2091](https://github.com/cloudquery/plugin-sdk/issues/2091)) ([bc50fd3](https://github.com/cloudquery/plugin-sdk/commit/bc50fd3d2be414edba8f8ad5bb7739a012840bf1))

## [4.73.4](https://github.com/cloudquery/plugin-sdk/compare/v4.73.3...v4.73.4) (2025-02-03)


38 changes: 33 additions & 5 deletions configtype/time.go
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ package configtype

import (
"encoding/json"
"errors"
"fmt"
"math"
"regexp"
@@ -15,9 +16,10 @@ import (
// when a time type is required. We wrap the time.Time type so that
// the spec can be extended in the future to support other types of times
type Time struct {
input string
time time.Time
duration *timeDuration
input string
time time.Time
duration *timeDuration
hashNowFunc func() time.Time
}

func ParseTime(s string) (Time, error) {
@@ -85,6 +87,19 @@ func (Time) JSONSchema() *jsonschema.Schema {
Type: "string",
Pattern: timePattern,
Title: "CloudQuery configtype.Time",
Description: "Allows for defining timestamps in both absolute(RFC3339) and relative formats. " +
"Absolute timestamp example: `2024-01-01T12:00:00+00:00`.\n" +
"Relative timestamps can take this format:\n" +
"- `now`\n" +
"- `x seconds [ago|from now]`\n" +
"- `x minutes [ago|from now]`\n" +
"- `x hours [ago|from now]`\n" +
"- `x days [ago|from now]`\n" +
"`until` field usage:\n" +
"- `until: now`\n" +
"- `until: 2 days ago`\n" +
"- `until: 10 months 3 days 4h20m from now`\n" +
"- `until: 2024-01-01T12:00:00+00:00`",
}
}

@@ -130,6 +145,19 @@ func (t Time) String() string {
return t.input
}

func (t Time) Hash() (uint64, error) {
nowFunc := t.hashNowFunc
if nowFunc == nil {
nowFunc = time.Now
}
at := t.AsTime(nowFunc())
return uint64(at.UnixNano()), nil
}

func (t *Time) SetHashNowFunc(f func() time.Time) {
t.hashNowFunc = f
}

type timeDuration struct {
input string

@@ -185,13 +213,13 @@ func parseTimeDuration(s string) (timeDuration, error) {
inValue = false
case part == "ago":
if d.sign != 0 {
return timeDuration{}, fmt.Errorf("invalid duration format: more than one sign specifier")
return timeDuration{}, errors.New("invalid duration format: more than one sign specifier")
}

d.sign = -1
case part == "from":
if d.sign != 0 {
return timeDuration{}, fmt.Errorf("invalid duration format: more than one sign specifier")
return timeDuration{}, errors.New("invalid duration format: more than one sign specifier")
}

inSign = true
61 changes: 61 additions & 0 deletions configtype/time_test.go
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import (
"github.com/cloudquery/plugin-sdk/v4/configtype"
"github.com/cloudquery/plugin-sdk/v4/plugin"
"github.com/invopop/jsonschema"
"github.com/mitchellh/hashstructure/v2"
"github.com/stretchr/testify/require"
)

@@ -151,3 +152,63 @@ func TestTime_JSONSchema(t *testing.T) {
})
}
}

func TestTime_Hashing(t *testing.T) {
hnf := func() time.Time { return time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) }
cases := []struct {
a configtype.Time
b configtype.Time
hashNowFunc func() time.Time
equal bool
}{
{
a: func() configtype.Time { ct, _ := configtype.ParseTime("10m"); return ct }(),
b: func() configtype.Time { ct, _ := configtype.ParseTime("10m"); return ct }(),
hashNowFunc: hnf,
equal: true,
},
{
a: func() configtype.Time { ct, _ := configtype.ParseTime("10m"); return ct }(),
b: func() configtype.Time { ct, _ := configtype.ParseTime("10m"); return ct }(),
equal: false,
},
{
a: func() configtype.Time { ct, _ := configtype.ParseTime("10m"); return ct }(),
b: func() configtype.Time { ct, _ := configtype.ParseTime("1m"); return ct }(),
equal: false,
},
{
a: func() configtype.Time { ct, _ := configtype.ParseTime("2021-09-01T00:00:00Z"); return ct }(),
b: func() configtype.Time { ct, _ := configtype.ParseTime("2012-01-02T01:02:03Z"); return ct }(),
hashNowFunc: hnf,
equal: false,
},
{
a: func() configtype.Time { ct, _ := configtype.ParseTime("-50m30s"); return ct }(),
b: func() configtype.Time { ct, _ := configtype.ParseTime("50 minutes 30 seconds ago"); return ct }(),
hashNowFunc: hnf,
equal: true,
},
{
a: func() configtype.Time { ct, _ := configtype.ParseTime("50m30s"); return ct }(),
b: func() configtype.Time { ct, _ := configtype.ParseTime("50 minutes 30 seconds from now"); return ct }(),
hashNowFunc: hnf,
equal: true,
},
}
for _, tc := range cases {
tc.a.SetHashNowFunc(tc.hashNowFunc)
hashA, err := hashstructure.Hash(tc.a, hashstructure.FormatV2, nil)
require.NoError(t, err)
time.Sleep(1 * time.Second)
tc.b.SetHashNowFunc(tc.hashNowFunc)
hashB, err := hashstructure.Hash(tc.b, hashstructure.FormatV2, nil)
require.NoError(t, err)

if tc.equal {
require.Equal(t, hashA, hashB)
continue
}
require.NotEqual(t, hashA, hashB)
}
}
12 changes: 9 additions & 3 deletions docs/markdown.go
Original file line number Diff line number Diff line change
@@ -39,7 +39,10 @@ func (g *Generator) renderTablesAsMarkdown(dir string) error {
return fmt.Errorf("failed to create file %v: %v", outputPath, err)
}
defer f.Close()
f.WriteString(content)
_, err = f.WriteString(content)
if err != nil {
return fmt.Errorf("failed to write content to file %v: %v", outputPath, err)
}
return nil
}

@@ -76,8 +79,11 @@ func (g *Generator) renderTable(dir string, table *schema.Table) error {
return fmt.Errorf("failed to create file %v: %v", outputPath, err)
}
defer f.Close()
f.WriteString(content)
return f.Close()
_, err = f.WriteString(content)
if err != nil {
return fmt.Errorf("failed to write content to file %v: %v", outputPath, err)
}
return nil
}

func formatMarkdown(s string) string {
38 changes: 19 additions & 19 deletions examples/simple_plugin/go.mod
Original file line number Diff line number Diff line change
@@ -4,40 +4,40 @@ go 1.22.7

require (
github.com/apache/arrow-go/v18 v18.1.0
github.com/cloudquery/plugin-sdk/v4 v4.73.3
github.com/cloudquery/plugin-sdk/v4 v4.73.4
github.com/rs/zerolog v1.33.0
)

require (
github.com/adrg/xdg v0.5.3 // indirect
github.com/apache/arrow/go/v13 v13.0.0-20230731205701-112f94971882 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/aws/aws-sdk-go-v2 v1.34.0 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.2 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.55 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.25 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10 // indirect
github.com/aws/aws-sdk-go-v2/service/licensemanager v1.29.13 // indirect
github.com/aws/aws-sdk-go-v2/service/marketplacemetering v1.25.12 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.12 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.11 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.10 // indirect
github.com/aws/aws-sdk-go-v2 v1.36.2 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.7 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.60 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.33 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.33 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.14 // indirect
github.com/aws/aws-sdk-go-v2/service/licensemanager v1.29.18 // indirect
github.com/aws/aws-sdk-go-v2/service/marketplacemetering v1.25.16 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.16 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.15 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.15 // indirect
github.com/aws/smithy-go v1.22.2 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cloudquery/cloudquery-api-go v1.13.5 // indirect
github.com/cloudquery/plugin-pb-go v1.26.6 // indirect
github.com/cloudquery/cloudquery-api-go v1.13.6 // indirect
github.com/cloudquery/plugin-pb-go v1.26.8 // indirect
github.com/cloudquery/plugin-sdk/v2 v2.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/go-json v0.10.4 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/google/flatbuffers v24.12.23+incompatible // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.2.0 // indirect
@@ -86,7 +86,7 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
google.golang.org/grpc v1.70.0 // indirect
google.golang.org/protobuf v1.36.4 // indirect
google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading