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

test: flaky TestCreate/creating_additional_advisory_for_package #975

Open
hectorj2f opened this issue Jun 20, 2024 · 2 comments
Open

test: flaky TestCreate/creating_additional_advisory_for_package #975

hectorj2f opened this issue Jun 20, 2024 · 2 comments
Labels
bug Something isn't working needs-triage applied to all new customer/user issues. Removed after triage occurs.

Comments

@hectorj2f
Copy link
Member

Description

It seems there is a flaky test on the test suite of the advisories functions. I ran the test locally and it passed but I got an error on the CI here: https://github.com/wolfi-dev/wolfictl/actions/runs/9596890702/job/26464754752?pr=974#step:8:50.

TestCreate/creating_additional_advisory_for_package
    create_test.go:221: Update() mismatch (-want +got):
          v2.Document{
          	SchemaVersion: "2.0.2",
          	Package:       {Name: "brotli"},
          	Advisories: v2.Advisories{
        - 		{
        - 			ID:      "CGA-xoxo-xoxo-xoxo2",
        - 			Aliases: []string{"CVE-2023-1234"},
        - 			Events:  []v2.Event{{Timestamp: s"2022-09-26T00:00:00Z", Type: "detection", Data: v2.Detection{...}}},
        - 		},
          		{Aliases: {"CVE-2020-8927"}, Events: {{Timestamp: s"2022-09-15T02:40:18Z", Type: "fixed", Data: v2.Fixed{FixedVersion: "1.0.9-r0"}}}, ...},
        + 		{
        + 			ID:      "CGA-xr[44](https://github.com/wolfi-dev/wolfictl/actions/runs/9596890702/job/26464754752?pr=974#step:8:45)-c573-6rmw",
        + 			Aliases: []string{"CVE-2023-1234"},
        + 			Events:  []v2.Event{{Timestamp: s"2022-09-26T00:00:00Z", Type: "detection", Data: v2.Detection{...}}},
        + 		},
          	},
          }
@hectorj2f hectorj2f added bug Something isn't working needs-triage applied to all new customer/user issues. Removed after triage occurs. labels Jun 20, 2024
@hectorj2f hectorj2f changed the title test: test: flaky TestCreate/creating_additional_advisory_for_package Jun 20, 2024
@luhring
Copy link
Contributor

luhring commented Jun 20, 2024

The best option might be to update CreateOptions to allow the caller to override how CGA IDs are generated (and do the same for Update, too)

@luhring
Copy link
Contributor

luhring commented Nov 13, 2024

Curious if anyone has seen this happen recently 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage applied to all new customer/user issues. Removed after triage occurs.
Projects
None yet
Development

No branches or pull requests

2 participants