-
Notifications
You must be signed in to change notification settings - Fork 136
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 parser for root (only) dataset names #621
Conversation
…d its commit hash strings), AUTHORS and generated man pages Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…world generally and znapzend in particular Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…lumns 10-11, Warning - no newline at eof (no-newline-at-eof)
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…xt (dev name) Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…nd.links.in Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…ants Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…urces Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…st.in Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…a pool [oetiker#585] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…Set [oetiker#585] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…) and splitDataSetSnapshot() [oetiker#585] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…ent is actually a "dataset@snapname", return an undef snapname in the array if not [oetiker#585] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…etiker#585] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…3" over "username@hostname:poolrootfs" among indistinguishable patterns [oetiker#585]
…aSet() implementation test [oetiker#585] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…ker#585 Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…stDataSet() and splitDataSetSnapshot() and ZnapZend::Config splitHostDataSet() implementations
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
5a97af4
to
a179154
Compare
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentaix Autotools bashisms CBuilder Cwd cygwin DBD ev Fcntl fh forkcall gh Gregy gz Ip JB JBERGER LEONT Mkbootstrap nf nh oi Pipely qq qw RCAPUTO README rr rw SUBDIRS SZ Ubuntu ve VOS wu wx xargs xf yy ZLSome files were were automatically ignoredThese sample patterns would exclude them:
You should consider adding them to:
File matching is via Perl regular expressions. To check these files, more of their words need to be in the dictionary than not. You can use To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the null repository
|
how about assuming case user@host:destds unless user actually is a local rootds ? |
Yep, so we declare that |
what I mean is that the code could actually test(!) if a given string actually is a local root dataset |
Ah, must have misread your earlier comment. Yes, I've had such thoughts too - just did not get to implementing them :) Instead, wondered whether we should be concerned about:
On the opposite side, where can such string with |
you are right this might be fragile ... another idea is this: we know the actual src and destination configurations ... they do not include snapshots, so at that time things are still clear ... so I guess we just need to alter the parsing flow |
As noted earlier, for the least intrusive change, I am currently inclined in favor of further arguments (caller knows if the context deals with possible snapshots or strictly "live" dataset names), maybe wrapped as separate method names for the two use-cases and minimal syntax changes for callers. Not sure if such refinement has to be part of this PR, or if you deem this one as an improvement with its own merit already (less-broken state of codebase) and it can be merged as a stepping-block to someone (else) making and diligently testing that change. Coding the change does not feel that hard, but testing and chizeling would likely need more time than I could currently share. |
It may also be worthwhile to use |
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.
please update the CHANGES file
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Cheers, is the update okay? :) |
Includes PRs #619 (see for most context of the initial problem) and #620 (so also addresses spellchecker passing after these changes).
After some tinkering with the splitter logic vs. conjured-up test cases, just one case remained where we can only define our preference (at least, lacking some other method arguments or wholly a new class to convey the information explicitly): how to treat
X@Y:Z
strings - are they a remoteuser@host:rootds
or a localrootds@funny:snapname
?So the self-test defines this one use-case as a "bogus" one with somewhat reasonably "hard-coded" specific expectations:
...and so the self-tests for the parser are enabled as part of standard test runs here.
Also this uncovered deficiencies in
ZnapZend::Config
variant of the parser which got fixed now by the regex proposed in #585 (and improved upon here forZnapZend::ZFS
). It does not have to care about snapshots, so is a lot simpler.