fix(desktop): remove overly-aggressive feature flag check (#11748)

This commit is contained in:
Milas Bowman 2024-04-19 16:06:57 -04:00 committed by GitHub
parent 2aa568ceba
commit fd532a37e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 7 deletions

View File

@ -71,10 +71,6 @@ func (s *State) NavBar() bool {
return s.determineFeatureState("ComposeNav") return s.determineFeatureState("ComposeNav")
} }
func (s *State) AutoFileShares() bool {
return s.determineFeatureState("ComposeAutoFileShares")
}
func (s *State) determineFeatureState(name string) bool { func (s *State) determineFeatureState(name string) bool {
if s == nil || !s.active || s.desktopValues == nil { if s == nil || !s.active || s.desktopValues == nil {
return false return false

View File

@ -33,12 +33,12 @@ func (s *composeService) SetExperiments(experiments *experimental.State) {
} }
func (s *composeService) manageDesktopFileSharesEnabled(ctx context.Context) bool { func (s *composeService) manageDesktopFileSharesEnabled(ctx context.Context) bool {
// there's some slightly redundancy here to avoid fetching the config if if !s.isDesktopIntegrationActive() {
// we can already tell the feature state - in practice, we
if !s.isDesktopIntegrationActive() || !s.experiments.AutoFileShares() {
return false return false
} }
// synchronized file share support in Docker Desktop is dependent upon
// a variety of factors (settings, OS, etc), which this endpoint abstracts
fileSharesConfig, err := s.desktopCli.GetFileSharesConfig(ctx) fileSharesConfig, err := s.desktopCli.GetFileSharesConfig(ctx)
if err != nil { if err != nil {
logrus.Debugf("Failed to retrieve file shares config: %v", err) logrus.Debugf("Failed to retrieve file shares config: %v", err)