-
Notifications
You must be signed in to change notification settings - Fork 41
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
Convert integration tests to use configs.v2 #990
Comments
Hi @sgnn7, is this still open for a first time contributor? I enjoyed a CyberArk article on this piece of software and thought I'd contribute. |
@vladdoster Absolutely and we would love to have more contributors to the codebase! Just make sure to read through the contribution doc first. There's a contributor agreement that you can just send us which is somewhat of a pain but you only need to do this once. |
Hi @sgnn7, You'll have to bear with me as I am new to Go. I just have a few questions before I proceed further. So I was able to track down where the MySql and PG created there configs. It seemed to be in generate_secretless_yml.go. In my branch I have added code which seems to take the generated v1 config and converts it to the v2 structure. I have commented it out because it seemed to root of ./bin/test erroring. However, when I run the ./bin/test with my v2 conversion solution, it seems to write the correct structure. See attached screenshot. However it seems to error in MySQL test. Do I need to update the unit tests to take the updated config or is the way I tried converting the v1 config way off? Would love to work through this and fix the issue 😄. btw - The shell scripts you all have written are top notch 👍 |
Hey @vladdoster!
Don't worry about asking questions and you're on the right track! The optimal choice here is to not use v1 configuration at all in the configuration generation if possible since v1 will be removed in one of the future releases so depending on it will make us need to rework this code one more time later. To do the conversion, we might require some changes to the generation code so instead of it creating v1 structs we will now be creating v2 structs from the start.
I think that unit tests should not be failing if you change this but integration tests for mysql and pg might since those are the ones that depend on this functionality.
We will help you out whichever way we can!
<3 |
I agree my solution was terse because I wasn't sure how much backwards compatibility was an issue. I did see in one of the scripts stdout that v1 would be deprecated so I guess I should have taken the hint 😆. Okay, no worries. I will work on implementing v2 config and get rid of v1 cruft. Thanks for the feedback. |
@vladdoster can you also make sure to sign your commits by running |
I can do that. Sorry about glancing over that in my I initial commit. |
I don't think there's anything publicly published about it yet, so you couldn't have known 🙂 I'm hoping to get it updated before you submit your contribution so that it'll be easier for you. If you need any help with it or have any questions, please let us know! |
Currently our integration tests for PG and MySQL create generated configuration files for secretless that are designed for
config.v1
which has in at least one case caused unexpected problems in the product. These config generators need to be converted toconfig.v2
.AC:
config.v2
configsconfig.v2
configsThe text was updated successfully, but these errors were encountered: