Skip to content

feat(onelake_shortcut): onboard new data-source and resource #424

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

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

catalina-gav
Copy link
Contributor

📥 Pull Request

❓ What are you trying to address

close #422
close #421

Onboard new onelake shortcut resource/data-source

Copy link

github-actions bot commented May 6, 2025

Changelog Preview

v1.2.1-dev - June 13, 2025

✨ Added

  • #421 Onboard new fabric_onelake_shortcut data source
  • #422 Onboard new fabric_onelake_shortcut resource
  • #453 new ephemeral resource fabric_eventstream_source_connection
  • #491 new data-source fabric_eventstream_source_connection

💫 Changed

  • #471 Removed preview for fabric_gateway
  • #472 Removed preview for fabric_gateway_role_assignment

Computed: true,
},
},
"onelake": onelakeSchema(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you move validations that only one is populated to here?

Copy link
Contributor Author

@catalina-gav catalina-gav Jun 16, 2025

Choose a reason for hiding this comment

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

@DariuszPorowski I'm trying to move a validation rule from the ConfigValidators section in resource_shortcut.go into the schema definition using objectvalidator.ExactlyOneOf. Specifically, I’ve replaced the original resourcevalidator.ExactlyOneOf(...) with this schema-level code:

Validators: []validator.Object{
    objectvalidator.ExactlyOneOf(
        path.MatchRelative().AtName("onelake"), //tried with matchRoot as it was in ConfigValidators too
        path.MatchRelative().AtName("adls_gen2"),
        path.MatchRelative().AtName("amazon_s3"),
        ...
    ),
},

I’ve seen similar usage with validators like RequireIfAttributeIsOneOf and NullIfAttributeIsOneOf, which work correctly inside the schema. However, after switching to objectvalidator.ExactlyOneOf, I'm seeing unexpected behavior during unit tests: the cases that previously passed using resourcevalidator.ExactlyOneOf now fail with the new schema validation.

I was wondering if we can even move this validation ConfigValidators to schema-level, and if so, any guidance on the correct usage or how to structure this validation inside the schema would be much appreciated. Thanks!

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.

[RS] Add onelake shortcut resource [DS] Add onelake shortcut data source
3 participants