Add regex support to Search.dataSets#2443
Conversation
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
578629d to
eb16bee
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2443 +/- ##
=======================================
Coverage 91.53% 91.53%
=======================================
Files 641 641
Lines 18444 18454 +10
Branches 3901 3906 +5
=======================================
+ Hits 16882 16892 +10
Misses 1560 1560
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
|
I couldn't figure out how to run the system tests for the |
|
The build CI is failing because the snapshot has changed, how do I commit that? |
Hey @JWaters02 👋 You could run Then just push the corresponding snapshots which should be properly updated 😋 |
zFernand0
left a comment
There was a problem hiding this comment.
LGTM! 😋
Thanks for implementing this feature. 🙏
Happy to approve once the build errors are resolved (snapshots updated) 🥳
There was a problem hiding this comment.
Thanks @JWaters02 for your contribution! Left a few comments
I agree the 2nd option you picked is the better one, at least for now in V3 to avoid breaking changes
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
|
Tests failed for the same snapshot reason, but I comitted the updated snapshot already, so not sure what the issue is now. |
A recent change was made on the I believe that another snapshot update is required, with the newest version of the CLI built and installed. Additionally, if feasible, it would be nice to have a system tests to confirm the functionality is working. |
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
Hi Andrew, I tried to set up the default_properties.yaml with as much detail as I could provide for the zxplore system, but I think I am simply missing a lot of permissions on that system to be able to run the tests, as most of them are failing due to errors on the zosmf server. I also wouldn't want to burden the zxplore server so probably best for me to leave it. I can't test on my work system, because I am only able to do development on my home PC, which does not have the VPN that can access the work mainframe. I agree that system tests would be good, but I am just not able to do it, so best if someone else did. |
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
Signed-off-by: JWaters02 <watersjoshua2002@gmail.com>
zFernand0
left a comment
There was a problem hiding this comment.
LGTM! 😋
Not sure how to feel about the system test 😅
But, I believe we can get this one for now and circle back later. 🙏
traeok
left a comment
There was a problem hiding this comment.
Tested and changes LGTM, thanks @JWaters02!
It'd seem that the requested changes were addressed 🙏
|
|
Release succeeded for the The following packages have been published:
Powered by Octorelease 🚀 |



What It Does
Closes #2432
Implements the regex option on the data sets search:
?researchIn #2432 I pondered about implementation of this option without causing a breaking change:
No one let me know what their thoughts on that were, but I think it is pretty straight forward that option 2 is the right way to go for v3. So what I implemented was a new, optional
--regexoption (please let me know if the name should be changed) that when specified sets the searchString into a regex one. If reasonable, I could open an issue with the code changes required to switch to option 1 that would go in as v4 breaking change.Obviously, one thing that needs to be taken into account, is that cases is not sensitive by default, which if combined with a regex string, may produce unintended effects - but that is up to the user (and the docs to point it out). For example, this regular expression specifies only upper case characters, but since the
--case-sensitiveoption is not passed, it will match on the lower case characters anyway:I had to refactor the logic in
Search.dataSetsandSearch.searchLocalfunctions to take into account that the matched string length, for the text highlighting in output, would not be the same as the search string length for a regex search string.Here are some random examples of using it:
How to Test
Run
zowe files search data-sets <pattern> <search string> --regexand mess around with it!Review Checklist
I certify that I have:
Additional Comments
This will require a PR on the docs-site so go in alongside it.