Removing Cron from all configs (#773)

* Removing Cron from all configs

* Removing Cron from Documentation
This commit is contained in:
Ayush Shah 2021-10-15 03:51:47 +05:30 committed by GitHub
parent 5b22809be6
commit 72e4b8831f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 6 additions and 353 deletions

View File

@ -82,13 +82,6 @@ Add Optionally`pii` processor and `metadata-rest-tables` sink along with `metada
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -82,13 +82,6 @@ Add optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -92,13 +92,6 @@ Add optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -83,13 +83,6 @@ Add optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -121,13 +121,6 @@ Add Optionally`pii` processor and `metadata-rest-tables` sink along with `metada
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -77,13 +77,6 @@ Add Optionally `file` stage and `elasticsearch` bulk_sink along with `metadata-s
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -69,13 +69,6 @@ Add optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -92,13 +92,6 @@ Add Optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -86,13 +86,6 @@ Add optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -83,13 +83,6 @@ Add optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -83,13 +83,6 @@ Add Optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -76,13 +76,6 @@ add `metadata-rest-tables` sink along with `metadata-server` config
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -100,13 +100,6 @@ Add optionally`query-parser` processor, `table-usage` stage and `metadata-usage`
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -86,13 +86,6 @@ Add optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -100,13 +100,6 @@ Add Optionally `query-parser` processor, `table-usage` stage and`metadata-usage`
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -94,13 +94,6 @@ Add Optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -82,13 +82,6 @@ add `metadata-rest-tables` sink along with `metadata-server` config
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -85,13 +85,6 @@ Add Optionally `query-parser` processor, `table-usage` stage and`metadata-usage
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -84,13 +84,6 @@ Add optionally `pii` processor and `metadata-rest-tables` sink along with `metad
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
```

View File

@ -39,8 +39,7 @@ config = """
def metadata_ingestion_workflow():
config_file = pathlib.Path("/ingestion/pipelines/metadata_to_es.json")
workflow_config = load_config_file(config_file)
if workflow_config.get('cron'):
del workflow_config['cron']
workflow = Workflow.create(workflow_config)
workflow.execute()
workflow.raise_from_status()

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import pathlib
import json
from datetime import timedelta
from airflow import DAG
@ -24,7 +25,7 @@ except ModuleNotFoundError:
from metadata.config.common import load_config_file
from metadata.ingestion.api.workflow import Workflow
from airflow.utils.dates import days_ago
import json
default_args = {
"owner": "user_name",
"email": ["username@org.com"],
@ -52,21 +53,12 @@ config = """
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/12",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
"""
def metadata_ingestion_workflow():
workflow_config = json.loads(config)
if workflow_config.get('cron'):
del workflow_config['cron']
workflow = Workflow.create(workflow_config)
workflow.execute()
workflow.raise_from_status()

View File

@ -68,21 +68,13 @@ config = """
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/6",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}
"""
def metadata_ingestion_workflow():
workflow_config = json.loads(config)
if workflow_config.get('cron'):
del workflow_config['cron']
workflow = Workflow.create(workflow_config)
workflow.execute()
workflow.raise_from_status()

View File

@ -54,20 +54,12 @@ config = """
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": null,
"hour": null,
"day": "*/7",
"month": "*",
"day_of_week": "*"
}
}
"""
def metadata_ingestion_workflow():
workflow_config = json.loads(config)
if workflow_config.get('cron'):
del workflow_config['cron']
workflow = Workflow.create(workflow_config)
workflow.execute()
workflow.raise_from_status()

View File

@ -38,8 +38,7 @@ default_args = {
def metadata_ingestion_workflow():
config_file = pathlib.Path("/tmp/sample_data.json")
workflow_config = load_config_file(config_file)
if workflow_config.get('cron'):
del workflow_config['cron']
workflow = Workflow.create(workflow_config)
workflow.execute()
workflow.raise_from_status()

View File

@ -30,12 +30,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -36,12 +36,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -21,12 +21,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -16,12 +16,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -19,12 +19,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -19,12 +19,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -23,12 +23,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -21,12 +21,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -19,12 +19,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -18,12 +18,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -17,12 +17,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -22,12 +22,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -35,12 +35,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -20,12 +20,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -29,12 +29,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -26,12 +26,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -35,12 +35,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -19,12 +19,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -22,12 +22,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -18,12 +18,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -21,12 +21,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -24,12 +24,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -15,12 +15,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/12",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -31,12 +31,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/6",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -16,12 +16,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": null,
"hour": null,
"day": "*/7",
"month": "*",
"day_of_week": "*"
}
}

View File

@ -66,8 +66,6 @@ def ingest(config: str) -> None:
try:
logger.info(f"Using config: {workflow_config}")
if workflow_config.get("cron"):
del workflow_config["cron"]
workflow = Workflow.create(workflow_config)
except ValidationError as e:
click.echo(e, err=True)
@ -95,8 +93,6 @@ def report(config: str) -> None:
try:
logger.info(f"Using config: {workflow_config}")
if workflow_config.get("cron"):
del workflow_config["cron"]
if workflow_config.get("sink"):
del workflow_config["sink"]
workflow_config["sink"] = file_sink

View File

@ -23,12 +23,5 @@
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
},
"cron": {
"minute": "*/5",
"hour": null,
"day": null,
"month": null,
"day_of_week": null
}
}

View File

@ -47,8 +47,6 @@ class WorkflowTest(TestCase):
def test_execute_200(self):
config_file = pathlib.Path('tests/unit/mysql_test.json')
workflow_config = load_config_file(config_file)
if workflow_config.get('cron'):
del workflow_config['cron']
workflow = Workflow.create(workflow_config)
workflow.execute()
workflow.stop()