Skip to content

Conversation

@stevekeay
Copy link
Contributor

This code was recently extended to be able to fetch the session from either a Location HTTP header or from the json response. Unfortunately Dell sends both, which confused it.

@stevekeay stevekeay changed the title Improve BMC login logic fix: Improve BMC login logic Jan 13, 2026
This code was recently extended to be able to fetch the session from
either a Location HTTP header or from the json response.

Unfortunately Dell sends both, which confused it.
@stevekeay stevekeay force-pushed the fix-error-message-location-header branch from 4248957 to 7383e9e Compare January 13, 2026 13:02
token = r.headers["X-Auth-Token"]
if "Location" in r.headers:
location = r.headers["Location"].split(self.ip_address)[1]
data = r.json()
Copy link
Contributor

Choose a reason for hiding this comment

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

What will happen if JSON parsing fails?
Shouldn’t we use a try - catch block here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the BMC response is invalid JSON then an Exception will be raised, causing the workflow to fail. While the resulting error won't be especially user-friendly, I think the behaviour is broadly correct. If we are looking to move the needle on "user friendly" for an argo workflow, this is probably not the low-hanging fruit :)

@stevekeay stevekeay added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit a0c9ba1 Jan 13, 2026
54 checks passed
@stevekeay stevekeay deleted the fix-error-message-location-header branch January 13, 2026 13:16
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.

3 participants