<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/spec/migrations, branch docs-pages-force-https</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Prevent EE backport migrations from running if CE is not migrated</title>
<updated>2019-06-25T12:42:10+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2019-06-24T21:07:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1b0637781205623547ed1ae7242125f78f7b0b31'/>
<id>1b0637781205623547ed1ae7242125f78f7b0b31</id>
<content type='text'>
If a user upgraded to any GitLab 11.x EE version but switched
back to CE, it's possible the state of the EE tables are not
in the right state for the EE backport migration to work properly.
In particular, there were three tables that had trouble:

* epics
* geo_event_log
* vulnerability_feedback

The EE backport migration would fail while trying to add foreign key
constraints because a key didn't exist in the table. This happens
because any EE migration that add or removed columns between v11.0.0 and
v11.11.3 are not guaranteed to be applied in an CE installation. The EE
backport schema does not individually backport these migrations.

We now check if certain columns are present to determine whether
the backport migration is in the proper state. CE users are required
to upgrade to v11.11.3 EE if they ever installed EE previously before
they can go back to v12.x CE.

Tested via:

```
git checkout -f v11.0.0-ee
bundle exec rake db:reset
git checkout .; git checkout -f v11.11.3
bundle exec rake db:migrate
git checkout .; git checkout -f v12.0.0
bundle exec rake db:migrate
&lt;failure happens&gt;
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a user upgraded to any GitLab 11.x EE version but switched
back to CE, it's possible the state of the EE tables are not
in the right state for the EE backport migration to work properly.
In particular, there were three tables that had trouble:

* epics
* geo_event_log
* vulnerability_feedback

The EE backport migration would fail while trying to add foreign key
constraints because a key didn't exist in the table. This happens
because any EE migration that add or removed columns between v11.0.0 and
v11.11.3 are not guaranteed to be applied in an CE installation. The EE
backport schema does not individually backport these migrations.

We now check if certain columns are present to determine whether
the backport migration is in the proper state. CE users are required
to upgrade to v11.11.3 EE if they ever installed EE previously before
they can go back to v12.x CE.

Tested via:

```
git checkout -f v11.0.0-ee
bundle exec rake db:reset
git checkout .; git checkout -f v11.11.3
bundle exec rake db:migrate
git checkout .; git checkout -f v12.0.0
bundle exec rake db:migrate
&lt;failure happens&gt;
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'sync-merge-ref-upon-mergeability-check' into 'master'</title>
<updated>2019-06-24T09:31:46+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2019-06-24T09:31:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=7821defab33f917b62d1132339a521d609f191d6'/>
<id>7821defab33f917b62d1132339a521d609f191d6</id>
<content type='text'>
Automatically update MR merge-ref along merge status

See merge request gitlab-org/gitlab-ce!29569</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Automatically update MR merge-ref along merge status

See merge request gitlab-org/gitlab-ce!29569</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '62772-migrate-managed-clusters-to-unmanaged' into 'master'</title>
<updated>2019-06-21T01:26:19+00:00</updated>
<author>
<name>Thong Kuah</name>
<email>tkuah@gitlab.com</email>
</author>
<published>2019-06-21T01:26:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=148516ba36855095fa995c2d4e8077919cdb6db6'/>
<id>148516ba36855095fa995c2d4e8077919cdb6db6</id>
<content type='text'>
Migrate managed clusters that aren't using managed features to unmanaged

Closes #62772

See merge request gitlab-org/gitlab-ce!29251</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Migrate managed clusters that aren't using managed features to unmanaged

Closes #62772

See merge request gitlab-org/gitlab-ce!29251</pre>
</div>
</content>
</entry>
<entry>
<title>Migrate clusters with no token to unmanaged</title>
<updated>2019-06-20T22:30:26+00:00</updated>
<author>
<name>Tiger</name>
<email>twatson@gitlab.com</email>
</author>
<published>2019-06-14T00:45:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=bae848418b1784be938bb670da4ffceed06f42dd'/>
<id>bae848418b1784be938bb670da4ffceed06f42dd</id>
<content type='text'>
There are clusters that have Kubernetes namespaces
stored which are missing a service account token.
These namespaces are unable to be used for deployments,
so marking the clusters as unmanaged will allow the
platform credentials to be used instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are clusters that have Kubernetes namespaces
stored which are missing a service account token.
These namespaces are unable to be used for deployments,
so marking the clusters as unmanaged will allow the
platform credentials to be used instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Automatically update MR merge-ref along merge status</title>
<updated>2019-06-20T14:48:30+00:00</updated>
<author>
<name>Oswaldo Ferreira</name>
<email>oswaldo@gitlab.com</email>
</author>
<published>2019-05-21T21:14:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=3af348b6cf28ef1d9d3025f7012049132b57798c'/>
<id>3af348b6cf28ef1d9d3025f7012049132b57798c</id>
<content type='text'>
This couples the code that transitions the `MergeRequest#merge_status`
and refs/merge-requests/:iid/merge ref update.

In general, instead of directly telling `MergeToRefService` to update
the merge ref, we should rely on `MergeabilityCheckService` to keep
both the merge status and merge ref synced. Now, if the merge_status is
`can_be_merged` it means the merge-ref is also updated to the latest.

We've also updated the logic to be more systematic and less user-based.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This couples the code that transitions the `MergeRequest#merge_status`
and refs/merge-requests/:iid/merge ref update.

In general, instead of directly telling `MergeToRefService` to update
the merge ref, we should rely on `MergeabilityCheckService` to keep
both the merge status and merge ref synced. Now, if the merge_status is
`can_be_merged` it means the merge-ref is also updated to the latest.

