Skip to content

feat: Add attribute in order to fetch user data for groups only when …#880

Merged
adeatcu-ionos merged 5 commits intomasterfrom
change-get-users-behavior-for-group-resource
Oct 21, 2025
Merged

feat: Add attribute in order to fetch user data for groups only when …#880
adeatcu-ionos merged 5 commits intomasterfrom
change-get-users-behavior-for-group-resource

Conversation

@adeatcu-ionos
Copy link
Copy Markdown
Contributor

@adeatcu-ionos adeatcu-ionos commented Oct 20, 2025

…needed

What does this fix or implement?

The PR was created to review the functionality faster, the documentation & tests are not written yet.

Checklist

  • PR name added as appropriate (e.g. feat:/fix:/doc:/test:/refactor:)
  • Tests added or updated
  • Documentation updated
  • Changelog updated and version incremented (label: upcoming release)
  • Github Issue linked if any
  • Jira task updated

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an optional get_users_data attribute to control whether user information is fetched and stored in state for group resources and data sources. This optimization allows users to skip expensive user data fetching operations when that information isn't needed.

Key changes:

  • Added a new boolean attribute get_users_data with a default value of true to maintain backward compatibility
  • Implemented schema versioning and state upgraders to ensure smooth migration for existing resources
  • Modified data fetching logic to conditionally retrieve user information based on the new attribute

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
utils/constant/constants.go Defines the default value constant for the new get_users_data attribute
ionoscloud/resource_group.go Implements the core feature with schema changes, state migration logic, and conditional user data fetching
ionoscloud/data_source_group.go Adds the get_users_data attribute to the group data source with schema versioning

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@adeatcu-ionos adeatcu-ionos force-pushed the change-get-users-behavior-for-group-resource branch from b7d0ade to d3dfebb Compare October 21, 2025 08:30
@sonarqubecloud
Copy link
Copy Markdown

@adeatcu-ionos adeatcu-ionos merged commit ab4eb30 into master Oct 21, 2025
7 checks passed
@adeatcu-ionos adeatcu-ionos deleted the change-get-users-behavior-for-group-resource branch October 21, 2025 11:51
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