mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 21:23:10 +00:00
* Fix #6725 Ability to create multiple separate ingestions for one database service * modify cypress test
This commit is contained in:
parent
2898d59d32
commit
e6c5d2ccaa
@ -140,7 +140,7 @@ export const testServiceCreationAndIngestion = (
|
|||||||
cy.get('[data-testid="success-line"]', { timeout: 15000 }).should(
|
cy.get('[data-testid="success-line"]', { timeout: 15000 }).should(
|
||||||
'be.visible'
|
'be.visible'
|
||||||
);
|
);
|
||||||
cy.contains(`"${serviceName}_metadata"`).should('be.visible');
|
cy.contains(`${serviceName}_metadata`).should('be.visible');
|
||||||
cy.contains('has been created and deployed successfully').should(
|
cy.contains('has been created and deployed successfully').should(
|
||||||
'be.visible'
|
'be.visible'
|
||||||
);
|
);
|
||||||
|
@ -421,6 +421,24 @@ const ConfigureIngestion = ({
|
|||||||
const getMetadataFields = () => {
|
const getMetadataFields = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<Field>
|
||||||
|
<label className="tw-block tw-form-label tw-mb-1" htmlFor="name">
|
||||||
|
Name
|
||||||
|
</label>
|
||||||
|
<p className="tw-text-grey-muted tw-mt-1 tw-mb-2 tw-text-sm">
|
||||||
|
Name that identifies this pipeline instance uniquely.
|
||||||
|
</p>
|
||||||
|
<input
|
||||||
|
className="tw-form-inputs tw-form-inputs-padding"
|
||||||
|
data-testid="name"
|
||||||
|
id="name"
|
||||||
|
name="name"
|
||||||
|
type="text"
|
||||||
|
value={ingestionName}
|
||||||
|
onChange={(e) => handleIngestionName(e.target.value)}
|
||||||
|
/>
|
||||||
|
{getSeparator('')}
|
||||||
|
</Field>
|
||||||
<div>{getMetadataFilterPatternField()}</div>
|
<div>{getMetadataFilterPatternField()}</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -113,7 +113,8 @@ const Ingestion: React.FC<IngestionProps> = ({
|
|||||||
if (ingestionList.length > 0) {
|
if (ingestionList.length > 0) {
|
||||||
return pipelineType.reduce((prev, curr) => {
|
return pipelineType.reduce((prev, curr) => {
|
||||||
if (
|
if (
|
||||||
curr !== PipelineType.Profiler &&
|
// Prevent adding multiple usage pipeline
|
||||||
|
curr === PipelineType.Usage &&
|
||||||
ingestionList.find((d) => d.pipelineType === curr)
|
ingestionList.find((d) => d.pipelineType === curr)
|
||||||
) {
|
) {
|
||||||
return prev;
|
return prev;
|
||||||
@ -263,12 +264,21 @@ const Ingestion: React.FC<IngestionProps> = ({
|
|||||||
const getAddIngestionElement = () => {
|
const getAddIngestionElement = () => {
|
||||||
const types = getIngestionPipelineTypeOption();
|
const types = getIngestionPipelineTypeOption();
|
||||||
let element: JSX.Element | null = null;
|
let element: JSX.Element | null = null;
|
||||||
|
// Check if service has atleast one metadata pipeline available or not
|
||||||
|
const hasMetadata = ingestionList.find(
|
||||||
|
(ingestion) => ingestion.pipelineType === PipelineType.Metadata
|
||||||
|
);
|
||||||
|
|
||||||
if (types.length) {
|
if (types.length) {
|
||||||
if (types[0] === PipelineType.Metadata || types.length === 1) {
|
// if service has metedata then show all available option
|
||||||
element = getAddIngestionButton(types[0]);
|
if (hasMetadata) {
|
||||||
} else {
|
|
||||||
element = getAddIngestionDropdown(types);
|
element = getAddIngestionDropdown(types);
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* If service does not have any metedata pipeline then
|
||||||
|
* show only option for metadata ingestion
|
||||||
|
*/
|
||||||
|
element = getAddIngestionButton(PipelineType.Metadata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,7 +484,11 @@ export const getIngestionName = (
|
|||||||
serviceName: string,
|
serviceName: string,
|
||||||
type: IngestionPipelineType
|
type: IngestionPipelineType
|
||||||
) => {
|
) => {
|
||||||
if (type === IngestionPipelineType.Profiler) {
|
if (
|
||||||
|
[IngestionPipelineType.Profiler, IngestionPipelineType.Metadata].includes(
|
||||||
|
type
|
||||||
|
)
|
||||||
|
) {
|
||||||
return `${serviceName}_${type}_${cryptoRandomString({
|
return `${serviceName}_${type}_${cryptoRandomString({
|
||||||
length: 8,
|
length: 8,
|
||||||
type: 'alphanumeric',
|
type: 'alphanumeric',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user