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 was archived by the owner on Dec 16, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Some env variables are not needed when local_mode is enabled #100
Describe the solution you'd like
Based on the introduction of local_mode feature(see issue #76). Some env variables are not needed when we are using local_mode. Adjust .envrc.sample and also remove these unnecessary env variables in make target env-vars-for-wl-cluster.
I tested local_mode without unnecessary env variables(like GIT_PROVIDER_B64, etc..), and after I specified clusterstack version, which was not available in .release directory. I found these logs: from CSO:
{"level":"INFO","time":"2024-02-21T13:20:47.810Z","file":"fake/github_client.go:67","message":"WARNING: called DownloadReleaseAssets of fake Github client","controller":"clusterstackrelease","controllerGroup":"clusterstack.x-k8s.io","controllerKind":"ClusterStackRelease","ClusterStackRelease":{"name":"openstack-scs-1-27-v1","namespace":"cluster"},"namespace":"cluster","name":"openstack-scs-1-27-v1","reconcileID":"3f2bd577-21c4-4272-80be-3a61db50df8f"}
from CSPO:
2024-02-21T13:20:42Z DEBUG events failed to create git config: environment variable GIT_PROVIDER is not set {"type": "Warning", "object": {"kind":"OpenStackClusterStackRelease","namespace":"cluster","name":"openstack-scs-1-27-v1","uid":"b6f42c4c-395c-41d9-bc35-7f4af3bad1b3","apiVersion":"infrastructure.clusterstack.x-k8s.io/v1alpha1","resourceVersion":"3487"}, "reason": "GitTokenOrEnvVariableNotSet"}
And I think it is a little bit strange because even if you provide env variable GIT_PROVIDER(which you don't expect to have to specify when you are using local_mode) it shouldn't work because CSO doesn't pull the clusterstack from GitHub anyway. I think we should also implement a fake GitHub client like in CSO. What do you think of this @kranurag7 ?
It seems that this edge case is covered differently in CSO than in CSPO.
In CSO there is an option to enable local_mode and then it is also handled in the code, which result in different behavior like in CSPO.
IMO CSPO could implement this in the same way as CSO. I would like to propose creating a separate issue for the implementation. IMO this should have a lover priority.
it will try to download if the release assets are not available locally @matofeder@michal-gubricky ... You can implement the fake client but it gives you another error message (as you see in your message above), it doesn't change anything in the implementation
it will try to download if the release assets are not available locally @matofeder@michal-gubricky ... You can implement the fake client but it gives you another error message (as you see in your message above), it doesn't change anything in the implementation
Agree, but the different behavior could be strange in some cases, hence I would like to propose not allowing the download from GitHub in the case of local_mode and the fake client could be one option, but IMO better to inform the user that CSPO does not find the cluster-stack locally in the local_mode=true
Activity
kranurag7 commentedon Feb 20, 2024
@michal-gubricky We don't use these CAPI features in this repo.
michal-gubricky commentedon Feb 21, 2024
I tested
local_modewithout unnecessary env variables(likeGIT_PROVIDER_B64, etc..), and after I specified clusterstack version, which was not available in.releasedirectory. I found these logs:from CSO:
from CSPO:
And I think it is a little bit strange because even if you provide env variable
GIT_PROVIDER(which you don't expect to have to specify when you are using local_mode) it shouldn't work becauseCSOdoesn't pull the clusterstack from GitHub anyway. I think we should also implement a fake GitHub client like in CSO. What do you think of this @kranurag7 ?matofeder commentedon Feb 23, 2024
@michal-gubricky
It seems that this edge case is covered differently in CSO than in CSPO.
In CSO there is an option to enable local_mode and then it is also handled in the code, which result in different behavior like in CSPO.
IMO CSPO could implement this in the same way as CSO. I would like to propose creating a separate issue for the implementation. IMO this should have a lover priority.
janiskemper commentedon Feb 23, 2024
it will try to download if the release assets are not available locally @matofeder @michal-gubricky ... You can implement the fake client but it gives you another error message (as you see in your message above), it doesn't change anything in the implementation
matofeder commentedon Feb 23, 2024
Agree, but the different behavior could be strange in some cases, hence I would like to propose not allowing the download from GitHub in the case of
local_modeand the fake client could be one option, but IMO better to inform the user that CSPO does not find the cluster-stack locally in thelocal_mode=truejaniskemper commentedon Feb 23, 2024
this would be possible... We would just have to rename the log message