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

Component manager can't use GIT version with leading 'v' (PACMAN-796) #51

Closed
1 task done
higaski opened this issue Feb 6, 2024 · 6 comments
Closed
1 task done
Labels
Type: Bug 🐛 Something isn't working

Comments

@higaski
Copy link

higaski commented Feb 6, 2024

The Component Manager version

v1.4.2

ESP-IDF Version

v5.2-beta1

python Version

3.11.6

Operating System

Linux

Browser (for https://components.espressif.com Issues)

No response

Description

The --version git option does not work for GIT tags containing a leading v or so it seems.

I have a component with the following manifest file.

description: MDU protocol for ZPP and ZSU updates
url: http://zimo.at
documentation: https://github.com/ZIMO-Elektronik/MDU/blob/master/README.md
repository: https://github.com/ZIMO-Elektronik/MDU.git
issues: https://github.com/ZIMO-Elektronik/MDU/issues

dependencies:
  idf: ">=5.0.0"

The latest tag is v0.15.0

Uploading this component with

compote component upload --namespace zimo-elektronik  --name MDU --version git --dry-run

does not work.

Using any tag without leading v does not give me any errors.

compote component upload --namespace zimo-elektronik  --name MDU --version 1.2.3 --dry-run

For some weird reason

To Reproduce

.

Expected behaviour

GIT version should be parsed correctly according to https://semver.org/

Additional info

No response

I have checked existing issues and online Documentation

  • I confirm I have checked existing issues and online Documentation.
@higaski higaski added the Status: Awaiting triage Issue is waiting for triage label Feb 6, 2024
@github-actions github-actions bot changed the title Component manager can't use GIT version with leading 'v' Component manager can't use GIT version with leading 'v' (PACMAN-796) Feb 6, 2024
@kumekay
Copy link
Collaborator

kumekay commented Feb 6, 2024

@higaski Thank you for opening the issue,
I was trying to reproduce it, and while I didn't manage to do so, I found the related problem.
The CLI command only works with annotated tags, but entirely ignores lightweight ones. Is it possible that it is the issue you faced?

At the same time, the https://github.com/espressif/upload-components-ci-action is not affected and should work with any tags.

@kumekay kumekay added Type: Bug 🐛 Something isn't working and removed Status: Awaiting triage Issue is waiting for triage labels Feb 6, 2024
@higaski
Copy link
Author

higaski commented Feb 6, 2024

Thanks, the upload-components action is also what I finally ended up using.

The compote utility however does not work for me. I've a second component I just wanted to upload so you're in luck. ;)

Here is the manifest file:
https://github.com/ZIMO-Elektronik/DCC/blob/individual_rx_tx_timings/idf_component.yml

And here is the error I'm getting

 ╰─λ compote component upload --namespace zimo-elektronik --name DCC --version git --dry-run
Selected profile "default" from the idf_component_manager.yml config file
ERROR: 2 problems were found in the manifest file /home/vinci/Develop/VSCode/DCC/idf_component.yml:
Invalid manifest format
Component version should be valid semantic version

I have not yet tagged this particular release so the old tag is 2 months old. But as far as I can tell this doesn't matter.

Specifying a particular version seems to work:

compote component upload --namespace zimo-elektronik --name DCC --version 1.2.3 --dry-run
Selected profile "default" from the idf_component_manager.yml config file
Saving archive to "/home/vinci/Develop/VSCode/DCC/dist/DCC_1.2.3.tgz"
...

@kumekay
Copy link
Collaborator

kumekay commented Feb 6, 2024

@higaski There is a difference how git traits tags created with git tag v1.2.3 and git tag v1.2.3 -m "My tag". The issue is the current version of the component only supports the latter ones. I'm just guessing, but likely it's the problem you were facing. I already made an internal pull request with the fix, it is likely to be published begging of the next week.

@higaski
Copy link
Author

higaski commented Feb 6, 2024

I don't think that this is the issue. I only create annotated tags.
In fact I've only recently learned about lightweight tags because of some obscure issue with GitHub actions...

@kumekay
Copy link
Collaborator

kumekay commented Feb 28, 2024

Hello @higaski. Could you please verify if you still have this problem with the component manager 1.5.1?

While we only fixed the support for light-weight tags, we also improved logging, so even if the problem is still there, we can get a better idea of what is going on.

@kumekay
Copy link
Collaborator

kumekay commented Apr 22, 2024

@higaski I'm closing this issue now, if you face it once again, please feel free to reopen.

@kumekay kumekay closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants