uranusjr commented on issue #18813: URL: https://github.com/apache/airflow/issues/18813#issuecomment-938294022
I added the following test checks but can't reproduce: ```python def test_patch_should_respond_200(self, payload, expected_name, expected_actions): role = create_role(self.app, 'mytestrole') response = self.client.patch( f"/api/v1/roles/{role.name}", json=payload, environ_overrides={'REMOTE_USER': "test"} ) assert response.status_code == 200 assert response.json['name'] == expected_name assert response.json["actions"] == expected_actions with create_session() as session: role_names = {name for name, in session.query(Role.name)} assert expected_name in role_names assert "mytestrole" not in role_names ``` The old role was renamed correctly and tests pass. I'm wondering if it makes a difference you are editing a built-in role? IIRC Airflow has some special treatments for those role names because they need to exist for the web UI and API to operate correctly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org