Skip to content

Devfile Registry checks for Alizer failing due to nodejs-mongodb starter project URL change #1776

@michael-valdron

Description

@michael-valdron

Which area is this bug related to?

/area registry
/area alizer

What versions of software are you using?

Bug Summary

Describe the bug: URL change from https://github.com/che-samples/nodejs-mongodb-sample to https://github.com/devfile-samples/nodejs-mongodb-sample is causing the hard-coded ignore condition for nodejs-mongodb to be missed and therefore produce an unexpected failure.

To Reproduce: make registry_check

Expected Behavior

Failure of nodejs-mongodb stack should be ignored.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

Run make build
go build -o alizer
go: downloading github.com/spf13/cobra v1.10.2
go: downloading github.com/spf13/pflag v1.0.10
go: downloading github.com/go-logr/logr v1.4.3
go: downloading github.com/go-logr/zapr v1.3.0
go: downloading github.com/moby/buildkit v0.26.3
go: downloading github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
go: downloading go.uber.org/zap v1.28.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/hashicorp/go-version v1.9.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading golang.org/x/mod v0.33.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10
go: downloading github.com/containerd/typeurl/v2 v2.2.3
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/gogo/protobuf v1.3.2
./test/check_registry/check_registry.sh
:: Creating Registry Entries JSON...

go: downloading gopkg.in/yaml.v2 v2.4.0
:: Cloning project for entry <dotnet80>

dotnet80 -> found revision dotnet-8.0 for repo https://github.com/redhat-developer/s2i-dotnetcore-ex
Cloning into 'tmp/dotnet80'...

:: Running alizer against path tmp/dotnet80

------------------
SUCCESS - Devfile Name: dotnet80 <> Matched Devfile Name: dotnet80
------------------

:: Cloning project for entry <go>

go -> found revision v2.6.0 for repo https://github.com/devfile-samples/devfile-stack-go.git
Cloning into 'tmp/go'...
Note: switching to '84233eb202e78ea7c610e683b9a63b9525c1d281'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false


:: Running alizer against path tmp/go

------------------
SUCCESS - Devfile Name: go <> Matched Devfile Name: go
------------------

:: Cloning project for entry <java-openliberty>

Cloning into 'tmp/java-openliberty'...

:: Running alizer against path tmp/java-openliberty

------------------
SUCCESS - Devfile Name: java-openliberty <> Matched Devfile Name: java-openliberty-gradle
------------------

:: Cloning project for entry <java-openliberty-gradle>

Cloning into 'tmp/java-openliberty-gradle'...

:: Running alizer against path tmp/java-openliberty-gradle

------------------
SUCCESS - Devfile Name: java-openliberty-gradle <> Matched Devfile Name: java-openliberty-gradle
------------------

:: Cloning project for entry <java-quarkus>

Cloning into 'tmp/java-quarkus'...

:: Running alizer against path tmp/java-quarkus

------------------
SUCCESS - Devfile Name: java-quarkus <> Matched Devfile Name: java-quarkus
------------------

:: Cloning project for entry <java-springboot>

Cloning into 'tmp/java-springboot'...

:: Running alizer against path tmp/java-springboot

------------------
SUCCESS - Devfile Name: java-springboot <> Matched Devfile Name: java-springboot
------------------

:: Cloning project for entry <java-vertx>

Cloning into 'tmp/java-vertx'...

:: Running alizer against path tmp/java-vertx

------------------
SUCCESS - Devfile Name: java-vertx <> Matched Devfile Name: java-vertx
------------------

:: Cloning project for entry <java-wildfly>

java-wildfly -> found revision qs for repo https://github.com/wildfly-extras/wildfly-devfile-examples.git
Cloning into 'tmp/java-wildfly'...

:: Running alizer against path tmp/java-wildfly

------------------
SUCCESS - Devfile Name: java-wildfly <> Matched Devfile Name: java-wildfly-bootable-jar
------------------

:: Cloning project for entry <java-wildfly-bootable-jar>

Cloning into 'tmp/java-wildfly-bootable-jar'...

:: Running alizer against path tmp/java-wildfly-bootable-jar/examples/authentication

------------------
SUCCESS - Devfile Name: java-wildfly-bootable-jar <> Matched Devfile Name: java-wildfly-bootable-jar
------------------

:: Cloning project for entry <nodejs>

nodejs -> found revision main for repo https://github.com/nodeshift-starters/devfile-sample.git
Cloning into 'tmp/nodejs'...

:: Running alizer against path tmp/nodejs

------------------
SUCCESS - Devfile Name: nodejs <> Matched Devfile Name: nodejs
------------------

:: Cloning project for entry <nodejs-angular>

nodejs-angular -> found revision main for repo https://github.com/devfile-samples/devfile-stack-nodejs-angular.git
Cloning into 'tmp/nodejs-angular'...

:: Running alizer against path tmp/nodejs-angular

------------------
SUCCESS - Devfile Name: nodejs-angular <> Matched Devfile Name: nodejs-angular
------------------

:: Cloning project for entry <nodejs-mongodb>

nodejs-mongodb -> found revision main for repo https://github.com/devfile-samples/nodejs-mongodb-sample
Cloning into 'tmp/nodejs-mongodb'...

:: Running alizer against path tmp/nodejs-mongodb

[FAIL] Failed to match project https://github.com/devfile-samples/nodejs-mongodb-sample with expected nodejs-mongodb. Command ./alizer devfile --registry https://registry.devfile.io/ tmp/nodejs-mongodb
[FAIL] Output: [
	{
		"Name": "nodejs",
		"Language": "JavaScript",
		"ProjectType": "Node.js",
		"Tags": [
			"Node.js",
			"Express",
			"ubi8"
		],
		"Versions": [
			{
				"SchemaVersion": "2.2.2",
				"Default": true,
				"Version": "2.2.1"
			},
			{
				"SchemaVersion": "2.1.0",
				"Default": false,
				"Version": "2.2.0"
			},
			{
				"SchemaVersion": "2.1.0",
				"Default": false,
				"Version": "2.1.1"
			}
		]
	}
]
(PASSED: 11 / FAILED: 1)
make: *** [Makefile:27: check_registry] Error 1

Additional Context

No response

Any workaround?

N/A

Suggestion on how to fix the bug

Change the repo URL in the condition to the new location.

Metadata

Metadata

Labels

area/alizerEnhancement or issue related to the alizer repoarea/registryDevfile registry for stacks and infrastructurekind/bugSomething isn't working

Type

No fields configured for Bug.

Projects

Status
In Review 👀

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions