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

Make sure we don't use raw strings for Status comparisons in the Storage backend #920

Closed
bpkroth opened this issue Jan 10, 2025 · 0 comments · Fixed by #921
Closed

Make sure we don't use raw strings for Status comparisons in the Storage backend #920

bpkroth opened this issue Jan 10, 2025 · 0 comments · Fixed by #921

Comments

@bpkroth
Copy link
Contributor

bpkroth commented Jan 10, 2025

          that will produce a string `'Status.PENDING'`. Did you mean
                            self._schema.trial.c.status == Status.PENDING.name,

?

(Note to self: use Status.*.name everywhere in storage instead of string literals)

(Note 2: need to check for such things in unit tests)

Originally posted by @motus in #720 (comment)

bpkroth pushed a commit that referenced this issue Jan 10, 2025
…s values for storage (#921)

# Pull Request

## Title

Use constants instead of string literals when serializing `Status`
values in MLOS storage

---

## Description

Replace all string literals for `Status` values in storage with
corresponding `Status.*.name` constants.

- **Issue link**: Closes: #920 

---

## Type of Change

- 🔄 Refactor
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 a pull request may close this issue.

1 participant