Skip to content

Skip no ga fields from autofield#219

Open
lokirubrik wants to merge 1 commit intorubrikinc:develfrom
lokirubrik:skip-no-ga-fields-from-autofield
Open

Skip no ga fields from autofield#219
lokirubrik wants to merge 1 commit intorubrikinc:develfrom
lokirubrik:skip-no-ga-fields-from-autofield

Conversation

@lokirubrik
Copy link
Collaborator

@lokirubrik lokirubrik commented Feb 3, 2026

Summary

There we 2 code paths in concern here.

  • Autofield._Includes() -> This decides what all fields to be included based of field-profile
  • FragmentFactory.InitializeToDefaultValues() - Initialization of all fields to default values. Used by some cmdlets like Get-RscFileset.

Recently we had following two fields introduced in schema which automatically gets included in Autofield and started being initialised in InitializeToDefaultValues method, this started causing test-case failures and made cmdlets to fail as these fields are not GAed yet, so customers were getting permission issue.

CdmPendingObjectPauseAssignment
RscPendingObjectPauseAssignment

The 2nd part FragmentFactory.InitializeToDefaultValues() was already solved by
PR201

But 1st part still remain to be an issue.
This PR solves the first part, by skipping these field from being part of Autofield._Includes()

Test Plan

Ran following query and confirmed it's no longer including the Non-GAed fields.

$query = New-RscQuery -GqlQuery mssqlDatabaseLiveMounts -AddField Nodes.CreationDate, Nodes.RecoveryPoint, Nodes.SourceDatabase
$query.invoke()
image

JIRA

SPARK-700863

@lokirubrik lokirubrik changed the base branch from main to devel February 3, 2026 11:11
@lokirubrik lokirubrik requested a review from guirava February 3, 2026 11:11
int depth = nodes.Length - 1;
string lastNode = nodes[nodes.Length - 1];

if (Config.FieldsToSkip.Contains(lastNode))
Copy link

Choose a reason for hiding this comment

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

Could you explain this a bit more? We've had to exclude fields from Autofield previously, why is this logical change needed now but was not previously?

Copy link
Collaborator Author

@lokirubrik lokirubrik Feb 6, 2026

Choose a reason for hiding this comment

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

Earlier only did it as part of FragmentFactory.InitializeToDefaultValues() which was getting used by few cmdlets. There were test-failures as part of weekly pwsh automatic-schema-update pipeline, that's how I detected it. It was done as part of #201, as mentioned in the description.

But it was not done in AutoField earlier, so doing it now.

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