<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Enable and disable GitLab features deployed behind feature flags > 原文:[https://docs.gitlab.com/ee/administration/feature_flags.html](https://docs.gitlab.com/ee/administration/feature_flags.html) * [How to enable and disable features behind flags](#how-to-enable-and-disable-features-behind-flags) * [Start the GitLab Rails console](#start-the-gitlab-rails-console) * [Enable or disable the feature](#enable-or-disable-the-feature) # Enable and disable GitLab features deployed behind feature flags[](#enable-and-disable-gitlab-features-deployed-behind-feature-flags-core-only "Permalink") GitLab 采用[功能標記策略](../development/feature_flags/index.html)在開發的早期階段部署功能,以便可以逐步推出它們. 在使它們永久可用之前,出于[多種原因](../development/feature_flags/process.html#when-to-use-feature-flags) ,可以將功能部署在標志的后面,例如: * 測試功能. * 在功能開發的早期階段獲得用戶和客戶的反饋. * 評估用戶采用率. * 評估它如何影響 GitLab 的性能. * 在整個發行版中以較小的部分構建它. 標記后面的功能通常可以逐步推出: 1. 默認情況下,該功能開始禁用. 2. 該功能默認情況下處于啟用狀態. 3. 功能標記已刪除. 可以啟用和禁用這些功能,以允許或禁止用戶使用它們. GitLab 管理員可以訪問 GitLab Rails 控制臺來完成此操作. 如果您使用了某個功能并發現了錯誤,不正常行為或錯誤,那么盡快向 GitLab [**提供反饋**](https://gitlab.com/gitlab-org/gitlab/-/issues/new?issue[title]=Docs - feature flag feedback: Feature Name&issue[description]=Describe the problem you've encountered. <!-- Don't edit below this line --> /label ~)非常重要,這樣我們就可以在標記后改進或修復它. 當您將 GitLab 升級到早期版本時,功能標志狀態可能會更改. **注意:請**注意,部署在功能標記后面的功能可能尚未準備好用于生產. 但是,禁用默認情況下已啟用的已部署標志后面的功能也可能帶來風險. 如果啟用了它們,我們建議您保持原樣. ## How to enable and disable features behind flags[](#how-to-enable-and-disable-features-behind-flags "Permalink") 每個功能都有其自己的標志,應使用該標志來啟用和禁用它. 標志后面的每個功能的文檔都包括一個部分,通知標志的狀態以及啟用或禁用標志的命令. ### Start the GitLab Rails console[](#start-the-gitlab-rails-console "Permalink") 啟用或禁用標志后面的功能的第一件事是在 GitLab Rails 控制臺上啟動會話. 對于所有安裝; ``` sudo gitlab-rails console ``` 對于源安裝: ``` sudo -u git -H bundle exec rails console -e production ``` 有關詳細信息,請參見[啟動 Rails 控制臺會話](troubleshooting/debug.html#starting-a-rails-console-session) . ### Enable or disable the feature[](#enable-or-disable-the-feature "Permalink") 一旦啟動 Rails 控制臺會話,請相應地運行`Feature.enable`或`Feature.disable`命令. 特定標志可以在功能文檔中找到. 要啟用功能,請運行: ``` Feature.enable(:<feature flag>) ``` 例如,啟用證據收集: ``` Feature.enable(:release_evidence_collection) ``` 要禁用功能,請運行: ``` Feature.disable(:<feature flag>) ``` Example, to disable Evidence Collection: ``` Feature.disable(:release_evidence_collection) ``` 可以基于每個項目啟用或禁用某些功能標志: ``` Feature.enable(:<feature flag>, Project.find(<project id>)) ``` 例如,要為項目`1234`啟用[`:junit_pipeline_view`](../ci/junit_test_reports.html#enabling-the-junit-test-reports-feature-core-only)功能標記: ``` Feature.enable(:junit_pipeline_view, Project.find(1234)) ``` `Feature.enable`和`Feature.disable`始終返回`nil` ,這并不表示命令失敗: ``` irb(main):001:0> Feature.enable(:release_evidence_collection) => nil ``` 要檢查標志是啟用還是禁用,可以使用`Feature.enabled?` 或`Feature.disabled?` : ``` Feature.enable(:release_evidence_collection) => nil Feature.enabled?(:release_evidence_collection) => true Feature.disabled?(:release_evidence_collection) => false ``` 功能就緒后,GitLab 將刪除功能標志,啟用和禁用該功能的選項將不再存在,并且該功能將在所有實例中可用.
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看