diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-07-22 13:48:53 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-08-02 01:22:38 +0300 |
commit | 0cd76190deb01db8ff080186f3daa5b6067a27f6 (patch) | |
tree | 9941d245e6ed8c5ce473c1263f1602f5ce9f9b53 /spec/models/clusters/applications/prometheus_spec.rb | |
parent | b690c268c2c34e1a7e34a9bbef264fe986e2f2d4 (diff) |
Lock helm charts to the VERSION already specified for each application.
Fix up VERSION for each of the applications
* There is no 0.0.1 helm version for jupyterhub. Use the latest version instead
* `:nginx` is not a valid chart version. Lock the ingress application GitLab installs to the latest chart version.
* Use the latest gitlab-runner chart to prevent GitLab installing older versions when users have been installing the lastest version
Always install from the VERSION and not the database `version` column.
This should fix cases like https://gitlab.com/gitlab-org/gitlab-ee/issues/6795 in
the instances where an install command failed previously, which locked the version
in the database to an older version.
Also, ensure that the version column is updated to the version we are
installing.
Add specs to show how previously failed appplications will be handled when the helm installation is run again
Add changelog entry
Diffstat (limited to 'spec/models/clusters/applications/prometheus_spec.rb')
-rw-r--r-- | spec/models/clusters/applications/prometheus_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/models/clusters/applications/prometheus_spec.rb b/spec/models/clusters/applications/prometheus_spec.rb index e4b61552033..3812c65b3b6 100644 --- a/spec/models/clusters/applications/prometheus_spec.rb +++ b/spec/models/clusters/applications/prometheus_spec.rb @@ -16,6 +16,20 @@ describe Clusters::Applications::Prometheus do it { is_expected.to contain_exactly(cluster) } end + describe '#make_installing!' do + before do + application.make_installing! + end + + context 'application install previously errored with older version' do + let(:application) { create(:clusters_applications_prometheus, :scheduled, version: '6.7.2') } + + it 'updates the application version' do + expect(application.reload.version).to eq('6.7.3') + end + end + end + describe 'transition to installed' do let(:project) { create(:project) } let(:cluster) { create(:cluster, projects: [project]) } @@ -155,6 +169,14 @@ describe Clusters::Applications::Prometheus do expect(command.version).to eq('6.7.3') expect(command.values).to eq(prometheus.values) end + + context 'application failed to install previously' do + let(:prometheus) { create(:clusters_applications_prometheus, :errored, version: '2.0.0') } + + it 'should be initialized with the locked version' do + expect(subject.version).to eq('6.7.3') + end + end end describe '#values' do |