Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update khiops-env to display error #284

Conversation

bruno-at-orange
Copy link
Contributor

@bruno-at-orange bruno-at-orange commented May 31, 2024

The khiops-env script doesn't print anything in the stdout/err anymore. It only populates environment variables if possible. In case of errors (java or mpi) it populates 2 new variables KHIOPS_MPI_ERROR and KHIOPS_JAVA_ERROR

The khiops script usesnotify-sendto diplay errors to users. It implies a new dependency in the khiops package: libnotify on rocky and libnotify-bin on debian. Errors are also logs into /var/log/syslog by using the logger command.

The modification of the scripts khiops, khiops-coclustering and khiops-env only concern Linux (the scope of the bug #161). The possible update of these scripts for windows will be addressed in another fix (related to #258 )

@bruno-at-orange bruno-at-orange force-pushed the 161-khiops-desktop-doesnt-print-log-in-stderr-in-case-of-java-error branch from f230434 to df960c2 Compare July 30, 2024 13:08
@popescu-v
Copy link
Collaborator

This should be backported to the Windows env script as well, right?

Copy link
Collaborator

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some (minor?) issues IMHO (see comments).

@bruno-at-orange bruno-at-orange force-pushed the 161-khiops-desktop-doesnt-print-log-in-stderr-in-case-of-java-error branch 2 times, most recently from ca31bf4 to e35ba4a Compare August 1, 2024 09:42
@bruno-at-orange bruno-at-orange force-pushed the 161-khiops-desktop-doesnt-print-log-in-stderr-in-case-of-java-error branch from fd8a7f2 to cfec496 Compare August 5, 2024 08:41
@bruno-at-orange bruno-at-orange changed the title WIP update khiops-env to display error update khiops-env to display error Aug 5, 2024
@bruno-at-orange
Copy link
Contributor Author

This should be backported to the Windows env script as well, right?

We will probably add the variables KHIOPS_JAVA_ERROR and KHIOPS_MPI_ERROR in khiops-env.bat. But I prefer to do this on a windows laptop.

@popescu-v
Copy link
Collaborator

This should be backported to the Windows env script as well, right?

We will probably add the variables KHIOPS_JAVA_ERROR and KHIOPS_MPI_ERROR in khiops-env.bat. But I prefer to do this on a windows laptop.

Ok. Hence, this will be done in a separate PR?

@bruno-at-orange bruno-at-orange force-pushed the 161-khiops-desktop-doesnt-print-log-in-stderr-in-case-of-java-error branch from a7fe7f7 to e10f34a Compare August 7, 2024 06:52
On Linux, the khiops-env script doesn't print anything in the stdout/err anymore (it is already the case on windows).
It only populates environment variables if possible.
In case of errors (java or mpi) it populates 2 new variables KHIOPS_MPI_ERROR and KHIOPS_JAVA_ERROR

The khiops script use notify-send to diplay errors to users. It implies a new dependency in the khiops package: libnotify on rocky and libnotify-bin on debian.
Errors are also logs into /var/log/syslog by using the 'logger' command.
@bruno-at-orange bruno-at-orange force-pushed the 161-khiops-desktop-doesnt-print-log-in-stderr-in-case-of-java-error branch from e10f34a to 3d25588 Compare August 7, 2024 06:53
Copy link
Collaborator

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (for Linux). The Windows port would be done in another PR.

@bruno-at-orange bruno-at-orange merged commit 70c03c4 into dev Aug 9, 2024
27 checks passed
@bruno-at-orange bruno-at-orange deleted the 161-khiops-desktop-doesnt-print-log-in-stderr-in-case-of-java-error branch August 9, 2024 07:49
bruno-at-orange added a commit that referenced this pull request Aug 9, 2024
* Update khiops-env to display error on Linux

On Linux, the khiops-env script doesn't print anything in the stdout/err anymore (it is already the case on windows).
It only populates environment variables if possible.
In case of errors (java or mpi) it populates 2 new variables KHIOPS_MPI_ERROR and KHIOPS_JAVA_ERROR

The khiops script use notify-send to diplay errors to users. It implies a new dependency in the khiops package: libnotify on rocky and libnotify-bin on debian.
Errors are also logs into /var/log/syslog by using the 'logger' command.
bruno-at-orange added a commit that referenced this pull request Aug 12, 2024
* Update khiops-env to display error on Linux

On Linux, the khiops-env script doesn't print anything in the stdout/err anymore (it is already the case on windows).
It only populates environment variables if possible.
In case of errors (java or mpi) it populates 2 new variables KHIOPS_MPI_ERROR and KHIOPS_JAVA_ERROR

The khiops script use notify-send to diplay errors to users. It implies a new dependency in the khiops package: libnotify on rocky and libnotify-bin on debian.
Errors are also logs into /var/log/syslog by using the 'logger' command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Khiops Desktop doesn't print log in stderr in case of Java error
2 participants