We've also updated the logic to be more systematic and less user-based.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '57918-encrypt-feature-flags-tokens' into 'master'</title>
<updated>2019-06-18T13:41:44+00:00</updated>
<author>
<name>Kamil Trzciński</name>
<email>ayufan@ayufan.eu</email>
</author>
<published>2019-06-18T13:41:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=457db29067aa231cd357ac1b9981adc9548fee75'/>
<id>457db29067aa231cd357ac1b9981adc9548fee75</id>
<content type='text'>
Add migrations needed to encrypt feature flags client tokens

See merge request gitlab-org/gitlab-ce!29320</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add migrations needed to encrypt feature flags client tokens

See merge request gitlab-org/gitlab-ce!29320</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'migrate_k8s_service_integration' into 'master'</title>
<updated>2019-06-17T23:31:36+00:00</updated>
<author>
<name>Thong Kuah</name>
<email>tkuah@gitlab.com</email>
</author>
<published>2019-06-17T23:31:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=04307096bcc776259d8080bebd688ff6073d07c4'/>
<id>04307096bcc776259d8080bebd688ff6073d07c4</id>
<content type='text'>
Migrate Kubernetes service integration templates to clusters

See merge request gitlab-org/gitlab-ce!28534</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Migrate Kubernetes service integration templates to clusters

See merge request gitlab-org/gitlab-ce!28534</pre>
</div>
</content>
</entry>
<entry>
<title>Add migrations needed to encrypt feature flags client tokens</title>
<updated>2019-06-17T23:09:15+00:00</updated>
<author>
<name>Krasimir Angelov</name>
<email>kangelov@gitlab.com</email>
</author>
<published>2019-06-06T09:37:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=03000c8f26e85f5bc8bbfe292af7ffd1bcc38d29'/>
<id>03000c8f26e85f5bc8bbfe292af7ffd1bcc38d29</id>
<content type='text'>
Make plaintext token column not null, add new token_encrypted column and
index on project_id &amp; token_encrypted.

Post deployment migration to encrypt existing tokens.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make plaintext token column not null, add new token_encrypted column and
index on project_id &amp; token_encrypted.

Post deployment migration to encrypt existing tokens.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport the EE schema and migrations to CE</title>
<updated>2019-06-17T15:09:05+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2019-04-29T12:16:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=8469f59d786be6762908f62d642625790999cb9b'/>
<id>8469f59d786be6762908f62d642625790999cb9b</id>
<content type='text'>
This backports all EE schema changes to CE, including EE migrations,
ensuring both use the same schema.

== Updated tests

A spec related to ghost and support bot users had to be modified to make
it pass. The spec in question assumes that the "support_bot" column
exists when defining the spec. In the single codebase setup this is not
the case, as the column is backported in a later migration. Any attempt
to use a different schema version or use of "around" blocks to
conditionally disable specs won't help, as reverting the backport
migration would also drop the "support_bot" column. Removing the
"support_bot" tests entirely appears to be the only solution.

We also need to update some foreign key tests now that we have
backported the EE columns. Fortunately, these changes are very minor.

== Backporting migrations

This commit moves EE specific migrations (except those for the Geo
tracking database) and related files to CE, and also removes any traces
of the ee/db directory.

Some migrations had to be modified or removed, as they no longer work
with the schema being backported. These migrations were all quite old,
so we opted for removing them where modifying them would take too much
time and effort.

Some old migrations were modified in EE, while also existing in CE. In
these cases we took the EE code, and in one case removed them entirely.
It's not worth spending time trying to merge these changes somehow as we
plan to remove old migrations around the release of 12.0, see
https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This backports all EE schema changes to CE, including EE migrations,
ensuring both use the same schema.

== Updated tests

A spec related to ghost and support bot users had to be modified to make
it pass. The spec in question assumes that the "support_bot" column
exists when defining the spec. In the single codebase setup this is not
the case, as the column is backported in a later migration. Any attempt
to use a different schema version or use of "around" blocks to
conditionally disable specs won't help, as reverting the backport
migration would also drop the "support_bot" column. Removing the
"support_bot" tests entirely appears to be the only solution.

We also need to update some foreign key tests now that we have
backported the EE columns. Fortunately, these changes are very minor.

== Backporting migrations

This commit moves EE specific migrations (except those for the Geo
tracking database) and related files to CE, and also removes any traces
of the ee/db directory.

Some migrations had to be modified or removed, as they no longer work
with the schema being backported. These migrations were all quite old,
so we opted for removing them where modifying them would take too much
time and effort.

Some old migrations were modified in EE, while also existing in CE. In
these cases we took the EE code, and in one case removed them entirely.
It's not worth spending time trying to merge these changes somehow as we
plan to remove old migrations around the release of 12.0, see
https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
</pre>
</div>
</content>
</entry>
<entry>
<title>Migrate project level clusters with no Kubernetes namespace to unmanaged</title>
<updated>2019-06-14T00:05:42+00:00</updated>
<author>
<name>Tiger</name>
<email>twatson@gitlab.com</email>
</author>
<published>2019-06-06T06:45:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=8a8ddec661eb7a4bca740285622bb3f8419732fd'/>
<id>8a8ddec661eb7a4bca740285622bb3f8419732fd</id>
<content type='text'>
These clusters were created before we introduced the
option to manage your own cluster, and not having a
Kubernetes namespace present means that we have tried
and failed to create one - and therefore we cannot manage
your cluster for you.

The 5 minute window should prevent a race condition
where a cluster has only just been created and we
haven't had a chance to create any resources for it
yet.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These clusters were created before we introduced the
option to manage your own cluster, and not having a
Kubernetes namespace present means that we have tried
and failed to create one - and therefore we cannot manage
your cluster for you.

The 5 minute window should prevent a race condition
where a cluster has only just been created and we
haven't had a chance to create any resources for it
yet.
</pre>
</div>
</content>
</entry>
</feed>
