nehil_jain
07/05/2020, 7:05 PMmeltano invoke airflow scheduler -D
[2020-07-05 15:00:36,336|I|MainThread|alembic.runtime.migration] Context impl SQLiteImpl.
[2020-07-05 15:00:36,337|I|MainThread|alembic.runtime.migration] Will assume non-transactional DDL.
System database up-to-date.
[2020-07-05 15:00:36,955|E|MainThread|root] Meltano could not parse the `discovery.yml` returned by the server.
[2020-07-05 15:00:37,669|E|MainThread|root] Meltano could not parse the `discovery.yml` returned by the server.
[2020-07-05 15:00:43,361|W|MainThread|root] before_configure hook 'before_configure' has failed: airflow initdb failed
[2020-07-05 15:00:43,362|E|MainThread|root] airflow initdb failed
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/meltano/cli/invoke.py", line 32, in invoke
service = invoker_factory(project, plugin, prepare_with_session=session)
File "/usr/local/lib/python3.7/site-packages/meltano/core/plugin_invoker.py", line 27, in invoker_factory
invoker.prepare(prepare_with_session)
File "/usr/local/lib/python3.7/site-packages/meltano/core/plugin_invoker.py", line 96, in prepare
with self.plugin.trigger_hooks("configure", self, session):
File "/usr/local/Cellar/python/3.7.8/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.7/site-packages/meltano/core/behavior/hookable.py", line 68, in trigger_hooks
self.__class__.trigger(self, f"before_{hook_name}", *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/meltano/core/behavior/hookable.py", line 93, in trigger
raise err
File "/usr/local/lib/python3.7/site-packages/meltano/core/behavior/hookable.py", line 87, in trigger
hook_func(target, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/meltano/core/plugin/airflow.py", line 122, in before_configure
raise SubprocessError("airflow initdb failed", handle)
meltano.core.error.SubprocessError: airflow initdb failed
An error occured: airflow initdb failed.
Aborted!
Is there a way I can get detailed logs? Dont know how to fix airflow initdb cmd thorugh meltanodouwe_maan
07/05/2020, 8:31 PMmeltano --log-level=debug ...? That flag isnโt currently documented (which Iโll fix), but that may show more infodouwe_maan
07/05/2020, 9:36 PMdouwe_maan
07/05/2020, 9:37 PMdouwe_maan
07/06/2020, 3:45 PMnehil_jain
07/06/2020, 3:49 PMdouwe_maan
07/06/2020, 3:51 PMdouwe_maan
07/06/2020, 3:56 PMdiscovery.yml returned by the server." in the output suggests otherwise ๐nehil_jain
07/06/2020, 8:11 PMdouwe_maan
07/06/2020, 8:11 PMnehil_jain
07/06/2020, 8:15 PMnehil_jain
07/06/2020, 8:15 PMnehil_jain
07/06/2020, 8:16 PM[2020-07-06 16:15:37,974] {models.py:273} INFO - Filling up the DagBag from /Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/orchestrate/dags
[2020-07-06 16:15:39 -0400] [70803] [INFO] Handling signal: ttou
[2020-07-06 16:15:39 -0400] [70810] [INFO] Worker exiting (pid: 70810)douwe_maan
07/06/2020, 8:16 PMmeltano.py in orchestrate/dags ?nehil_jain
07/06/2020, 8:16 PMdouwe_maan
07/06/2020, 8:17 PMmeltano add orchestrator airflow , but if you were on an old version of Meltano that may not have happened. Try running meltano add files airflow to install the file bundle ๐nehil_jain
07/06/2020, 8:17 PMnehil_jain
07/06/2020, 8:17 PMnehil_jain
07/06/2020, 8:18 PMmeltano add orchestrator airflow and now i have itdouwe_maan
07/06/2020, 8:18 PMnehil_jain
07/06/2020, 8:21 PM[2020-07-06 16:21:01,607] {meltano.py:51} INFO - No DAG created for schedule 'gitlab-to-postgres' because it hasn't had a successful (manual) run yet.
[2020-07-06 16:21:01,694] {meltano.py:41} INFO - Considering schedule 'gitlab-to-postgres': {'name': 'gitlab-to-postgres', 'extractor': 'tap-github', 'loader': 'target-postgres', 'transform': 'skip', 'interval': '@hourly', 'start_date': '2020-07-05', 'env': {}, 'cron_interval': '0 * * * *', 'last_successful_run_ended_at': None, 'elt_args': ['tap-github', 'target-postgres', '--transform=skip', '--job_id=gitlab-to-postgres']}nehil_jain
07/06/2020, 8:22 PMdouwe_maan
07/06/2020, 8:22 PMorchestrate/dags/meltano.py however you please, including to remove that "manual run" check ๐douwe_maan
07/06/2020, 8:34 PMnehil_jain
07/06/2020, 8:39 PMdouwe_maan
07/06/2020, 8:44 PMdouwe_maan
07/06/2020, 8:48 PMorchestrate/dags directory, fwiwnehil_jain
07/06/2020, 8:48 PMnehil_jain
07/06/2020, 8:48 PM[2020-07-06 16:47:29,149] {cli.py:520} INFO - Running <TaskInstance: meltano_gitlab-to-postgres.extract_load 2020-07-06T20:27:58.959483+00:00 [queued]> on host ip-192-168-2-75.ec2.internal
Traceback (most recent call last):
File "/Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/.meltano/orchestrators/airflow/venv/bin/airflow", line 32, in <module>
args.func(args)
File "/Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/.meltano/orchestrators/airflow/venv/lib/python3.7/site-packages/airflow/utils/cli.py", line 74, in wrapper
return f(*args, **kwargs)
File "/Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/.meltano/orchestrators/airflow/venv/lib/python3.7/site-packages/airflow/bin/cli.py", line 526, in run
_run(args, dag, ti)
File "/Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/.meltano/orchestrators/airflow/venv/lib/python3.7/site-packages/airflow/bin/cli.py", line 440, in _run
run_job.run()
File "/Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/.meltano/orchestrators/airflow/venv/lib/python3.7/site-packages/airflow/jobs.py", line 202, in run
self._execute()
File "/Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/.meltano/orchestrators/airflow/venv/lib/python3.7/site-packages/airflow/jobs.py", line 2497, in _execute
self.task_runner = get_task_runner(self)
File "/Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/.meltano/orchestrators/airflow/venv/lib/python3.7/site-packages/airflow/task/task_runner/__init__.py", line 43, in get_task_runner
raise AirflowException("Unknown task runner type {}".format(_TASK_RUNNER))
airflow.exceptions.AirflowException: Unknown task runner type StandardTaskRunner
[2020-07-06 16:47:29,947] {sequential_executor.py:52} ERROR - Failed to execute task Command 'airflow run meltano_gitlab-to-postgres extract_load 2020-07-06T20:27:58.959483+00:00 --local -sd /Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/orchestrate/dags/meltano.py' returned non-zero exit status 1..
[2020-07-06 16:47:29,948] {jobs.py:1445} INFO - Executor reports meltano_gitlab-to-postgres.extract_load execution_date=2020-07-06 19:00:00+00:00 as failed for try_number 1
[2020-07-06 16:47:30,046] {jobs.py:1461} ERROR - Executor reports task instance <TaskInstance: meltano_gitlab-to-postgres.extract_load 2020-07-06 19:00:00+00:00 [queued]> finished (failed) although the task says its queued. Was the task killed externally?
[2020-07-06 16:47:30,046] {models.py:273} INFO - Filling up the DagBag from /Users/nehiljain/snaptravel/universal-elt-pipeline/airflow-elt/orchestrate/dags/meltano.py
this is a strange errordouwe_maan
07/06/2020, 8:50 PMdouwe_maan
07/06/2020, 8:51 PMnehil_jain
07/06/2020, 8:52 PMairflow test is a way to trigger the task manually and it looks like that works correctly. I will dig deeper in meltano.py to see what dag config is being setdouwe_maan
07/06/2020, 8:53 PM.meltano/orchestrators/airflow/airflow.cfg says for task_runnernehil_jain
07/06/2020, 8:53 PMdouwe_maan
07/06/2020, 8:54 PMdouwe_maan
07/06/2020, 8:54 PMStandardTaskRunner is defined in the latest Airflow: https://github.com/apache/airflow/blob/master/airflow/task/task_runner/__init__.py#L30douwe_maan
07/06/2020, 8:54 PMdouwe_maan
07/06/2020, 8:54 PMdouwe_maan
07/06/2020, 8:55 PMairflow.cfg file, it should be regenerated automatically (using the correct version of Airflow) based on that Airflow config in discovery.yml, and anything you've overridden in your meltano.yml ๐nehil_jain
07/06/2020, 8:56 PMtask_runner = StandardTaskRunnernehil_jain
07/06/2020, 8:56 PMnehil_jain
07/06/2020, 8:56 PMdouwe_maan
07/06/2020, 8:56 PMdouwe_maan
07/06/2020, 8:56 PMBashTaskRunner , not StandardTaskRunner