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

CHAINSAW-234 Add environments to schema #2112

Conversation

Tomboyo
Copy link

@Tomboyo Tomboyo commented Dec 4, 2024

Overview

Adds the rhsm.environments field to the system profile schema, per CONTRIBUTING guidelines of inventory-schemas. See RedHatInsights/inventory-schemas#145. Let me know if I'm issing anything!

PR Checklist

  • Keep PR title short, ideally under 72 characters
  • Descriptive comments provided in complex code blocks
  • Include raw query examples in the PR description, if adding/modifying SQL query
  • Tests: validate optimal/expected output
  • Tests: validate exceptions and failure scenarios
  • Tests: edge cases
  • Recovers or fails gracefully during potential resource outages (e.g. DB, Kafka)
  • Uses type hinting, if convenient
  • Documentation, if this PR changes the way other services interact with host inventory
  • Links to related PRs

Secure Coding Practices Documentation Reference

You can find documentation on this checklist here.

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

swagger/system_profile.spec.yaml Outdated Show resolved Hide resolved
swagger/system_profile.spec.yaml Show resolved Hide resolved
swagger/system_profile.spec.yaml Show resolved Hide resolved
Copy link
Collaborator

@kruai kruai left a comment

Choose a reason for hiding this comment

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

Let's discuss the changes on this PR instead. The process is that after the inventory-schemas PR is merged, we open an insights-host-inventory PR with the automated changes from make update_schema.

@Tomboyo Tomboyo force-pushed the CHAINSAW-234-add-environment-schema branch from c1124c5 to fa1d7f3 Compare December 9, 2024 15:40
@Tomboyo
Copy link
Author

Tomboyo commented Dec 16, 2024

Per Candlepin maintainer feedback, I've updated the environment ID schema to be an opaque string, and removed any reference to it being a UUID in favor of just calling it an ID. I've also renamed rhsm.environments to rhsm.environment_ids so it's clear that the field contains identifiers. The same is done in the https://github.com/RedHatInsights/inventory-schemas/pull/145/files PR, so per Kruai we can continue conversation over there if that's preferred. Thanks all.

@Tomboyo Tomboyo force-pushed the CHAINSAW-234-add-environment-schema branch from a4104de to 515db8b Compare January 9, 2025 15:50
@Tomboyo Tomboyo force-pushed the CHAINSAW-234-add-environment-schema branch from 515db8b to 0b93057 Compare January 9, 2025 16:06
@Tomboyo
Copy link
Author

Tomboyo commented Jan 9, 2025

@kruai Locally I reset --hard this branch to the tip of master and ran make update-schema, but the redocly hook failed because "openapi.dev.json does not exist or is invalid." I am not familiar with this repo and the redocly setup in particular, but it looked like the redocly file was just pointing to the wrong relative path (missing ./swagger/ prefix), so I updated it to resolve the issue.

Update: Ah, and of course that change breaks the CI PR build step. :P I'll investigate further in the morning.

@Tomboyo
Copy link
Author

Tomboyo commented Jan 10, 2025

Closing as obsoleted by bc61958, which already has the desired updates in it.

@Tomboyo Tomboyo closed this Jan 10, 2025
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