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

Fix magic env var value auto-splitting #1833

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Aug 21, 2024

The companionField in handleEnvValue() is meant to be the other (key/value) field. It doesn't make sense to specify its own value, that just looked like a copy&paste error from the *-key input handler.

With that you can type "FOO=bar" and get the automatic split. The test "cheated" with set_val() which sets all letters atomically. Test "RHUBARB=STRAWBERRY" separately with proper keyboard input.

Splitting muliple variables can only work with an atomic value setting, i.e. the user doing copy&paste. Keep the set_val() bit and explain it, and also validate that the fields get created and split as expected.


Spotted as part of #1832. It may help with the testRunImageUser failure, but it's confusing/obvious enough to be a good bug fix even if it doesn't fix that particular race.

I triggered an extra /firefox run.

test/check-application Outdated Show resolved Hide resolved
The `companionField` in handleEnvValue() is meant to be the *other*
(key/value) field. It doesn't make sense to specify its own value, that
just looked like a copy&paste error from the *-key input handler.

With that you can type "FOO=bar" and get the automatic split. The test
"cheated" with `set_val()` which sets all letters atomically. Test
"RHUBARB=STRAWBERRY" separately with proper keyboard input.

Splitting muliple variables can only work with an atomic value setting,
i.e. the user doing copy&paste. Keep the `set_val()` bit and explain it,
and also validate that the fields get created and split as expected.
@martinpitt martinpitt changed the title Fix magic space handling in env var value field Fix magic env var value auto-splitting Aug 22, 2024
@jelly
Copy link
Member

jelly commented Aug 22, 2024

Re-triggered ubuntu-2204

@martinpitt
Copy link
Member Author

That healthcheck failure is the number #1 failure on the weather report and keeps getting caught in the 3x affected retries. Unrelated to this PR. I already retried it here, but I'll wait for your current retry run.

@jelly
Copy link
Member

jelly commented Aug 22, 2024

That healthcheck failure is the number #1 failure on the weather report and keeps getting caught in the 3x affected retries. Unrelated to this PR. I already retried it here, but I'll wait for your current retry run.

And it went green 🍀

@jelly jelly merged commit cb4cfaf into cockpit-project:main Aug 22, 2024
32 checks passed
@martinpitt martinpitt deleted the fix-env-split branch August 22, 2024 08:51
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