Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c17912a7
Commit
c17912a7
authored
Dec 06, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EE] Move the "Limit conflicts with EE" doc to "Automatic CE-> EE merge"
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
35de313a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
9 deletions
+110
-9
PROCESS.md
PROCESS.md
+4
-2
doc/development/README.md
doc/development/README.md
+2
-2
doc/development/automatic_ce_ee_merge.md
doc/development/automatic_ce_ee_merge.md
+93
-0
doc/development/ee_features.md
doc/development/ee_features.md
+7
-1
doc/development/writing_documentation.md
doc/development/writing_documentation.md
+1
-1
lib/gitlab/ee_compat_check.rb
lib/gitlab/ee_compat_check.rb
+3
-3
No files found.
PROCESS.md
View file @
c17912a7
...
...
@@ -130,7 +130,8 @@ freeze date (the 7th) should have a corresponding Enterprise Edition merge
request, even if there are no conflicts. This is to reduce the size of the
subsequent EE merge, as we often merge a lot to CE on the release date. For more
information, see
[
limit conflicts with EE when developing on CE
][
limit_ee_conflicts
]
.
[
Automatic CE->EE merge
][
automatic_ce_ee_merge
]
and
[
Guidelines for implementing Enterprise Edition features
][
ee_features
]
.
### After the 7th
...
...
@@ -281,4 +282,5 @@ still an issue I encourage you to open it on the [GitLab.com issue tracker](http
[
"Implement design & UI elements" guidelines
]:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#implement-design-ui-elements
[
Thoughtbot code review guide
]:
https://github.com/thoughtbot/guides/tree/master/code-review
[
done
]:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#definition-of-done
[
limit_ee_conflicts
]:
https://docs.gitlab.com/ce/development/limit_ee_conflicts.html
[
automatic_ce_ee_merge
]:
https://docs.gitlab.com/ce/development/automatic_ce_ee_merge.html
[
ee_features
]:
https://docs.gitlab.com/ce/development/ee_features.html
doc/development/README.md
View file @
c17912a7
...
...
@@ -16,8 +16,8 @@ comments: false
-
[
GitLab core team & GitLab Inc. contribution process
](
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/PROCESS.md
)
-
[
Generate a changelog entry with `bin/changelog`
](
changelog.md
)
-
[
Code review guidelines
](
code_review.md
)
for reviewing code and having code reviewed.
-
[
Limit conflicts with EE when developing on CE
](
limit_ee_conflicts
.md
)
-
[
Guidelines for implementing Enterprise Edition feature
](
ee_features.md
)
-
[
Automatic CE->EE merge
](
automatic_ce_ee_merge
.md
)
-
[
Guidelines for implementing Enterprise Edition feature
s
](
ee_features.md
)
## UX and frontend guides
...
...
doc/development/automatic_ce_ee_merge.md
0 → 100644
View file @
c17912a7
# Automatic CE->EE merge
GitLab Community Edition is merged automatically every 3 hours into the
Enterprise Edition (look for the [
`CE Upstream`
merge requests]).
This merge is done automatically in a
[
scheduled pipeline
](
https://gitlab.com/gitlab-org/release-tools/-/jobs/43201679
)
.
If a merge is already in progress, the job
[
doesn't create a new one
](
https://gitlab.com/gitlab-org/release-tools/-/jobs/43157687
)
.
**
If you are pinged in a
`CE Upstream`
merge request to resolve a conflict,
please resolve the conflict as soon as possible or ask someone else to do it!
**
>**Note:**
It's ok to resolve more conflicts than the one that you are asked to resolve. In
that case, it's a good habit to ask for a double-check on your resolution by
someone who is familiar with the code you touched.
[
`CE Upstream` merge requests
]:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests?label_name%5B%5D=CE+upstream
### Always merge EE merge requests before their CE counterparts
**
In order to avoid conflicts in the CE->EE merge, you should always merge the
EE version of your CE merge request first, if present.
**
The rationale for this is that as CE->EE merges are done automatically every few
hours, it can happen that:
1.
A CE merge request that needs EE-specific changes is merged
1.
The automatic CE->EE merge happens
1.
Conflicts due to the CE merge request occur since its EE merge request isn't
merged yet
1.
The automatic merge bot will ping someone to resolve the conflict
**
that are
already resolved in the EE merge request that isn't merged yet
**
That's a waste of time, and that's why you should merge EE merge request before
their CE counterpart.
## Avoiding CE->EE merge conflicts beforehand
To avoid the conflicts beforehand, check out the
[
Guidelines for implementing Enterprise Edition features
](
ee_features.md
)
.
In any case, the CI
`ee_compat_check`
job will tell you if you need to open an
EE version of your CE merge request.
### Conflicts detection in CE merge requests
For each commit (except on
`master`
), the
`ee_compat_check`
CI job tries to
detect if the current branch's changes will conflict during the CE->EE merge.
The job reports what files are conflicting and how to setup a merge request
against EE.
#### How the job works
1.
Generates the diff between your branch and current CE
`master`
1.
Tries to apply it to current EE
`master`
1.
If it applies cleanly, the job succeeds, otherwise...
1.
Detects a branch with the
`ee-`
prefix or
`-ee`
suffix in EE
1.
If it exists, generate the diff between this branch and current EE
`master`
1.
Tries to apply it to current EE
`master`
1.
If it applies cleanly, the job succeeds
In the case where the job fails, it means you should create a
`ee-<ce_branch>`
or
`<ce_branch>-ee`
branch, push it to EE and open a merge request against EE
`master`
.
At this point if you retry the failing job in your CE merge request, it should
now pass.
Notes:
-
This task is not a silver-bullet, its current goal is to bring awareness to
developers that their work needs to be ported to EE.
-
Community contributors shouldn't be required to submit merge requests against
EE, but reviewers should take actions by either creating such EE merge request
or asking a GitLab developer to do it
**before the merge request is merged**
.
-
If you branch is too far behind
`master`
, the job will fail. In that case you
should rebase your branch upon latest
`master`
.
-
Code reviews for merge requests often consist of multiple iterations of
feedback and fixes. There is no need to update your EE MR after each
iteration. Instead, create an EE MR as soon as you see the
`ee_compat_check`
job failing. After you receive the final approval
from a Maintainer (but
**before the CE MR is merged**
) update the EE MR.
This helps to identify significant conflicts sooner, but also reduces the
number of times you have to resolve conflicts.
-
Please remember to
[
always have your EE merge request merged before the CE version
](
#always-merge-ee-merge-requests-before-their-ce-counterparts
)
.
-
You can use
[
`git rerere`
](
https://git-scm.com/blog/2010/03/08/rerere.html
)
to avoid resolving the same conflicts multiple times.
---
[
Return to Development documentation
](
README.md
)
doc/development/ee_features.md
View file @
c17912a7
# Guidelines for implementing Enterprise Edition feature
# Guidelines for implementing Enterprise Edition feature
s
-
**Write the code and the tests.**
: As with any code, EE features should have
good test coverage to prevent regressions.
...
...
@@ -380,3 +380,9 @@ to avoid conflicts during CE to EE merge.
}
}
```
## gitlab-svgs
Conflicts in
`app/assets/images/icons.json`
or
`app/assets/images/icons.svg`
can
be resolved simply by regenerating those assets with
[
`yarn run svg`
](
https://gitlab.com/gitlab-org/gitlab-svgs
)
.
doc/development/writing_documentation.md
View file @
c17912a7
...
...
@@ -142,7 +142,7 @@ tests. If it doesn't, the whole test suite will run (including docs).
---
When you submit a merge request to GitLab Community Edition (CE), there is an
additional job called
`
rake
ee_compat_check`
that runs against Enterprise
additional job called
`ee_compat_check`
that runs against Enterprise
Edition (EE) and checks if your changes can apply cleanly to the EE codebase.
If that job fails, read the instructions in the job log for what to do next.
Contributors do not need to submit their changes to EE, GitLab Inc. employees
...
...
lib/gitlab/ee_compat_check.rb
View file @
c17912a7
...
...
@@ -280,7 +280,7 @@ module Gitlab
The `
#{
branch
}
` branch applies cleanly to EE/master!
Much ❤️! For more information, see
https://docs.gitlab.com/ce/development/
limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
https://docs.gitlab.com/ce/development/
automatic_ce_ee_merge.html
#{
THANKS_FOR_READING_BANNER
}
}
end
...
...
@@ -357,7 +357,7 @@ module Gitlab
Once this is done, you can retry this failed build, and it should pass.
Stay 💪 ! For more information, see
https://docs.gitlab.com/ce/development/
limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
https://docs.gitlab.com/ce/development/
automatic_ce_ee_merge.html
#{
THANKS_FOR_READING_BANNER
}
}
end
...
...
@@ -378,7 +378,7 @@ module Gitlab
retry this build.
Stay 💪 ! For more information, see
https://docs.gitlab.com/ce/development/
limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
https://docs.gitlab.com/ce/development/
automatic_ce_ee_merge.html
#{
THANKS_FOR_READING_BANNER
}
}
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment