Skip to content

🐛 Fix flaky hub validation of synthesized discovery rulesets; run unit tests in CI (#98)#102

Merged
mguetta1 merged 1 commit into
release-0.10from
cherry-pick-pr98-release-0.10
Jul 21, 2026
Merged

🐛 Fix flaky hub validation of synthesized discovery rulesets; run unit tests in CI (#98)#102
mguetta1 merged 1 commit into
release-0.10from
cherry-pick-pr98-release-0.10

Conversation

@konveyor-ci-bot

Copy link
Copy Markdown
  • 🐛 Ignore hub-synthesized tag-only discovery rulesets in validation

The tackle-hub target synthesizes discovery-rules/technology-usage
rulesets from the hub's discovery-task tags, which have no kantra
equivalent and are never compared for the hub target. Whether those
rulesets survive output filtering depends on whether the discovery
tasks finish before koncur snapshots application tags, so tests whose
kantra-generated expected output lacks a technology-usage ruleset
(e.g. nerd-dinner) fail or pass depending on task timing.

Skip the unexpected-ruleset error for tackle-hub when the ruleset is
one of the synthesized names and contains nothing but tags. Rulesets
carrying real content (violations/insights/errors) still fail, and the
missing-ruleset direction is unchanged.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Signed-off-by: Fabian von Feilitzsch fabian@fabianism.us

  • 🌱 Fix stale unit tests and run them in CI

No CI job ran go test, so the unit tests in pkg/config and pkg/targets
have been uncompilable since the CustomRule refactor (#44) without
anyone noticing.

  • Update rule-handling tests for the CustomRule model, and rewrite the
    prepareRules/prepareRulesForHub tests to exercise the real methods
    (including the hub's one-git-repo and no-mixed-rules error paths)
    instead of simulating removed logic
  • Stub the hub login probe in TestNewTackleHubTarget with httptest
    instead of hitting localhost:8080 (3 minutes of retries)
  • Add a unit-tests job (go vet + go test) to the PR CI workflow

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Signed-off-by: Fabian von Feilitzsch fabian@fabianism.us

  • 🌱 Restrict unit-tests CI job permissions

Scope the job token to contents: read and skip credential persistence
on checkout; the job only runs go vet and go test.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Signed-off-by: Fabian von Feilitzsch fabian@fabianism.us


Signed-off-by: Fabian von Feilitzsch fabian@fabianism.us
Co-authored-by: Claude Fable 5 noreply@anthropic.com
Signed-off-by: Cherry Picker noreply@github.com

…t tests in CI (#98)

* 🐛 Ignore hub-synthesized tag-only discovery rulesets in validation

The tackle-hub target synthesizes discovery-rules/technology-usage
rulesets from the hub's discovery-task tags, which have no kantra
equivalent and are never compared for the hub target. Whether those
rulesets survive output filtering depends on whether the discovery
tasks finish before koncur snapshots application tags, so tests whose
kantra-generated expected output lacks a technology-usage ruleset
(e.g. nerd-dinner) fail or pass depending on task timing.

Skip the unexpected-ruleset error for tackle-hub when the ruleset is
one of the synthesized names and contains nothing but tags. Rulesets
carrying real content (violations/insights/errors) still fail, and the
missing-ruleset direction is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>

* 🌱 Fix stale unit tests and run them in CI

No CI job ran go test, so the unit tests in pkg/config and pkg/targets
have been uncompilable since the CustomRule refactor (#44) without
anyone noticing.

- Update rule-handling tests for the CustomRule model, and rewrite the
  prepareRules/prepareRulesForHub tests to exercise the real methods
  (including the hub's one-git-repo and no-mixed-rules error paths)
  instead of simulating removed logic
- Stub the hub login probe in TestNewTackleHubTarget with httptest
  instead of hitting localhost:8080 (3 minutes of retries)
- Add a unit-tests job (go vet + go test) to the PR CI workflow

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>

* 🌱 Restrict unit-tests CI job permissions

Scope the job token to contents: read and skip credential persistence
on checkout; the job only runs go vet and go test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>

---------

Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Cherry Picker <noreply@github.com>
@mguetta1
mguetta1 merged commit f2002f7 into release-0.10 Jul 21, 2026
20 of 28 checks passed
@mguetta1
mguetta1 deleted the cherry-pick-pr98-release-0.10 branch July 21, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants