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

Use JSON format for PBS command responses #592

Open
al-rigazzi opened this issue May 20, 2024 · 0 comments
Open

Use JSON format for PBS command responses #592

al-rigazzi opened this issue May 20, 2024 · 0 comments
Labels
type: feature Issues that include feature request or feature idea

Comments

@al-rigazzi
Copy link
Collaborator

Description

The commands used to interact with PBS should request responses in JSON format, to enable fast and reliable parsing.

Justification

Currently, most PBS commands used by SmartSim return a table of some kind, with lines representing different jobs. The table is parsed to gather information, which is usually returned to the JobManager. Recent updates to PBS made this approach unreliable because of at least two reasons:

  • entries are truncated: PBS enforces max width for some columns, e.g. the job name. As PBS job names are very long on multi-server systems, a match with the job name fails.
  • table columns are not a reliable standard: SmartSim assumes that some columns correspond to some fields (e.g. a fixed column for the job status), but that is not a "protected" and reliable standard: if one PBS version changes that, we will have to maintain multiple parsing functions, or to lookup column headers.

PBS can output the command result in JSON format. We already adopted it to mitigate some errors, but it would make more sense to switch all commands to make use of it (cleaning it when needed, with the cleanup function we have already implemented).

Implementation Strategy

All PBS commands contained in pbsCommands.py should request a response in JSON format when available, and the response should be deserialized and scanned for the needed information.

@al-rigazzi al-rigazzi added the type: feature Issues that include feature request or feature idea label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Issues that include feature request or feature idea
Projects
None yet
Development

No branches or pull requests

1 participant