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

Fix relative path to operator modules #26

Merged
merged 1 commit into from
May 29, 2024

Conversation

dsimansk
Copy link

In other to properly build plugin locally. Otherwise the path is not relative to the current repo layout.

Without the fix:

➜  kn-plugin-workflow git:(pr/remove-knative-dep) make build-linux-amd64
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.QuarkusPlatformGroupId= -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.QuarkusVersion= -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.PluginVersion= -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.DevModeImage= -X github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata.KogitoVersion=" -o ./dist/kn-workflow-linux-amd64 cmd/main.go
go: downloading golang.org/x/net v0.23.0
pkg/command/deploy_undeploy_common.go:29:2: github.com/apache/incubator-kie-tools/packages/kogito-serverless-operator/[email protected]: replacement directory ./node_modules/@kie-tools/kogito-serverless-operator/workflowproj does not exist
make: *** [build-linux-amd64] Error 1

@rgdoliveira
Copy link
Member

@fantonangeli FYI as this will be a difference in midstream when comparing with upstream.
We are not sure yet if it should be sent to upstream or not (as we think upstream is using pnpm for building most of the stuff)

@rgdoliveira rgdoliveira merged commit ff18cdc into kiegroup:main May 29, 2024
4 of 8 checks passed
@fantonangeli
Copy link

@rgdoliveira @dsimansk have you tried adding @kie-tools/kn-plugin-workflow to the bootstrap phase?
https://github.com/dsimansk/kie-tools/blob/010a7181a45895dd6e52f93f9f3565b509cfa70c/pom.xml#L192
From:
<arguments>bootstrap -F @kie-tools/sonataflow-quarkus-devui...</arguments>
to:
<arguments>bootstrap -F @kie-tools/sonataflow-quarkus-devui... -F @kie-tools/kn-plugin-workflow...</arguments>

It's in that phase that pnpm creates ./node_modules/@kie-tools/kogito-serverless-operator, but before it was not doing that as our bootstrap was focused on sonataflow-quarkus-devui & dependencies

@rgdoliveira
Copy link
Member

@fantonangeli the build of kn workflow plugin is a bit different from what we were done before on PNC (for building the Quarkus DEV UI).

For kn workflow plugin we need to do an RPM build on Brew (using a spec file we created in dist-git) and for that build we only have the packages/kn-plugin-workflow folder as the sources for the build (not the entire repository).
Said that, I think using the entire kie-tools repository and doing a pnpm bootstrap on Brew would be very tricky, so that's why we followed this approach.

FYI @mareknovotny

@mareknovotny
Copy link
Member

it is not even tricky, but Brew is RPM package system as it is you can build only one module/package at the time, if there are more dependencies in the given repository you need to build it individually and link them in BuildRequires or Requires declarations of RPM spec file.

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.

4 participants