I followed the directions to invoke the airflow we...
# troubleshooting
e
I followed the directions to invoke the airflow webserver but seeing loads of this permission error.. any hints as to why ? https://docs.meltano.com/guide/orchestration#using-airflow-directly
Copy code
meltano invoke airflow webserver
Copy code
[2023-01-26 20:45:56,706] {manager.py:570} ERROR - Add Permission to Role Error: (sqlite3.IntegrityError) UNIQUE constraint failed: ab_permission_view_role.permission_view_id, ab_permission_view_r
ole.role_id                                                                                                                                                                                         
[SQL: INSERT INTO ab_permission_view_role (permission_view_id, role_id) VALUES (?, ?)]                                                                                                              
[parameters: (72, 1)]
(Background on this error at: <http://sqlalche.me/e/14/gkpj>)
i quit and started up a second time, not seeing any errors but.. then it's bouncing me to a login page does Meltano setup a default user or do I need to instantiate my own ala https://stackoverflow.com/questions/66160780/first-time-login-to-apache-airflow-asks-for-username-and-password-what-is-the-u
now when trying to look at it again ... and seeing more errors
Copy code
[2023-01-29 21:28:14,664] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2023-01-29 21:28:14,666] {manager.py:587} ERROR - Remove Permission to Role Error: DELETE statement on table 'ab_permission_view_role' expected to delete 1 row(s); Only 0 were matched.
[2023-01-29 21:28:14,671] {manager.py:587} ERROR - Remove Permission to Role Error: DELETE statement on table 'ab_permission_view_role' expected to delete 1 row(s); Only 0 were matched.
[2023-01-29 21:28:14,678] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2023-01-29 21:28:14,678] {init_appbuilder.py:587} ERROR - Instance '<Permission at 0x7f77e1d58670>' has been deleted, or its row is otherwise not present.
Traceback (most recent call last):
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/airflow/www/extensions/init_appbuilder.py", line 585, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.class_permission_name)
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/airflow/www/fab_security/manager.py", line 1404, in add_permissions_view
    self.delete_permission(perm.action.name, resource_name)
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 465, in __get__
    return self.impl.get(state, dict_)
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 911, in get
    value = self.callable_(state, passive)
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 841, in _load_for_state
    primary_key_identity = self._get_ident_for_use_get(
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 897, in _get_ident_for_use_get
    return [
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 898, in <listcomp>
    get_attr(state, dict_, self._equated_columns[pk], passive=passive)
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/mapper.py", line 2897, in _get_state_attr_by_column
    return state.manager[prop.key].impl.get(state, dict_, passive=passive)
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 906, in get
    value = state._load_expired(state, passive)
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/state.py", line 667, in _load_expired
    self.manager.expired_attribute_loader(self, toload, passive)
  File "/home/ubuntu/meltano_proj_repo/.meltano/orchestrators/airflow/venv/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 1433, in load_scalar_attributes
    raise orm_exc.ObjectDeletedError(state)
sqlalchemy.orm.exc.ObjectDeletedError: Instance '<Permission at 0x7f77e1d58670>' has been deleted, or its row is otherwise not present.
[2023-01-29 21:28:14,678] {init_appbuilder.py:587} ERROR - Instance '<Permission at 0x7f77e1d58670>' has been deleted, or its row is otherwise not present.
Feeling like I best not mess with the meltano managed airflow and just.. try to work around it ? for now at least
Still needing the login/password for this meltano managed airflow btw.. if anyone knows
t
For posterity: I ran
Copy code
meltano invoke airflow users  create --role Admin --username admin --email admin --firstname admin --lastname admin --password admin
after which I could login as U: admin P: admin