Skip to content
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

Make engine logs clearly communicate when a release was rejected due to forgotten version bump #294

Open
2 tasks done
per1234 opened this issue Jan 28, 2025 · 0 comments
Open
2 tasks done
Labels
criticality: medium Of moderate impact topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Jan 28, 2025

Describe the request

Background

libraries-repository-engine will reject any release that does not have a unique version number. We regularly receive support request/bug reports from library maintainers whose release was rejected due to them having forgotten to update the version property in their library.properties metadata file before making a release.

The situation is inherently challenging to understand due such understanding being dependent on the fairly complex concept that, although the unit of release is the Git tag, the version metadata property is the sole source of versioning information (the name of the tag has no significance).

Request

🙂 Print a clear explanation of the cause in the logs when a release is rejected due to having a non-unique version number.

Describe the current behavior

The logs do not effectively communicate about this situation. For example:

https://downloads.arduino.cc/libraries/logs/github.com/hpssjellis/portenta-pro-community-solutions/

2021/06/12 21:58:38 Scraping https://github.com/hpssjellis/portenta-pro-community-solutions.git
2021/06/12 21:58:38 Checking out tag: 0.1.2
2021/06/12 21:58:38 Release portenta-pro-community-solutions:0.2.0 already loaded, skipping
2021/06/12 21:58:38 Checking out tag: 0.2.0
2021/06/12 21:58:38 Release portenta-pro-community-solutions:0.2.0 already loaded, skipping
2021/06/12 21:58:38 Checking out tag: 0.3.0
2021/06/12 21:58:39 Release portenta-pro-community-solutions:0.2.0 already loaded, skipping

The code that rejects tags with a non-unique version value is the same as the code used to skip releases that were already indexed. So this "already loaded, skipping" message is normal and expected in every logs entry (except for the ones from the very first run after the library's addition, which only exist for the hour following that run). It is only the somewhat cryptic :0.2.0 that provides the clue as to what happened.

🙁 Most library maintainer will not notice this, or not understand the significance.

libraries-repository-engine version

011349f

Additional context

A potential solution I considered was enabling Arduino Lint's rule LP022 when in the "ARDUINO_LINT_LIBRARY_MANAGER_INDEXING" mode used by libraries-repository-engine:

Rule LP022 result: fail
WARNING: The latest Git tag appears to be greater than the library.properties version value: 0.3.0 vs 0.2.0. You must update the version value before making the tag.

This would be trivial to implement and no changes at all would be required in the libraries-repository-engine codebase.

However, this is not a 100% solution because the tag name does not have any significance at all to the engine. For example, LP022 will pass for the 0.2.0 tag of the hpssjellis/portenta-pro-community-solutions repository, when in fact the engine rejected this tag because for some reason the prior 0.1.2 tag had the version value of 0.2.0! The 100% correct results can not be achieved by Arduino Lint and would instead need to be implementedin the libraries-repository-engine code

Related

Issue checklist

  • I searched for previous requests in the issue tracker
  • My request contains all necessary details
@per1234 per1234 added criticality: medium Of moderate impact topic: code Related to content of the project itself type: enhancement Proposed improvement labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
criticality: medium Of moderate impact topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

1 participant