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

Commit hash always 'unknown' #146

Closed
CodeFinder2 opened this issue Apr 12, 2019 · 14 comments · Fixed by #394
Closed

Commit hash always 'unknown' #146

CodeFinder2 opened this issue Apr 12, 2019 · 14 comments · Fixed by #394
Labels
enhancement New feature or request

Comments

@CodeFinder2
Copy link

CodeFinder2 commented Apr 12, 2019

I am using the latest zigbee2mqtt with this HassIO addon and observed that it always publishes something like

AM MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.3.0","commit":"unknown","coordinator_firmware":20190109,"log_level":"debug","permit_join":false}'

I am referring to the "commit":"unknown" here. Should be just a minor issue. Or do I miss something?

@paskyecijano
Copy link

I have the same error

image

@hawaltie
Copy link

I also have the same 'error'

@danielwelch
Copy link
Owner

Looking at merging this in for version 1.5.0

@ciotlosm
Copy link
Collaborator

ciotlosm commented Oct 20, 2019

It still shows unknown in 1.6.0 stable. It does show the commit in the edge version.

  zigbee2mqtt:info 10/20/2019, 9:44:05 AM Logging to directory: '/share/zigbee2mqtt/log/2019-10-20.09-44-02'
  zigbee2mqtt:info 10/20/2019, 9:44:05 AM Starting zigbee2mqtt version 1.6.0 (commit #unknown)
  zigbee2mqtt:info 10/20/2019, 9:44:12 AM MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
  zigbee2mqtt:info 10/20/2019, 9:44:12 AM MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.6.0","commit":"unknown","coordinator":20190608,"log_level":"info","permit_join":false}'

@danielwelch
Copy link
Owner

@ciotlosm yeah, that's expected. Here's the relevant bit in the edge version Dockerfile

RUN jq -n '{"hash": env.COMMIT}' > ./.hash.json

I didn't include this in stable version because it's using a known release of zigbee2mqtt by definition, which I figured would be the most relevant info. With that said, that release obviously is tied to a commit, and I guess it couldn't hurt to provide the hash as well, even if it is kind of redundant.

@CodeFinder2
Copy link
Author

CodeFinder2 commented Dec 11, 2019

@ciotlosm yeah, that's expected. Here's the relevant bit in the edge version Dockerfile

RUN jq -n '{"hash": env.COMMIT}' > ./.hash.json

I didn't include this in stable version because it's using a known release of zigbee2mqtt by definition, which I figured would be the most relevant info. With that said, that release obviously is tied to a commit, and I guess it couldn't hurt to provide the hash as well, even if it is kind of redundant.

So, will it finally be included? (I think having it printed is useful, although redundant. Alternatively, you should remove the commit hash completely for releases because this now looks a bit 'incomplete'. 🙈 Nonetheless, I would appreciate seeing the version number and commit hash.)

It's still not in v1.7.1 v1.8.0 v1.9.0 v1.10.0:

zigbee2mqtt:info 2020-02-19 13:01:09: Starting zigbee2mqtt version 1.10.0 (commit #unknown)

@ciotlosm
Copy link
Collaborator

@danielwelch should we close this based on #388 ?

@danielwelch
Copy link
Owner

If someone can confirm it works :)

@CodeFinder2
Copy link
Author

Sorry, not working for me:

info  2020-09-18 16:35:19: Logging to console and directory: '/share/zigbee2mqtt/log/2020-09-18.16-35-19' filename: log.txt
debug 2020-09-18 16:35:19: Removing old log directory '/share/zigbee2mqtt/log/2020-08-15.16-26-49'
debug 2020-09-18 16:35:20: Loaded state from file /share/zigbee2mqtt/state.json
info  2020-09-18 16:35:20: Starting Zigbee2MQTT version 1.14.4 (commit #unknown)
info  2020-09-18 16:35:20: Starting zigbee-herdsman...
debug 2020-09-18 16:35:20: Using zigbee-herdsman with settings: 

Addon version: 1.14.4.1

@danielwelch
Copy link
Owner

So you're not on edge? This is only supposed to work on edge as of now.

@CodeFinder2
Copy link
Author

Ah sry, yes didn't use edge 🙈

@ciotlosm
Copy link
Collaborator

ciotlosm commented Sep 19, 2020

Finally got to install a dev instance with a separate CC2531. Seems the commit hash is still not working for edge.

Zigbee2MQTT:info  2020-09-19 07:41:47: Starting Zigbee2MQTT version 1.14.4-dev (commit #unknown)

Later edit:
After thinking about it and creating an issue on z2m as well, I came to the conclusion that we should have a .hash.json also for stable, populated with the actual version, this way the message would no longer look like a problem for users.

From (commit #unknown) to (commit #1.14.4) that would also be reflected in bridge mqtt message.

@ciotlosm
Copy link
Collaborator

@danielwelch apparently there is an error when running the pipeline.

@ciotlosm
Copy link
Collaborator

Fixed in 1.14.4.2

ciotlosm added a commit that referenced this issue Sep 22, 2020
- Fixes #146, #229, #364 and #392
- Updates changelog
- Add changelog for `edge`
- Moves part of documentation in DOCS.md for `stable`
- Adds Readme.md for `edge`
- Added logo.png to display on add-on page automatically
- Fixes add-on startup according to docs
- Fixed commit unknown in plugin
- Removed some centre styling for titles and added warning emoji
- Removed some centre aligns for consistency
- Simplified change log header and move details to root readme
- Cleaned up change log completely to show only changes and move rest of meta to root readme
- Updated change log with better details
- Added docs for supporting new devices using new method
- Updated changelog based on diffs in tags on the repo
- Improved visibility of breaking changes in change log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants