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

solve issue related to validate ssh with tunnels #38

Merged
merged 6 commits into from
Oct 26, 2023

Conversation

clarkliming
Copy link
Collaborator

close #37

@clarkliming
Copy link
Collaborator Author

hi @samiulhq sorry for the late reply. Hope this PR fix the issue you meet.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 19, 2023

badge

Code Coverage Summary

Filename       Stmts    Miss  Cover    Missing
-----------  -------  ------  -------  ------------
R/run_sas.R        6       0  100.00%
R/sascfg.R         8       8  0.00%    26-33
R/utils.R         66       7  89.39%   138-143, 164
R/zzz.R            2       2  0.00%    15-16
TOTAL             82      17  79.27%

Diff against main

Filename       Stmts    Miss  Cover
-----------  -------  ------  --------
R/run_sas.R       -2       0  +100.00%
R/utils.R         +2      +6  -9.04%
TOTAL              0      +6  -7.32%

Results for commit: 8e0c701

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

R/utils.R Outdated
@@ -34,9 +34,11 @@ install_saspy <- function(method = "auto", conda = "auto") {
#'
#' @keywords internal
validate_ssh_with_tunnel <- function(session, msg = "SAS session through ssh must use tunnels to transfer datasets!") {
cfgname <- session$sascfg$SAScfg$SAS_config_names[1]
cfgname <- session$sascfg$name
is_ssh <- identical(session$sascfg$mode, "ssh")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think identical() will only be TRUE if you match case. So use "SSH" for the literal, as the mode attribute is upper cased in saspy.
Out of curiosity, why require tunneling with the SSH access method? It seems that any connection that's established via SASPy works, so why require this in the first place? I don't have an R install that works with this, so I haven't been able to try it out to see if I can answer that question myself, but it seems that this shouldn't care how saspy is connected; just that it is.
Thanks,
Tom

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you Tom. indeed this is upper case. the reason I add it is that a while ago I experienced issues transfering data for ssh without tunneling, but it seems it is working as expected now.
thank you so much!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh on some devices where the client is not reachable from the server, tunnelling is still needed. but it is true that this assertion is not needed because users are essentially responsible for the connection. Thank you again!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. And yes, I agree, if you let users be responsible for configuring access, however they need to, then this package doesn't need to care and would work with any connection! Let me know if there's anything else I can help with!
Thanks,
Tom

@github-actions
Copy link
Contributor

github-actions bot commented Sep 21, 2023

Unit Tests Summary

  1 files    4 suites   0s ⏱️
15 tests 11 ✔️ 4 💤 0
20 runs  15 ✔️ 5 💤 0

Results for commit cab5323.

♻️ This comment has been updated with latest results.

Copy link

@tomweber-sas tomweber-sas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I'm not expecting I can review these, such that it triggers the merge; says only reviewers w/ write permission, which I assume I'm not. But, adding this review for info anyway. This all looks good to me; I can't test it all out, but looking at the diffs, I don't see anything logically wrong. Looks like you're just allowing any valid connection, which is the right thing.
Don't know if this will trigger anything, but maybe helps with a reviewer who can!
Tom

@clarkliming
Copy link
Collaborator Author

Hey, I'm not expecting I can review these, such that it triggers the merge; says only reviewers w/ write permission, which I assume I'm not. But, adding this review for info anyway. This all looks good to me; I can't test it all out, but looking at the diffs, I don't see anything logically wrong. Looks like you're just allowing any valid connection, which is the right thing. Don't know if this will trigger anything, but maybe helps with a reviewer who can! Tom

thank you Tom for your review!

Copy link
Contributor

@danielinteractive danielinteractive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @clarkliming !

@clarkliming clarkliming merged commit 722991f into main Oct 26, 2023
23 checks passed
@clarkliming clarkliming deleted the 37_stop_validating_tunneling branch October 26, 2023 08:57
@tomweber-sas
Copy link

I hope you weren't waiting on me, I didn't think to review it, just cuz it wouldn't merge. Thanks for fixing/enhancing this!
Tom

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.

df2sd: Validate SSH Not Required for HTTP connections
3 participants