-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Implement readDirEntries method #254
Conversation
@vasicvuk Please add unittest and e2etest for this. |
@vasicvuk Thanks for your idea. I think readDirs is ambiguous. Do you have a higher function name |
@vasicvuk e2e test in |
Hi @yxxhero, Maybe listDir or readDirsWithinDir? Do you have some name you would like? |
@vasicvuk listDir will better. Can |
@yxxhero As I understood |
@mumoshu WDYT? |
@yxxhero Maybe listDir can list both files and folders instead just folders, i think that would be better |
Can you describe your application scenario in detail |
@yxxhero Sure, We have multiple Cloud native apps built with 30-50 microservices, each application uses some of the common services we call platform and some services specific to their product. All of the microservices have their own charts and since we standardize the helm chart with internal generator tool we have a file named global which values from are applied for every microservice. Other then that we have a folder for each team (owner of multiple microservice), and also an override which we use to optimize the helmfile for certain client were we implement product to.
In override, the user can override only certain services, global values, or everything (it's up to the implementation team). Other than that we allow the option for an override file to begin with We implemented everything from the description above, but currently, we need to have a list of folders in YAML so we know what folders are there (app, platform, third-party) and we want to automate also this by having an option to list folders from code too. |
@vasicvuk ok. Thanks very much. Perfect this PR according to your idea. I feel it is really useful. |
@yxxhero, Thanks, I have changed the function to listDir and added unit tests for both Since I am not really a GO developer, I need a little more time to understand how e2e part works, I am not sure if someone can jump in and help with e2e part? Thanks |
@yxxhero I managed to add e2e tests also :) |
@mumoshu ping |
helmfile/pkg/argparser/args_test.go Line 8 in 4e9b99d
|
@yxxhero Should I change whole file then, as everything is using deepEqual currently? |
@vasicvuk whole file. |
@yxxhero I changed all DeepEqual calls to use require now. |
@vasicvuk Please sqush your commits. Thanks very much. |
Signed-off-by: vasicvuk <vuk.vasic@asseco-see.rs>
fd3b925
to
68d7c5f
Compare
@yxxhero Done |
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.
LGTM
@vasicvuk please fix go test error |
@yxxhero Can you help with identifying what the problem is, since i didn't change snapshot_test.go and it is showing this test as failure:
Seems to me that the local registry is not running and that it was a temporary test failure? Can we maybe retry the pipeline? |
Thanks for your efforts! |
@mumoshu Yes, now they are passing :) |
Implementing feature to read directories from provided directory path based on Idea here:
#253
Within the README.md I have also documented the readDir function which was not documented but available for usage.