-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add new option should_infer_types
to optionally not infer the type of the secret
#72
Conversation
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.
Hi @cepages 👋
Thank you so much for this! You definitely went in the right direction — congrats on your first open source PR in Ruby! 😁
I just made some minor nitpick comments about the interface of this new config with the developers, as well as keeping the codebase consistent, I hope you don't mind!
Also, you should check the failing unit and integration tests, as the changes you made are okay in isolation but the tests will need to be updated 🙏 to run the tests, you can run bundle exec rspec
Thanks once again and well done! 🙌
should_infer_types
to optionally not infer the type of the secret
Co-authored-by: Roger Oba <[email protected]>
|
Rename and added comment Co-authored-by: Roger Oba <[email protected]>
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.
👏 Great work @cepages !! Thank you for this contribution!
(Just pending fixing the unit tests 😊)
@rogerluan I keep changing the test files and they keep failing. For example:
in:
also added Could you point me how to fix that one and maybe I can replicate in the rest of them :/ |
@cepages you have to read the reason why the specs are failing, not only which specs are failing. For example: This test is failing because Then repeat the process: read the error for each failing spec and fix them individually until they all pass 🤗 |
@rogerluan I've fixed the test locally and it seems the Swift test are failing installing dependencies? Btw thanks for the tip to fix the tests, I was looking it wrong :) |
64e5cd8
to
60040c6
Compare
60040c6
to
33b9ffd
Compare
@cepages I confirmed that this bug is present in Meanwhile, congrats on fixing the existing tests! 🎉 Would you mind adding new tests, asserting that the new behavior you're adding is behaving as expected? That means it should be inferring the types when passing Thanks again! 🙌 |
Sure, I was tempted to added yesterday but I didn’t see any other test in
the encode class to infer the types.
Maybe I should add the test other class?
Thanks
…On Sun, 4 Aug 2024 at 12:08, Roger Oba ***@***.***> wrote:
@cepages <https://github.com/cepages> I confirmed that this bug is
present in main (
https://github.com/rogerluan/arkana/actions/runs/10235693630/job/28316834697),
thus it's unrelated to this PR, and it's likely an issue with GitHub
Actions. I'll investigate this later, dw :)
Meanwhile, congrats on fixing the existing tests! 🎉
Would you mind adding new tests, asserting that the new behavior you're
adding is behaving as expected? That means it should be inferring the types
when passing true, and forcing the usage of String (the default type)
when passing false, for both generators we have (Swift, Kotlin) 😊
Thanks again! 🙌
—
Reply to this email directly, view it on GitHub
<#72 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIEENWKOSXF3GIWQFSLP4DZPYDSXAVCNFSM6AAAAABKIPPFZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGUYDENBRGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hmm good point, I analyzed a bit further and probably there's not enough value in adding a unit test for this, but maybe a full integration test would be better, e.g. to make sure the final output produces code that compile and works as expected. What I'd probably do is duplicate the Swift and Kotlin tests in the Rakefile, using an arkana config file that is identical but with |
Done it, I hope I've done it in the way you mean in your previous comment. The swift test seems to persist but kotlin seems to pass ok. It seems a bit of duplication of the files though. Which leads me to another idea. It would be very cool if
Which would ignore the option for Just an idea :) |
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.
Just a couple more minor changes @cepages! 🤗
Your idea about overriding the config from the CLI is great!! I really think we should have that. If you'd like to take a stab at implementing that (probably wiser in a separate PR), I'd be happy to review it! I think it'd indeed be great to allow further customization and remove duplicated fixtures in this project 😅
Thanks again!
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.
I ran the rake test_swift
locally and it runs just fine 💪 I think this PR is good to go! 🚀
Congrats @cepages on your first contribution being merged! 🤩
Nice!! 🥳 Thanks a lot for your help @rogerluan, I couldn't have done it without you 😄 I will open a MR for the other idea. Thanks! |
Glad I could help! Awesome! 🤩 let me know if you need anything 🤗 |
Description
This PR allows to set an option to not use inference to find out the secret type. If
inference_secret_types = false
the type will be always String.Discussion
@rogerluan ( CarlosNano = cepages ) I've created this initial PR, I'm not a ruby developer but this seem to be a plausible way of doing it.
Resources
Resolves #70