-
Notifications
You must be signed in to change notification settings - Fork 3
Fetch GGShield binary from GitHub API #72
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
Conversation
841ab1c to
ed8e779
Compare
64ace7f to
d6f7f5e
Compare
fix(test): mock getGGShieldAbsolutePath in getConfiguration test feat: review: send messages to channel output
d6f7f5e to
5db5a14
Compare
gg-jonathangriffe
left a comment
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.
Thanks for the MR ! This will be a big improvement.
Would it be possible to add a test over the whole getGGShieldAbsolutePath, to test the case where we already have the correct ggshield, no ggshield and an old ggshield ?
|
As I had the conversation with several people, I'm writing down here the rationale about the choice I made here to natively auto-update the extension to the latest GGShield release. There are 3 main options to me:
Let's dive into what would be the process, pros and cons for each option. Option 1: The GGShield version is pinned in the codeProcess: each time a new GGShield version is released, we release a new extension version to upgrade to the new GGShield version.
Cons:
Option 2: The GGShield version can be set from an extension parameterThis is basically option 1, but we authorize to override it with an extension parameter.
Option 3: The extension natively auto-update to latest GGShield versionProcess:
Note: step i. & ii. can be merged. Pros: There is usually nothing to do to maintain the extension up-to-date. Cons:
This is why I chose to go for option 3. Happy to discuss if you think I missed sth! |
I totally agree with you and I actually spent some time trying to implement a test, but I struggled a lot with the From my understanding, mocking isn't really part of the TypeScript world, or it seems to be but in a different way (with the stubs / spies logic). From what I found So in conclusion: I think I'm going to add a test which will do the full integration test: fully install the binary when it doesn't exist etc. Not mocks at all. It will be a bit long but at least that should work. |
d313d4e to
175f722
Compare
0313e66 to
c39dd4d
Compare
c39dd4d to
cbeb0fb
Compare
|
@gg-jonathangriffe see the 3 last commits for review |
4bda9cc to
54a5866
Compare
df49c2b to
d33262c
Compare
Finally took option 1 here after discussion with @agateau-gg |
e65a42a to
65eb793
Compare
65eb793 to
1caf412
Compare
agateau-gg
left a comment
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.
Minor remark, approving anyway.
Context
Today, the GGShield binaries for Linux / Windows MacOS are shipped within the extension.
This is making the extension quite big, and the repo bigger and bigger each time a new version of GGShield is released. (the
.gitis getting bigger as diffs on binaries aren't efficient)What has been done
We now fetch the latest GGShield binary by calling GitHub API
👀 Easier to review commit by commit
getGGShieldAbsolutePathValidation
vsce packagePR check list