You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
I am having some "import cycle" issues when running make reviewable on my Terrajet project. Below is three resources that generates the import cycle not allowed error.
Team Routing Rule resource references.
team_id => type Team
notify.id => type Escalation
Escalation resource references,
owner_team_id => type Team
rules.recipient.id => type Team
This will generate the following error on running make reviewable.
WARN [runner] Can't run linter goanalysis_metalinter: bodyclose: failed prerequisites: [[email protected]/ok-amba/provider-jet-opsgenie/apis/team/v1alpha1: analysis skipped: errors in package: [/home/kerwood/Git/provider-jet-opsgenie/apis/team/v1alpha1/zz_generated.resolvers.go:23:11: could not import github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1 (-: import cycle not allowed: import stack: [github.com/ok-amba/provider-jet-opsgenie/apis github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1 github.com/ok-amba/provider-jet-opsgenie/apis/team/v1alpha1 github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1])]]
WARN [runner] Can't run linter unused: buildir: analysis skipped: errors in package: [-: import cycle not allowed: import stack: [github.com/ok-amba/provider-jet-opsgenie/apis github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1 github.com/ok-amba/provider-jet-opsgenie/apis/team/v1alpha1 github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1]]
ERRO Running error: buildir: analysis skipped: errors in package: [-: import cycle not allowed: import stack: [github.com/ok-amba/provider-jet-opsgenie/apis github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1 github.com/ok-amba/provider-jet-opsgenie/apis/team/v1alpha1 github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1]]
11:35:52 [FAIL]
make[2]: *** [build/makelib/golang.mk:194: go.lint] Error 1
make[1]: *** [build/makelib/common.mk:357: lint] Error 2
make: *** [build/makelib/common.mk:425: reviewable] Error 2
My guess is that its importing github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1 multiple times for some reason.
git clone [email protected]:ok-amba/provider-jet-opsgenie.git
cd provider-jet-opsgenie
git checkout 1d82bf7f2d5477d61db916c4868333187a0b10b1
make submodules
make reviewable
The text was updated successfully, but these errors were encountered:
What happened?
I am having some "import cycle" issues when running
make reviewable
on my Terrajet project. Below is three resources that generates theimport cycle not allowed
error.Team Routing Rule resource references.
team_id
=> typeTeam
notify.id
=> typeEscalation
Escalation resource references,
owner_team_id
=> typeTeam
rules.recipient.id
=> typeTeam
This will generate the following error on running
make reviewable
.My guess is that its importing
github.com/ok-amba/provider-jet-opsgenie/apis/escalation/v1alpha1
multiple times for some reason.Links to files
Team Routing Rule
config.go
file: https://github.com/ok-amba/provider-jet-opsgenie/blob/1d82bf7f2d5477d61db916c4868333187a0b10b1/config/teamroutingrule/config.goEscalation
config.go
file: https://github.com/ok-amba/provider-jet-opsgenie/blob/1d82bf7f2d5477d61db916c4868333187a0b10b1/config/escalation/config.goHow can we reproduce it?
The text was updated successfully, but these errors were encountered: