kolok commented on issue #56243:
URL: https://github.com/apache/airflow/issues/56243#issuecomment-3443060158

   I am Nicolas, a @AntoineAugusti's colleague, and Iexperience the same issue 
(far enough, we have the same docker configuration)
   
   Thank you for helping us,
   
   With `apache-airflow` 3.1.1rc2 and `apache-airflow-task-sdk` "1.1.1rc2" I 
have the same issue
   
   the all stacktrace :
   ```
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py",
 line 409, in run_asgi
       result = await app(  # type: ignore[func-returns-value]
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/fastapi/applications.py", 
line 1082, in __call__
       await super().__call__(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/applications.py", 
line 113, in __call__
       await self.middleware_stack(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/errors.py",
 line 186, in __call__
       raise exc
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/errors.py",
 line 164, in __call__
       await self.app(scope, receive, _send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 29, in __call__
       await responder(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 130, in __call__
       await super().__call__(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/gzip.py",
 line 46, in __call__
       await self.app(scope, receive, self.send_with_compression)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/cors.py",
 line 85, in __call__
       await self.app(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/middleware/exceptions.py",
 line 63, in __call__
       await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/_exception_handler.py",
 line 53, in wrapped_app
       raise exc
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/_exception_handler.py",
 line 42, in wrapped_app
       await app(scope, receive, sender)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 
716, in __call__
       await self.middleware_stack(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 
736, in app
       await route.handle(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 
290, in handle
       await self.app(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 
78, in app
       await wrap_app_handling_exceptions(app, request)(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/_exception_handler.py",
 line 53, in wrapped_app
       raise exc
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/_exception_handler.py",
 line 42, in wrapped_app
       await app(scope, receive, sender)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/routing.py", line 
76, in app
       await response(scope, receive, send)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/responses.py", 
line 270, in __call__
       with collapse_excgroups():
            ^^^^^^^^^^^^^^^^^^^^
     File "/usr/python/lib/python3.12/contextlib.py", line 158, in __exit__
       self.gen.throw(value)
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/_utils.py", line 
85, in collapse_excgroups
       raise exc
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/responses.py", 
line 274, in wrap
       await func()
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/responses.py", 
line 254, in stream_response
       async for chunk in self.body_iterator:
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/concurrency.py", 
line 61, in iterate_in_threadpool
       yield await anyio.to_thread.run_sync(_next, as_iterator)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/anyio/to_thread.py", line 
56, in run_sync
       return await get_async_backend().run_sync_in_worker_thread(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py",
 line 2485, in run_sync_in_worker_thread
       return await future
              ^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py",
 line 976, in run
       result = context.run(func, *args)
                ^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/starlette/concurrency.py", 
line 50, in _next
       return next(iterator)
              ^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/log/log_reader.py",
 line 134, in read_log_stream
       log_stream, out_metadata = self.read_log_chunks(ti, try_number, metadata)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/log/log_reader.py",
 line 104, in read_log_chunks
       return self.log_handler.read(ti, try_number, metadata=metadata)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/log/file_task_handler.py",
 line 760, in read
       read_result = self._read(task_instance, try_number, metadata)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/log/file_task_handler.py",
 line 614, in _read
       sources, logs = self._read_remote_logs(ti, try_number, metadata)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/log/file_task_handler.py",
 line 936, in _read_remote_logs
       sources, logs = remote_io.read(path, ti)
                       ^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/amazon/aws/log/s3_task_handler.py",
 line 154, in read
       keys = self.hook.list_keys(bucket_name=bucket, prefix=prefix)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/amazon/aws/hooks/s3.py",
 line 126, in wrapper
       return func(*bound_args.args, **bound_args.kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/amazon/aws/hooks/s3.py",
 line 914, in list_keys
       for page in response:
                   ^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/paginate.py", line 
272, in __iter__
       response = self._make_request(current_kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/context.py", line 
123, in wrapper
       return func(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/paginate.py", line 
360, in _make_request
       return self._method(**current_kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/client.py", line 
602, in _api_call
       return self._make_api_call(operation_name, kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/context.py", line 
123, in wrapper
       return func(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/client.py", line 
1060, in _make_api_call
       http, parsed_response = self._make_request(
                               ^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/client.py", line 
1084, in _make_request
       return self._endpoint.make_request(operation_model, request_dict)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/endpoint.py", line 
119, in make_request
       return self._send_request(request_dict, operation_model)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/endpoint.py", line 
196, in _send_request
       request = self.create_request(request_dict, operation_model)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/endpoint.py", line 
132, in create_request
       self._event_emitter.emit(
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/hooks.py", line 
412, in emit
       return self._emitter.emit(aliased_event_name, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/hooks.py", line 
256, in emit
       return self._emit(event_name, kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/hooks.py", line 
239, in _emit
       response = handler(**kwargs)
                  ^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/signers.py", line 
114, in handler
       return self.sign(operation_name, request)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/botocore/signers.py", line 
206, in sign
       auth.add_auth(request)
     File "/home/airflow/.local/lib/python3.12/site-packages/botocore/auth.py", 
line 422, in add_auth
       raise NoCredentialsError()
   botocore.exceptions.NoCredentialsError: Unable to locate credentials
   ```
   
   The logs are well written in the s3 storage by the scheduler in 
LocalExecutor mode but it is mpossible to display it from the webserver
   
   For information, we are migrating from Airflow v2 to Airflow v3, then 
perhaps, we missed a configuration to set ?
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to