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

chore: Add support for usage tracking to data sources #3224

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

sfc-gh-jcieslak
Copy link
Collaborator

The last part of usage tracking, changes:

  • Added support for usage tracking in all data sources (+ acceptance test)
  • Added schema version and datasource field to metadata

}
if m.Operation == "" {
errs = append(errs, errors.New("operation for metadata should not be empty"))
}
return errors.Join(errs...)
}

func NewMetadata(version string, resource resources.Resource, operation Operation) Metadata {
// NewTestMetadata is a helper constructor that is used only for testing purposes
func NewTestMetadata(version string, resource resources.Resource, operation Operation) Metadata {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: can we move it to a test package?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I made it private and any usages outside of the packages were changed to plain struct creation (it was used in one integration test)

Copy link

Integration tests failure for fbc9eaa0f8449a7cd789b41f134f8c29d73f9121

Copy link

Integration tests cancelled for 0685049a81c2323738b9a8ef7ac945e21512def7

// NewTestMetadata is a helper constructor that is used only for testing purposes
func NewTestMetadata(version string, resource resources.Resource, operation Operation) Metadata {
// newTestMetadata is a helper constructor that is used only for testing purposes
func newTestMetadata(version string, resource resources.Resource, operation Operation) Metadata {
Copy link
Collaborator

Choose a reason for hiding this comment

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

it was supposed to go to a test package :sadeg:

@sfc-gh-jcieslak sfc-gh-jcieslak merged commit 8210bb8 into main Nov 26, 2024
8 of 9 checks passed
@sfc-gh-jcieslak sfc-gh-jcieslak deleted the basic-object-tracking-part4 branch November 26, 2024 15:14
Copy link

Integration tests failure for 62c747673a3f13adda2598133c8a5b6f1c13ea40

sfc-gh-jmichalak pushed a commit that referenced this pull request Nov 26, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.99.0](v0.98.0...v0.99.0)
(2024-11-26)


### 🎉 **What's new:**

* Add tags data source
([#3211](#3211))
([8907d9d](8907d9d))
* Tag resource v1
([#3197](#3197))
([77b3bf0](77b3bf0))
* Tasks v1 readiness
([#3222](#3222))
([e2284d9](e2284d9))


### 🔧 **Misc**

* Add support for usage tracking to data sources
([#3224](#3224))
([8210bb8](8210bb8))
* Add usage tracking for the rest of the resources and fix views
([#3223](#3223))
([231f653](231f653))
* Basic object tracking
([#3205](#3205))
([1f0dc94](1f0dc94))
* basic object tracking part 2
([#3214](#3214))
([e44f2e1](e44f2e1))
* Improve tags integration tests
([#3193](#3193))
([7736e0a](7736e0a))
* parser and secret tests
([#3192](#3192))
([5ec9c86](5ec9c86))
* Storage integration with custom protocol
([#3213](#3213))
([a3a44ae](a3a44ae))
* Unskip auth config tests
([#3180](#3180))
([46ab142](46ab142))


### 🐛 **Bug fixes:**

* Small fixes and adjustments
([#3226](#3226))
([9f67457](9f67457))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: snowflake-release-please[bot] <105954990+snowflake-release-please[bot]@users.noreply.github.com>
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.

3 participants