Skip to content

Attached Tasks do not show stdout/stderr #257

@david-homley

Description

@david-homley

When running a Task that is 'attached' (eg not run in detach mode), no output from stdout/stderr is shown.

This can be shown via the following snippet, which is attempting to run a task that executes a static SQL script in a mcr.microsoft.com/mssql-tools docker image:

$ ./<app> task run executeOptusPreIngestScript
# Standard appcli logs omitted for brevity 
2022-03-08T02:50:42+0000 INFO: Running task [executeOptusPreIngestScript] with args [()] ...
2022-03-08T02:50:52+0000 INFO: Task service finished with code [1]

Running the same task on an older release of the same app gives:

$ ./<app> task run executeOptusPreIngestScript
# Standard appcli logs omitted for brevity 
2022-03-08T02:50:23+0000 INFO: Running task [executeOptusPreIngestScript] with args [()] ...
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
2022-03-08T02:50:32+0000 INFO: Task service finished with code [1]

Hence the expected behaviour is for the Sqlcmd error logs to be included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions