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 credential script to add ability to set maximum reservation time #433

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

val500
Copy link
Contributor

@val500 val500 commented Dec 20, 2024

Description

Updates the client credentials script to allow for adding max_reservation_time. Follows similar logic to the job_priority part of the script.

Resolved issues

Resolves https://warthogs.atlassian.net/browse/CERTTF-459

Documentation

N/A

Web service API changes

N/A

Tests

Tested locally with a local deployment of Testflinger Server/MongoDB

Copy link
Collaborator

@plars plars left a comment

Choose a reason for hiding this comment

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

Looks ok, consistent with the other things at least. Needs the other part of this to land (see comments from George) and also seems to have a minor lint issue to fix

Copy link
Collaborator

@plars plars left a comment

Choose a reason for hiding this comment

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

One minor thing in several places that I just noticed. it's worth cleaning up now while we wait on the other part to land.

while True:
max_reservation_input = input(
"Do you want to specify a queue to set"
+ " max reservation time for? (y/n): "
Copy link
Collaborator

Choose a reason for hiding this comment

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

I just noticed this, because the + blended in with the other "+"s on the left :)
But you don't really need that + to concatenate the strings. Any string within parentheses is going to get automatically concatenated. This is similar to you how can handle things like line length limits by adding ()s and breaking a string across lines. It's a minor thing but let's go ahead and clean it up since we're also waiting for the other thing to land anyway.

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.

2 participants