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

Fixed windows log path issue #26

Merged
merged 4 commits into from
Dec 21, 2023
Merged

Fixed windows log path issue #26

merged 4 commits into from
Dec 21, 2023

Conversation

lu-ohai
Copy link
Member

@lu-ohai lu-ohai commented Dec 19, 2023

Fixed windows log path issue

  • log_artifact
Screenshot 2023-12-19 at 2 39 21 PM
  • log_artifacts
Screenshot 2023-12-19 at 2 39 35 PM

@lu-ohai lu-ohai requested a review from mayoor December 19, 2023 19:42
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 19, 2023
Copy link

📌 Overall coverage:

No success to gather report. 😿

1 similar comment
Copy link

📌 Overall coverage:

No success to gather report. 😿

Copy link

📌 Overall coverage:

Coverage-90.32%

Copy link

📌 Overall coverage:

No success to gather report. 😿

1 similar comment
Copy link

📌 Overall coverage:

No success to gather report. 😿

Copy link

📌 Overall coverage:

Coverage-90.23%

Copy link

📌 Overall coverage:

No success to gather report. 😿

1 similar comment
Copy link

📌 Overall coverage:

No success to gather report. 😿

Copy link

📌 Overall coverage:

Coverage-90.23%

@mayoor
Copy link
Member

mayoor commented Dec 21, 2023

Hey @lu-ohai , can you also add a test case for

local path = "c:\\Users\\testuser\\my datat\\test.txt" ?

@lu-ohai
Copy link
Member Author

lu-ohai commented Dec 21, 2023

Hey @lu-ohai , can you also add a test case for

local path = "c:\\Users\\testuser\\my datat\\test.txt" ?

@mayoor Seems like os.path.basename works differently on Windows and Linux. Windows uses backslash and slash as os.sep while Linux only uses slash.

So os.path.basename("c:\\Users\\testuser\\my datat\\test.txt") will give you test.txt on Windows while give you "c:\\Users\\testuser\\my datat\\test.txt" on linux. For paths with slash, like os.path.basename("my/local/path/my_file.txt"), Windows will also recognize it and give you the correct result my_file.txt.

The test will not pass since we're using ubuntu-latest for test running. Should we also have Windows instance for testing?

Screenshot 2023-12-20 at 10 27 16 PM Screenshot 2023-12-20 at 10 25 57 PM

@mayoor
Copy link
Member

mayoor commented Dec 21, 2023

Right, the base name will do the right thing depending on the platform. On a second thought, it might not yield anything by having this test case. The place that matters is how we concatenate, which is covered by the test cases that are already in there. Thanks for taking time checking.

Right thing to do will be to run the test cases on the windows machine as well. We will check that for later.

Copy link
Member

@mayoor mayoor left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@lu-ohai lu-ohai merged commit e37c952 into main Dec 21, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants