Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate docs into the main repo #4164

Merged
merged 3 commits into from Sep 9, 2022
Merged

Integrate docs into the main repo #4164

merged 3 commits into from Sep 9, 2022

Conversation

nickva
Copy link
Contributor

@nickva nickva commented Sep 7, 2022

Related to the discussion in dev ML

The main advantage for doing it are:

  • No need to create a separate PR for features. Less efforts to update docs.
  • Make it easier to generate releases. Release notes track source changes.
  • Speed up ./configure as there one less dependency to fetch.

One of the objections of this approach, as discussed in the ML, was that docs PRs have a lightweight CI and we'd want to preserve that. This PR attempts to address that with the changes to the Jenkinsfile.pr (thanks to @big-r81 for the idea in the ML) where the following logic is used in the when ... stage triggers.

  • If any docs files are changed, run docs make check (a quick format check for docs)
  • If only docs changed, then docs make is run, like in the previous separate docs repo. All the other CI steps are skipped.
  • If other files are changed, not just docs, then the full CI is run. As part of that make dist also builds docs. If this happens there is not need to also run the "Build Docs" so that can be skipped.

@nickva nickva force-pushed the integrate-docs-2 branch 6 times, most recently from 3331d70 to 48a312d Compare September 7, 2022 06:31
@nickva
Copy link
Contributor Author

nickva commented Sep 7, 2022

To better illustrate how it works here are the cases described above generated with a few bogus PRs into this branch:

Docs only

docs_only

Docs and source changes

docs_and_source

Source only changes

no_docs_source_only

If docs are changed then docs "check" is run If only docs changed and
not other files, then only docs are built and other stages are
"fast-forwarded".

Also, remove docs from gitignore and from rebar.config.
Copy link
Contributor

@big-r81 big-r81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Nick!

Some informational reminders:

  1. Are all tags set in main like in docs-main
  2. Change link in RTD
  3. Document change in couchdb-documentation
  4. Archive couchdb-documentation?
  5. Any links to update?
  6. Any open PR’s need to get merged first?
  7. Something I forgot?

@nickva
Copy link
Contributor Author

nickva commented Sep 9, 2022

Good points, @big-r81

RTD allows configuring which branches/tags to build. I think we could keep stable (which is an alias to 3.2.2) and latest. latest is automatically built from main. stable can be either an explicit branch, or if that's missing it's automatically the highest semver release tag (the one we use). But our 3.2.2 tag in the main repo won't build the moved docs. So thinking of making a 3.2.2-docs branch with the integrated docs for 3.2.2 for that case.

As for archiving we could just update the main branch and put just a readme file indicating to move the pull request to the main repo.. After some time we can archive it too.

Unfortunately the pending PRs would have to be re-targeted for the main repo.

I think there would be some links / example readme changes.

@nickva nickva merged commit ae94872 into main Sep 9, 2022
@nickva nickva deleted the integrate-docs-2 branch September 9, 2022 04:26
nickva added a commit that referenced this pull request Sep 9, 2022
This branch contains the 3.2.2 version of the docs but migrated to the
main CouchDB repo. After switching the URL repo in RDT we want to make
sure we still display the stable (aliased to 3.2.2) docs in RDT not
just the latest ones.

Main integration PR #4164
Copy link
Contributor

@jaydoane jaydoane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a few comments, but it appears I was too late!

build-aux/Jenkinsfile.pr Show resolved Hide resolved
build-aux/Jenkinsfile.pr Show resolved Hide resolved
src/docs/README.md Show resolved Hide resolved
build-aux/Jenkinsfile.pr Show resolved Hide resolved
@big-r81
Copy link
Contributor

big-r81 commented Sep 9, 2022

Maybe it’s a good idea to define an .editorconfig for the project / projects?

@nickva
Copy link
Contributor Author

nickva commented Sep 9, 2022

Have a few comments, but it appears I was too late!

It’s never too late! Will fix it in a separate PR. Thanks for taking a look, @jaydoane

@nickva
Copy link
Contributor Author

nickva commented Sep 9, 2022

I tried this in .emacs:

'(groovy-indent-offset 2)

I'll reformat both the full and pr files

nickva added a commit that referenced this pull request Sep 9, 2022
nickva added a commit that referenced this pull request Sep 9, 2022
@nickva
Copy link
Contributor Author

nickva commented Sep 9, 2022

@jaydoane #4171

@nickva
Copy link
Contributor Author

nickva commented Sep 9, 2022

Maybe it’s a good idea to define an .editorconfig for the project / projects?

I wonder if emacs could read that? For erlang it's relatively straightforward as we're using erlfmt but for other languages it's a bit unspecified.

@big-r81
Copy link
Contributor

big-r81 commented Sep 9, 2022

Maybe it’s a good idea to define an .editorconfig for the project / projects?

I wonder if emacs could read that? For erlang it's relatively straightforward as we're using erlfmt but for other languages it's a bit unspecified.

https://github.com/editorconfig/editorconfig-emacs

nickva added a commit that referenced this pull request Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants