dipdup-io/dipdup

Cache latest release from GitHub for version check in xdg_shared_dir

Closed this issue · 5 comments

Release information fetched from GitHub in dipdup.cli._check_version should be cached with reasonable TTL. Optionally, make new version warning easier to spot in logs.

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

i am a frontend developer with expirence using python, django and other python library. Kindly assign me this task

How I plan on tackling this issue

To avoid fetching release information from github repeatedly within a short time you i will cache the result using an asynchronous cache with TTL using the aiocache package.

  1. Import aiocache from cached module
  2. Create a fetch_release_info with @cached(ttl=3600) . cache the release info with ttl of 3600 seconds(1hour).

I should deliver within 2 working days max.

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a passionate and results-driven web developer, currently deepening my knowledge in web3 technologies, Cairo, and open-source development through Dojo Coding. My skill set includes expertise in JavaScript, React, HTML, CSS, C# with .NET Entity Framework, and more. I also have experience with tools like Git, GitHub, SQL Server, and Postman. My focus has been on building solid web applications, from task lists to full-fledged CRUD systems, with front-end, back-end, and database integratio

How I plan on tackling this issue

I would implement a caching system for the version obtained from dipdup.cli._check_version, using a dictionary to store the version and its timestamp. I would set a reasonable TTL, such as 1 hour, to validate cache expiration upon access. If the TTL has expired, I would make a new call to dipdup.cli._check_version and update the cache. To enhance the visibility of warnings about new versions in the logs, I would adjust the format and set the log level to WARNING, making them easier to detect.

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, I'm Alvaro Lazarus a blockchain developer with a passion for improvement, I have recently worked on a similar problem which makes me pretty confident that I can contribute to this issue smoothly.

How I plan on tackling this issue

  1. Implement a cache for the version from dipdup.cli._check_version using a dictionary.
  2. Set a 1-hour TTL for cache expiration.
  3. Refresh the cache with a new call if the TTL expires.
  4. Change the log format and set the level to WARNING for better visibility of version alerts.

Best regards,
Lazarus

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Software Engineer with 10 years of experience. For the past 5 years, I’ve specialized in HR Tech solution, now utilized by tens of thousands of companies and hundreds of thousands of users.
Key Skills: Software Development, UI/UX, Systems Design, Python, 1C:Enterprise, SQL, JavaScript, React.js.
I’m passionate about exploring new technologies and currently looking to deepen my expertise in blockchain, smart contracts, and decentralized applications.

How I plan on tackling this issue

I will cache the release information from GitHub in the dipdup.cli._check_version function using a reasonable TTL. This way, the program won't check GitHub too often. Also, I will make the new version warning in the logs more visible, so users can notice it easily

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a python dev. A new-comer here, willing and ready to contribute to solve this issue.