-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: third party resource checksum #80
Conversation
Check upload resources sha256 hash.
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.
Left a few comments after going through your code changes.
Let me know if there's any fault in my understanding of your changes :)
Hi @dashmage, I update the PR to address your comments. Can I have your review 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 left some inline comments about some typos.
Needs information: Do you think we should make use of the rest of the information in ToolVersionInfo
? The validate_checksum
function only uses sha256_checksum
and supported_series
data, maybe we should provide logging message about where to find the appropriate resource ?
Apart from the |
@jneo8 I've resolved my conversations, thanks for checking them out. If you could fix those typos brought up in the other reviews, it's a +1 from me. |
That is the implementation I try to avoid. Try to use declarative way, using |
Other information in |
Are those information really necessary in the code if it's not used anywhere? It sound like those are supplementary information that can be put in a doc / discourse post, and then in the code put a link to the doc / discourse post. |
There will be no if-else statements. I agree with using enums for series information, you can disregard me mentioning a dict. However, can we declare the |
I will say yes otherwise you can't easily review the checksum & version information in the PR. Imagine you get a new PR which only include the checksum hash without those information and how many trouble you will get if you are the maintainer. |
We also use the platform package to get the information. I suppose you can't easily add those logic in your example. Another reason I insist to put os platform as a single module also include I expected it will get more and more complex over time. |
Maybe the info would work as comments then? If it's not actively being used by the code, I don't think we should have those vars since it could be misleading. And for the PR example, we can assume that ideally they should include the other supplementary info with the PR so that reviewers can verify. |
Yeah, it will be convenient for the maintainer. But the difference is only whether you can see the version information on the same page v.s. you need to open another tab for the version information. It's not a blocker, I am okay with your current approach though. I am trying to see if we can simplify the data structure that can improve the performance a bit. For example, without version information. We can simply have a map from |
Yes, that is part of my point. If we drop the logic to get system info using
I do agree that it becomes more extendable as a module though. |
I try to force contributor to provide related information in the PR. |
That's the code try to support Ubuntu derivatives, I don't know why we don't support them. |
One more to add: The practice is from here @sudeephb
|
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.
There are good discussion. I try to split the questions one-by-one and provide my feedback in short.
- Is it neccessary to put supplementary information in ToolVersionInfo (version, link, and desc)
- my choice will put it as a comment since it is not used in any logic
- Force the contributor to provide enough information is a good idea too.
- If this application will be installed on a device with only 128MB ram, I will say no. but it isn't. Therefore, I give +1 to current implementation
- Do we need to support Ubuntu derivatives?
-
I don't think we need. Even we support it, the value of "system" will be always "ubuntu". Please check my inline comment.
-
Good to know Charmcraft support it. Therefore, we can build a charm on a ubuntu-like machine.
- Overkill of OSPlatform ?
- maybe yes if we don't use
machine
information. But let's try to use it in this MR.
- Add architecture check - Remove support ubuntu derivatives
Hi @Pjack, the newest commit already address your comments. |
- Remove system field in OSPlatform - Add support_all_series field in ToolVersionInfo
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.
only nitpick in the unit test. thanks!
Check upload resources sha256 hash and architecture support.