Skip to content

Conversation

@mcsaucy
Copy link
Contributor

@mcsaucy mcsaucy commented Apr 19, 2025

sha256.New().Sum(foo) appends the SHA-256 hash for nil to foo. See https://go.dev/play/p/vSW0U3Hq4qk

`sha256.New().Sum(foo)` appends the SHA-256 hash for nil to foo.
See https://go.dev/play/p/vSW0U3Hq4qk
@wu-sheng wu-sheng requested a review from kezhenxu94 April 19, 2025 23:16
@wu-sheng wu-sheng added this to the 0.15.0 milestone Apr 19, 2025
@wu-sheng wu-sheng added the bug Something isn't working label Apr 19, 2025
Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@kezhenxu94 kezhenxu94 merged commit f10be08 into apache:master Apr 21, 2025
5 checks passed
return fmt.Errorf(`"--%s" is specified but its related service name or id is not given`, nameFlagName)
}
id = fmt.Sprintf("%x", sha256.New().Sum([]byte(fmt.Sprintf("%s_%s", instanceID, name))))
id = fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprintf("%s_%s", instanceID, name))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW @mrproliu , I checked how the OAP build the process id, it’s sha256(name_instanceId), but here, it’s sha256(instanceId_name), is it a bug?

https://github.com/apache/skywalking/blob/7dccf96f30ec8a02e75523f3174540fb0b8d4c8a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/IDManager.java#L318-L319

@mcsaucy mcsaucy deleted the push-oxtrunxwqlqk branch April 29, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants