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

Vc/incoming device api #38

Merged
merged 21 commits into from
Apr 25, 2024
Merged

Vc/incoming device api #38

merged 21 commits into from
Apr 25, 2024

Conversation

DoctorVin
Copy link
Contributor

No description provided.

Copy link
Member

@joelrebel joelrebel left a comment

Choose a reason for hiding this comment

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

I would prefer we move away from versioned attributes for Firmware, Status, Vendor attribute like we discussed and prefer if this is more of an interim solution.

internal/inventory/device_view.go Show resolved Hide resolved
*/

var (
// historically these values were determined/set by alloy, even though they are
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Depending on the direction I take with versioned_attribute namespaces I can make that change or keep things in-repo and private to FleetDB. That "keeping database internal things private" has been a major motivating factor for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the end, I decided to keep this internal to FleetDB.

Copy link
Member

Choose a reason for hiding this comment

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

If its still going to be the same namespace then lets use the consts, that way its easier to find and replace these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to do this and found another way where FleetDB is more fragile than expected. https://equinixjira.atlassian.net/browse/FS-1393

internal/dbtools/component_types.go Show resolved Hide resolved
internal/inventory/device_components.go Outdated Show resolved Hide resolved
internal/inventory/device_view.go Outdated Show resolved Hide resolved
internal/inventory/device_view.go Show resolved Hide resolved
internal/inventory/device_view.go Outdated Show resolved Hide resolved
internal/inventory/device_view.go Show resolved Hide resolved
internal/inventory/device_components.go Outdated Show resolved Hide resolved
@DoctorVin DoctorVin marked this pull request as ready for review April 18, 2024 18:28
Copy link
Member

@joelrebel joelrebel left a comment

Choose a reason for hiding this comment

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

left a few more suggestions, otherwise looks good to me.

.github/workflows/lint-test.yml Show resolved Hide resolved
internal/dbtools/component_types.go Show resolved Hide resolved

vendorAttrRecord := &models.Attribute{
ServerID: null.StringFrom(FixtureInventoryServer.ID),
Namespace: "sh.hollow.alloy.server_vendor_attributes", // alloyVendorNamespace
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See my comment above, but right now this is way more work than just a string substitution: https://equinixjira.atlassian.net/browse/FS-1393

*/

var (
// historically these values were determined/set by alloy, even though they are
Copy link
Member

Choose a reason for hiding this comment

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

If its still going to be the same namespace then lets use the consts, that way its easier to find and replace these.

@DoctorVin DoctorVin merged commit a9b8cd2 into main Apr 25, 2024
1 check passed
@DoctorVin DoctorVin deleted the vc/incoming-device-api branch April 25, 2024 13:47
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.

2 participants