feat(ingestion): add feature flag for ingestion onboarding (#15376)

This commit is contained in:
v-tarasevich-blitz-brain 2025-11-25 20:40:38 +03:00 committed by GitHub
parent 6e622896bc
commit eeee0f1dd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 71 additions and 0 deletions

View File

@ -834,6 +834,11 @@ type FeatureFlagsConfig {
""" """
datasetSummaryPageV1: Boolean! datasetSummaryPageV1: Boolean!
"""
Enables displaying the ingestion onboarding redesign
"""
ingestionOnboardingRedesignV1: Boolean!
""" """
If enabled, allows uploading of files for documentation. If enabled, allows uploading of files for documentation.
""" """

View File

@ -0,0 +1,55 @@
import { renderHook } from '@testing-library/react-hooks';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { useIngestionOnboardingRedesignV1 } from '@app/ingestV2/hooks/useIngestionOnboardingRedesignV1';
import { useAppConfig } from '@app/useAppConfig';
vi.mock('@app/useAppConfig', () => ({
useAppConfig: vi.fn(),
}));
describe('useIngestionOnboardingRedesignV1', () => {
beforeEach(() => {
vi.clearAllMocks();
});
it('should return the feature flag value from app config when loaded', () => {
(useAppConfig as any).mockReturnValue({
loaded: true,
config: {
featureFlags: {
ingestionOnboardingRedesignV1: true,
},
},
});
const { result } = renderHook(() => useIngestionOnboardingRedesignV1());
expect(result.current).toBe(true);
});
it('should return false when feature flag is disabled in app config', () => {
(useAppConfig as any).mockReturnValue({
loaded: true,
config: {
featureFlags: {
ingestionOnboardingRedesignV1: false,
},
},
});
const { result } = renderHook(() => useIngestionOnboardingRedesignV1());
expect(result.current).toBe(false);
});
it('should return undefined if feature flag is not present in config', () => {
(useAppConfig as any).mockReturnValue({
loaded: true,
config: {
featureFlags: {},
},
});
const { result } = renderHook(() => useIngestionOnboardingRedesignV1());
expect(result.current).toBe(undefined);
});
});

View File

@ -0,0 +1,6 @@
import { useFeatureFlag } from '@app/sharedV2/hooks/useFeatureFlag';
export function useIngestionOnboardingRedesignV1() {
const ingestionOnboardingRedesignV1 = useFeatureFlag('ingestionOnboardingRedesignV1');
return ingestionOnboardingRedesignV1;
}

View File

@ -85,6 +85,7 @@ export const DEFAULT_APP_CONFIG = {
showManageTags: false, showManageTags: false,
showIntroducePage: false, showIntroducePage: false,
showIngestionPageRedesign: false, showIngestionPageRedesign: false,
ingestionOnboardingRedesignV1: false,
showLineageExpandMore: false, showLineageExpandMore: false,
showDefaultExternalLinks: true, showDefaultExternalLinks: true,
showStatsTabRedesign: false, showStatsTabRedesign: false,

View File

@ -118,6 +118,7 @@ query appConfig {
showHomepageUserRole showHomepageUserRole
assetSummaryPageV1 assetSummaryPageV1
datasetSummaryPageV1 datasetSummaryPageV1
ingestionOnboardingRedesignV1
documentationFileUploadV1 documentationFileUploadV1
contextDocumentsEnabled contextDocumentsEnabled
} }

View File

@ -500,6 +500,7 @@ public class PropertiesCollectorConfigurationTest extends AbstractTestNGSpringCo
"featureFlags.showHomePageRedesign", "featureFlags.showHomePageRedesign",
"featureFlags.showHomepageUserRole", "featureFlags.showHomepageUserRole",
"featureFlags.showIngestionPageRedesign", "featureFlags.showIngestionPageRedesign",
"featureFlags.ingestionOnboardingRedesignV1",
"featureFlags.showIntroducePage", "featureFlags.showIntroducePage",
"featureFlags.showLineageExpandMore", "featureFlags.showLineageExpandMore",
"featureFlags.showManageStructuredProperties", "featureFlags.showManageStructuredProperties",

View File

@ -41,6 +41,7 @@ public class FeatureFlags {
private boolean showManageTags = false; private boolean showManageTags = false;
private boolean showIntroducePage = false; private boolean showIntroducePage = false;
private boolean showIngestionPageRedesign = false; private boolean showIngestionPageRedesign = false;
private boolean ingestionOnboardingRedesignV1 = false;
private boolean showLineageExpandMore = true; private boolean showLineageExpandMore = true;
private boolean showStatsTabRedesign = false; private boolean showStatsTabRedesign = false;
private boolean showHomePageRedesign = false; private boolean showHomePageRedesign = false;

View File

@ -861,6 +861,7 @@ featureFlags:
showManageTags: ${SHOW_MANAGE_TAGS:true} # If turned on, allow users to manage tags in the UI showManageTags: ${SHOW_MANAGE_TAGS:true} # If turned on, allow users to manage tags in the UI
showIntroducePage: ${SHOW_INTRODUCE_PAGE:true} # If turned on, we will show the introduce page in the V2 UI experience to add a title and select platforms showIntroducePage: ${SHOW_INTRODUCE_PAGE:true} # If turned on, we will show the introduce page in the V2 UI experience to add a title and select platforms
showIngestionPageRedesign: ${SHOW_INGESTION_PAGE_REDESIGN:false} # If turned on, show the re-designed Ingestion page showIngestionPageRedesign: ${SHOW_INGESTION_PAGE_REDESIGN:false} # If turned on, show the re-designed Ingestion page
ingestionOnboardingRedesignV1: ${INGESTION_ONBOARDING_REDESIGN_V1:false} # If turned on, show the redesigned ingestion onboarding experience
showLineageExpandMore: ${SHOW_LINEAGE_EXPAND_MORE:true} # If turned on, show the expand more button (>>) in the lineage graph showLineageExpandMore: ${SHOW_LINEAGE_EXPAND_MORE:true} # If turned on, show the expand more button (>>) in the lineage graph
showStatsTabRedesign: ${SHOW_STATS_TAB_REDESIGN:true} # If turned on, show the re-designed Stats tab on the entity page showStatsTabRedesign: ${SHOW_STATS_TAB_REDESIGN:true} # If turned on, show the re-designed Stats tab on the entity page
showHomePageRedesign: ${SHOW_HOME_PAGE_REDESIGN:false} # If turned on, show the re-designed home page showHomePageRedesign: ${SHOW_HOME_PAGE_REDESIGN:false} # If turned on, show the re-designed home page