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

fix: resolve several issues with watch command #137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

techfg
Copy link

@techfg techfg commented Jun 25, 2024

Jira Issue URL

N/A

High-Level Description

Addresses several issues with the watch command as described in the issues mentioned below in Changelog section.

  1. I was unable to find any mention in this repo and/or Skuid CLI Docs of the minimum required/supported version of Go. The only reference to a version I could find was in the CI workflow which appears to use Go 1.20 so all testing was performed against this version.
  2. I did not see any tests written for the watch command so all testing performed against watch was manual. Testing was performed on Windows 11 & Ubuntu 20.04 (via WSL) but not on Mac as I don't have a Mac. Without any tests, it's difficult to guarantee that no regressions have been introduced but manual testing of all the issues "passed" as did testing of random usage in/around the modified code.
  3. Couldn't find any documentation on how to run the tests that do exist so utilized the test command in the CI workflow and the results were identical from before & after the changes.
  4. This PR addresses one (bug: watch deploys all files in modified file directory that start with same character as modified file #128) of the two issues (bug: watch command deploys unmodified files that match a modified files filename #138 being the other) related to unmodified files being deployed by watch when a file is changed. Please see bug: watch command deploys unmodified files that match a modified files filename #138 for the remaining issue that exists that likely should be considered a critical issue and addressed ASAP.

Changelog:

Resolves #127 - watch encounters Unable to handle file change: stat : no such file or directory exception if -d option is not specified
Resolves #128 - watch deploys all files in modified file directory that start with same character as modified file
Resolves #129 - watch command encounters index out of range [1] with length 1 when -d option contains a .
Resolves #130 - watch command encounters index out of range [2] with length 2 exception when -d directory name contains portion of its parent directory name
Resolves #131 - watch command encounters index out of range [0] with length 0 exception
Resolves #132 - watch command encounters index out of range [1] with length 1 when file outside of -d directory is modified
Addresses the watch portion of #136 - Logging field capturing the target directory is blank when executing retrieve or watch without -d option

Resolves skuid#127
Resolves skuid#128
Resolves skuid#129
Resolves skuid#130
Resolves skuid#131
Resolves skuid#132
Addresses the watch portion of skuid#136
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment