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

CloudEvent ID is too long - 72 chars #3184

Open
talebzeghmi opened this issue Jun 28, 2024 · 0 comments · May be fixed by #3186
Open

CloudEvent ID is too long - 72 chars #3184

talebzeghmi opened this issue Jun 28, 2024 · 0 comments · May be fixed by #3186
Labels
bug Something isn't working

Comments

@talebzeghmi
Copy link

Describe the bug

event.SetID(fmt.Sprintf("%x", uuid.New()))

The intention of the code is to convert the UUID to a hex string without the dashes, but the eventID is of form and length 72 633930656462302d376131632d346236372d393236642d353930393166663764626431 because it is converting the string representation of the UUID including the dashes.

The impact of this bug is that it makes it impossible for an EventSensor to add the ID as a workflow label because k8s limits the value to length of 63, see link

The fix would be to use [:]

uuidNew = uuid.New()
event.SetID(fmt.Sprintf("%x", uuidNew[:]))

To Reproduce
Steps to reproduce the behavior:

  1. Have the EventSource consume and event to forward to the EventBus
  2. Look at the log and the CloudEvent ID is of length 72
eventSourceType":"sqs","eventID":"63653966636463352d636139632d346331352d626464642d356136666139343333306664"}

Expected behavior
The expected format of cd2a34891fe847ab871f937679ebf950 which is of length 32.

Environment (please complete the following information):

  • Argo Events: v1.9.1

Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@talebzeghmi talebzeghmi added the bug Something isn't working label Jun 28, 2024
@talebzeghmi talebzeghmi linked a pull request Jun 28, 2024 that will close this issue
1 task
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 a pull request may close this issue.

1 participant