-
Notifications
You must be signed in to change notification settings - Fork 196
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
Add a search
CLI verb and DBus API
#4478
Add a search
CLI verb and DBus API
#4478
Conversation
Example output:
|
This looks pretty great to me at first glance. We use clang format to format the C code. Part of the failures here are that. Also we tend to squash commits too. |
5a93871
to
9405e9c
Compare
e6ed8a3
to
4852d27
Compare
It looks like you provided information for the pull request text, but not in the actual commit message which has an empty body text. On this project we're somewhat strict about commit messages. I often reference https://cbea.ms/git-commit/ but there are plenty of other guides. How about something like this to start?
For the subject, notice I changed it to use the imperative form. I also think we should have the direct As far as the rest of the body, what you had there was OK, I just felt it was a bit more direct and informative to say basically "we're doing what dnf does". |
To elaborate a bit on why we do this - it's because it's highly likely that a person who didn't write the code will need to debug it potentially years later. And context that might have seemed obvious at the time is likely not anymore. It's helpful to know what the person was thinking - the why of the commit, not just the what. Here's a random example of a commit from this project over 9 years ago: f8ddf38 Notice I added a bit of context there: "it's not going to be practical |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work here overall!
On a related note, I noticed that there aren't many comments within the code itself. Do you think adding comments would be helpful as well, or are we aiming for the code to be able to speak for itself? |
For sure we could use some more comments! I've probably historically been too "code speaks for itself" but I think we could have a bit more discipline around things like ensuring internal helper functions have a minimal doc comment at least or so. |
If I make changes in response to a PR review should I wait until the changes get approved before squashing? I'm thinking that it would make it easier for the reviewer to compare the differences between the two commits. |
As of lately, github has a less-than obvious way to see the "interdiff" i.e. the changes between the changes. Look in the PR for "force-pushed". So our SOP is to squash - unless the changes/fixes are big enough to really stand on their own. |
37bb4bc
to
c593800
Compare
This closes a longstanding feature request and improves compatibility with the `dnf`/`yum` CLI. The feature set and output text intentionally matches that tool, e.g. globs like `rpm-ostree search kernel*` or multi term searches like `rpm-ostree search kernel python` are supported. Search results per section are limited to 50 due to DBus message size limits. Closes: coreos#1877
c593800
to
045767a
Compare
There seems to be an error in the Container Integration test relating to a 404 error when trying to download the ignition package:
Any thoughts on how to go about resolving this? |
Maintaining build systems but particularly CI is like gardening; it requires regular maintenance, and sometimes weed will just spring up fast when you weren't ready. I took a crack at fixing this one over here #4483 |
search
CLI verb and DBus API
} | ||
|
||
return TRUE; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: missing an empty line here at the end of the file
Thanks! |
Fixes #1877
Implemented Features:
search
command for rpm-ostree to search for packages within the set of repos (rpm-ostree search kernel
)rpm-ostree search kernel python
)rpm-ostree search *kernel
)Edge cases covered:
No matches found.
when no packages match the search query