Fix agama config show before a product is selected#2066
Conversation
tell the user, not just the logs, when: ``` abusctl call org.opensuse.Agama.Storage1 /org/opensuse/Agama/Storage1 org.opensuse.Agama.Storage1 GetConfig s "null" ```
|
Not related to the issue/fix, but here's the story of finding the bug cause, just because I am happy that it worked out well 😃 I tried to test the 1899 was a nearby revision where my testing container worked at all. (master|BISECTING) martin@ohmu:~/svn/agama> git bisect good pr/1899
Bisecting: 425 revisions left to test after this (roughly 9 steps)425 revisions, but the computer helped me persist, yay! Here's the output of git bisect start
# status: waiting for both good and bad commits
# bad: [09433a4b3ce4f242a245bb19fe95bc7744ce7c19] Temporarily hide the abort installation option (#2056)
git bisect bad 09433a4b3ce4f242a245bb19fe95bc7744ce7c19
# status: waiting for good commit(s), bad commit known
# good: [9a4a8ecd27e5a5dd17b57f2cee7082d634e65f6c] service: changelog
git bisect good 9a4a8ecd27e5a5dd17b57f2cee7082d634e65f6c
# bad: [6bc6a712c2803a0c7077cf5dcf9a07c126ed8daa] fix(web): another relocation of storage useConfigModel
git bisect bad 6bc6a712c2803a0c7077cf5dcf9a07c126ed8daa
# bad: [fb4e04ce05cc65d7f4a26341951a9e74a8e0e6ef] feat(web): Migration to PatternFly v6, round 2 (#1921)
git bisect bad fb4e04ce05cc65d7f4a26341951a9e74a8e0e6ef
# bad: [fb4e04ce05cc65d7f4a26341951a9e74a8e0e6ef] feat(web): Migration to PatternFly v6, round 2 (#1921)
git bisect bad fb4e04ce05cc65d7f4a26341951a9e74a8e0e6ef
# skip: [cbf0d39a49b9e1912e73eea723e38cad73511c58] feat(web): allow changing boot options
git bisect skip cbf0d39a49b9e1912e73eea723e38cad73511c58
# skip: [a108175c823855a5883cf5c4f076a124de9e4ab0] feat(storage): use proper space policy
git bisect skip a108175c823855a5883cf5c4f076a124de9e4ab0
# skip: [fe814eeb1f32ee5e6bfd52fb59e86ae2b5654858] feat(web): update config-model types
git bisect skip fe814eeb1f32ee5e6bfd52fb59e86ae2b5654858
# good: [89db30e35319226aaf8b7b70d13b5b6af78216e9] web: Improvements from code review
git bisect good 89db30e35319226aaf8b7b70d13b5b6af78216e9
# good: [89db30e35319226aaf8b7b70d13b5b6af78216e9] web: Improvements from code review
git bisect good 89db30e35319226aaf8b7b70d13b5b6af78216e9
# bad: [65439820e6c41f543d715d4fcb4e6c3d02fbb4a2] Merge branch 'master' into storage-config-ui-merge-master
git bisect bad 65439820e6c41f543d715d4fcb4e6c3d02fbb4a2
# bad: [65439820e6c41f543d715d4fcb4e6c3d02fbb4a2] Merge branch 'master' into storage-config-ui-merge-master
git bisect bad 65439820e6c41f543d715d4fcb4e6c3d02fbb4a2
# bad: [4c0e887bfc12a93423856167a4222987e76860c7] Fix some unit tests
git bisect bad 4c0e887bfc12a93423856167a4222987e76860c7
# bad: [7d2d581c3a25d9d7a67e6aa1859130f3647cfbe9] chore: merge master (#1786)
git bisect bad 7d2d581c3a25d9d7a67e6aa1859130f3647cfbe9
# good: [e39588defabb7381780ad75a6873f44ccfe9dcc6] feat(web): add hook to get config model
git bisect good e39588defabb7381780ad75a6873f44ccfe9dcc6
# bad: [90afa5ffea355c80e14f402430a013c7859bb5eb] chore(web): drop storage config model
git bisect bad 90afa5ffea355c80e14f402430a013c7859bb5eb
# bad: [061aa44a07a2cae31da5c4196e22481dbddacdf5] chore(storage): drop solved_config HTTP endpoint
git bisect bad 061aa44a07a2cae31da5c4196e22481dbddacdf5
# bad: [b9e82942222945f5c2e9f36b189529c83f5986eb] chore(storage): drop GetSolvedConfig D-Bus method
git bisect bad b9e82942222945f5c2e9f36b189529c83f5986eb
# first bad commit: [b9e82942222945f5c2e9f36b189529c83f5986eb] chore(storage): drop GetSolvedConfig D-Bus method |
mvidner
left a comment
There was a problem hiding this comment.
Funny how I cannot Request changes on my own PR :)
| legacyAutoyastStorage: JSON.parse(strategy.settings.to_json, symbolize_names: true) | ||
| } | ||
| else | ||
| {} |
There was a problem hiding this comment.
On a call we have clarified that the null from D-Bus is desired, the Rust client should be fixed to handle it instead
3c9438c to
027465f
Compare
| let store = storage_store(url); | ||
| let settings = store.load().await?; | ||
| let opt_settings = store.load().await?; | ||
| assert!(opt_settings.is_some()); |
There was a problem hiding this comment.
If this condition is not met, the assert! call will crash the program. Is that what we want? However, it is just the CLI, so I guess we can live with that.
There was a problem hiding this comment.
ENOCOFFEE? This is the test module not the CLI :)
There was a problem hiding this comment.
And if crashing is expected anyway, I would say that using expect is more Rust-like.
let settings = op_settings.expect("...")There was a problem hiding this comment.
Well, let's grab another coffee :-)
| let store = storage_store(url); | ||
| let settings = store.load().await?; | ||
| let opt_settings = store.load().await?; | ||
| assert!(opt_settings.is_some()); |
There was a problem hiding this comment.
Well, let's grab another coffee :-)
Prepare for releasing Agama 12: * #1858 * #1887 * #1890 * #1892 * #1893 * #1894 * #1896 * #1898 * #1899 * #1900 * #1901 * #1906 * #1908 * #1909 * #1910 * #1911 * #1912 * #1914 * #1915 * #1917 * #1919 * #1920 * #1921 * #1922 * #1923 * #1924 * #1926 * #1927 * #1928 * #1929 * #1930 * #1931 * #1932 * #1933 * #1934 * #1935 * #1936 * #1937 * #1938 * #1939 * #1942 * #1943 * #1945 * #1948 * #1949 * #1952 * #1953 * #1954 * #1955 * #1957 * #1958 * #1959 * #1961 * #1963 * #1964 * #1967 * #1969 * #1970 * #1971 * #1972 * #1973 * #1974 * #1975 * #1976 * #1977 * #1979 * #1980 * #1981 * #1982 * #1984 * #1986 * #1987 * #1988 * #1990 * #1991 * #1992 * #1993 * #1995 * #1996 * #1997 * #1999 * #2000 * #2001 * #2002 * #2003 * #2004 * #2005 * #2006 * #2007 * #2008 * #2009 * #2010 * #2011 * #2012 * #2013 * #2014 * #2015 * #2016 * #2017 * #2019 * #2021 * #2022 * #2025 * #2027 * #2029 * #2030 * #2031 * #2033 * #2034 * #2035 * #2036 * #2037 * #2038 * #2039 * #2040 * #2045 * #2046 * #2050 * #2053 * #2054 * #2055 * #2056 * #2058 * #2060 * #2061 * #2062 * #2063 * #2064 * #2066 * #2067 * #2068 * #2069 * #2070 * #2071 * #2072 * #2073 * #2075 * #2076 * #2080 * #2082 * #2083
Problem
agama config showcrashes when a product is not selected #2057Solution
Return an empty JSON object (Ruby Hash) instead of null/nilAdapt the Rust client to deal with the
nulland omit the section.Testing
./testing-using-container.shand in its shell,agama config showDebugging
git bisectsaved meScreenshots
No