Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Branching & Release Strategy ADR #280

Merged
merged 2 commits into from
Sep 2, 2020

Conversation

nickebbitt
Copy link
Contributor

@nickebbitt nickebbitt commented Aug 31, 2020

I've created this ADR following a conversation with @johnoliver. Hopefully it reflects what we discussed accurately but if not we can use this PR to evolve the decision to a state where ot can be accepted and applied to the project.

The decision goes some way to simplify how people contribute to the project however there remains the manual process of synchronising master and production/release.

It would be nice not to require a separate branch to represent production.

We discussed a possible alternative that would be to hook into Git tags and GitHub releases, with a new production deployment being triggered by the release (i.e. tag) of the master branch. While it seems desirable, there's more complexity in there that I'm unable to explore as I don't fully understand the constraints that exist in relation to the deployment model used with OpenShift.

I look forward to review/feedback so we can iterate on this proposal and apply any agreed changes to the project.

For info, an acceptable state of this ADR could be "Rejected" and, if so, it might be useful to still update this PR with that state and merge the document for historical purposes.

Checklist

  • You changed or added to the documentation

@nickebbitt nickebbitt changed the title Draft of Branching & Release Strategy ADR Branching & Release Strategy ADR Aug 31, 2020
@codecov
Copy link

codecov bot commented Aug 31, 2020

Codecov Report

Merging #280 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #280      +/-   ##
============================================
+ Coverage     71.26%   71.30%   +0.04%     
  Complexity      274      274              
============================================
  Files           100      100              
  Lines          2495     2495              
  Branches        304      304              
============================================
+ Hits           1778     1779       +1     
  Misses          538      538              
+ Partials        179      178       -1     
Impacted Files Coverage Δ Complexity Δ
...ataSources/persitence/mongo/MongoApiPersistence.kt 83.13% <0.00%> (+1.20%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a122a0...dd84c1b. Read the comment docs.

@nickebbitt nickebbitt marked this pull request as ready for review September 1, 2020 14:40
@nickebbitt
Copy link
Contributor Author

@johnoliver thanks for the review, I'll push a change to update the status to Accepted before we merge

@johnoliver johnoliver merged commit 4ea527e into AdoptOpenJDK:master Sep 2, 2020
@karianna karianna added the documentation Improvements or additions to documentation label Sep 8, 2020
@karianna karianna added this to the September 2020 milestone Sep 8, 2020
gdams pushed a commit that referenced this pull request Sep 10, 2020
* Add ktlint to Maven build

Also remove from GitHub action workflow to avoid duplication of work

* Bump ktlint to v0.37.2

* Auto-fix/format ktlint issues

Performed with ./mvnw antrun:run@ktlint-format

* Update CONTRIBUTING guide with details of ktlint

* Add support for ADRs within the project structure

Fixes #270

* Branching & Release Strategy ADR (#280)

* Branching & Release Strategy ADR

* Set status of ADR 0002 to Accepted

* Add issue templates (#283)

Fixes #269

Co-authored-by: Nick Ebbitt <nickebbitt@gmail.com>
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: Nick Ebbitt <nick.ebbitt@autotrader.co.uk>
nickebbitt added a commit that referenced this pull request Dec 3, 2020
* Add timezones to timestamps. Add from and to on stats (#94)

* enforce day limit (#103)

* Use Last-Modified and If-Modified-Since to reduce request burden (#109)

* Pass on lastModified header when url is redirected

* Add printing debug stats to narrow down missing stats issues (#111)

* Take the last version in the release as the release version (#118)

* If there are multiple stat entries for a single day, take the last (#114)

* Default the project type to jdk when none is provided (#113)

* add timeout to Http requests

* Filter non-binary assets in stats (#122)

* add health check script (#126)

* Add support for debug images (#130)

* Keep bad stats in staging instance so we can diagnose reporting issues (#133)

* Split releases with a mix of versions (#136)

* Prevent double counting stats when splitting releases (#137)

* Bump httpcore to fix https://issues.apache.org/jira/browse/HTTPCORE-583

* Add debugging logic to http cache

* Fix incorrect updated release check (#142)

* Bring back cache update (#150)

* Pretty print returned json (#149)

* When grouping releases, ignore optional values (#153)

* Merge master changes into staging (#154)

* Default the project type to jdk when none is provided (#113)

* Merge in latest updates from staging (#119)

* Use Last-Modified and If-Modified-Since to reduce request burden (#109)

* Pass on lastModified header when url is redirected

* Take the last version in the release as the release version (#118)

* Bring #124, #114 and #111 from staging into master (#125)

* Add printing debug stats to narrow down missing stats issues (#111)

* If there are multiple stat entries for a single day, take the last (#114)

* add timeout to Http requests

* add health check script (#127)

* add description to top of swagger doc (#131)

* update v3 readme to include deprecation information

* Exclude debug images from live until we are ready to go live (#134)

* remove beta tag

* switch to official github actions badge

* Add v1 reject frontend (#143)

* Add release filter (#151)

Co-authored-by: George Adams <georgeadams1995@gmail.com>

* Fix equality of gitIds (#155)

* Squashed commit of the following: (#164)

commit c3160a8
Author: George Adams <georgeadams1995@gmail.com>
Date:   Thu Apr 9 12:46:02 2020 +0000

    fix linter failures (#163)

    * fix linter failures

    * add newline

    * add more coverage

    * add more coverage

commit 98145cf
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Thu Apr 9 11:10:28 2020 +0100

    Merge staging into master (#162)

    * Add timezones to timestamps. Add from and to on stats (#94)

    * enforce day limit (#103)

    * Use Last-Modified and If-Modified-Since to reduce request burden (#109)

    * Pass on lastModified header when url is redirected

    * Add printing debug stats to narrow down missing stats issues (#111)

    * Take the last version in the release as the release version (#118)

    * If there are multiple stat entries for a single day, take the last (#114)

    * Default the project type to jdk when none is provided (#113)

    * add timeout to Http requests

    * Filter non-binary assets in stats (#122)

    * add health check script (#126)

    * Add support for debug images (#130)

    * Keep bad stats in staging instance so we can diagnose reporting issues (#133)

    * Split releases with a mix of versions (#136)

    * Prevent double counting stats when splitting releases (#137)

    * Bump httpcore to fix https://issues.apache.org/jira/browse/HTTPCORE-583

    * Add debugging logic to http cache

    * Fix incorrect updated release check (#142)

    * Bring back cache update (#150)

    * Pretty print returned json (#149)

    * When grouping releases, ignore optional values (#153)

    * Merge master changes into staging (#154)

    * Default the project type to jdk when none is provided (#113)

    * Merge in latest updates from staging (#119)

    * Use Last-Modified and If-Modified-Since to reduce request burden (#109)

    * Pass on lastModified header when url is redirected

    * Take the last version in the release as the release version (#118)

    * Bring #124, #114 and #111 from staging into master (#125)

    * Add printing debug stats to narrow down missing stats issues (#111)

    * If there are multiple stat entries for a single day, take the last (#114)

    * add timeout to Http requests

    * add health check script (#127)

    * add description to top of swagger doc (#131)

    * update v3 readme to include deprecation information

    * Exclude debug images from live until we are ready to go live (#134)

    * remove beta tag

    * switch to official github actions badge

    * Add v1 reject frontend (#143)

    * Add release filter (#151)

    Co-authored-by: George Adams <georgeadams1995@gmail.com>

    * Fix equality of gitIds (#155)

    * Reformat code based on editorconfig

    * Fixes from lint

    * Format closer to ktlint style

    Co-authored-by: George Adams <georgeadams1995@gmail.com>

commit b94e308
Author: George Adams <georgeadams1995@gmail.com>
Date:   Thu Apr 9 09:57:14 2020 +0000

    more tests (#161)

commit b2ef8ea
Author: George Adams <georgeadams1995@gmail.com>
Date:   Thu Apr 9 09:39:38 2020 +0000

    add more bad tests for better coverage (#160)

    * add more bad tests for better coverage

    * fix linter failure

commit 419790f
Author: George Adams <georgeadams1995@gmail.com>
Date:   Wed Apr 8 12:52:06 2020 +0000

    linter changes (#157)

    * linter changes

    * add github action

    * simplify ktlint

    * fix lint error

commit 26fe502
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Wed Apr 8 13:32:51 2020 +0100

    add version data to BinaryAssetView (#159)

commit 96da9db
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Tue Apr 7 23:18:08 2020 +0100

    add test for aarch ea version string (#156)

commit c700ae8
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Wed Apr 1 18:42:29 2020 +0100

    Add release filter (#151)

commit d61c403
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Wed Apr 1 13:29:20 2020 +0100

    Add v1 reject frontend (#143)

commit 9e6c27d
Merge: 7a7a889 a0051a1
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Mon Mar 30 10:26:13 2020 +0100

    Merge pull request #138 from gdams/release

    remove beta tag

commit 7a7a889
Author: George Adams <georgeadams1995@gmail.com>
Date:   Mon Mar 30 09:31:54 2020 +0100

    switch to official github actions badge

commit a0051a1
Author: George Adams <georgeadams1995@gmail.com>
Date:   Mon Mar 30 09:23:11 2020 +0100

    remove beta tag

commit c73acf2
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Fri Mar 27 14:06:48 2020 +0000

    Exclude debug images from live until we are ready to go live (#134)

commit cce8f81
Merge: f3b2500 b959d1a
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Fri Mar 27 11:52:32 2020 +0000

    Merge pull request #132 from gdams/index

    update v3 readme to include deprecation information

commit b959d1a
Author: George Adams <georgeadams1995@gmail.com>
Date:   Fri Mar 27 11:50:58 2020 +0000

    update v3 readme to include deprecation information

commit f3b2500
Author: George Adams <georgeadams1995@gmail.com>
Date:   Thu Mar 26 14:05:12 2020 +0000

    add description to top of swagger doc (#131)

commit f0a5809
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Wed Mar 25 14:07:29 2020 +0000

    add health check script (#127)

commit 1b684f2
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Fri Mar 13 13:40:34 2020 +0000

    Bring #124, #114 and #111 from staging into master (#125)

    * Add printing debug stats to narrow down missing stats issues (#111)

    * If there are multiple stat entries for a single day, take the last (#114)

    * add timeout to Http requests

commit 4b5d284
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Sat Feb 22 05:29:03 2020 +0000

    Merge in latest updates from staging (#119)

    * Use Last-Modified and If-Modified-Since to reduce request burden (#109)

    * Pass on lastModified header when url is redirected

    * Take the last version in the release as the release version (#118)

commit c6b4247
Author: John Oliver <1615532+johnoliver@users.noreply.github.com>
Date:   Mon Feb 17 23:26:49 2020 +0000

    Default the project type to jdk when none is provided (#113)

* Add head request for gradle download (#165)

* Add metrics (#167)

* Remove example values so they are not pre-filled in swagger-ui. (#169)

* Fix #171 (#173)

* more tests/coverage (#172) (#176)

* more tests/coverage

* Update GitHubAuthTest.kt

* add null check

* clever stuff from John

* Update GitHubAuthTest.kt

* I'm an idiot and I know it

* george isn't such an idiot after all

* add codecov.yml

Co-authored-by: George Adams <georgeadams1995@gmail.com>

* add date filter to feature_releases path (#177)

* Add installer endpoint (#178)

* Add pre to the release version split. (#180)

* Print binary size statistics (#185)

* add detection of jfr builds on Upstream (#190)

* Add static-libs as recognized ImageType for upstream (#192)

Co-authored-by: Severin Gehwolf <sgehwolf@redhat.com>

* fix displaying correct value in swagger-ui (#193)

* Merge master into staging (#196)

* Add daily jvmImpl download counts to stats updater (#175)

* Calculate j9/hs stats in the updater for github stats

* Implemented github jvm tracking with test

* Clean up

* Fixes from linting

* Minor syntax change

* Added feature_version and jvmImpl to dockerStats

* inherit BaseTest

* Include installer download count in total binary count

* Added null map to jvmImplDownloads and tweaked openjdk name regex

* linting

* Merge master into staging (#210)

* Rebase onto staging (#203)

* Possible solution to #209 on staging (#211)

* Fix #209

* Added some reasoning

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>

* Merge in staging

* Add daily jvmImpl download counts to stats updater (#175)

* Calculate j9/hs stats in the updater for github stats

* Implemented github jvm tracking with test

* Clean up

* Fixes from linting

* Minor syntax change

* Added feature_version and jvmImpl to dockerStats

* inherit BaseTest

* Include installer download count in total binary count

* Added null map to jvmImplDownloads and tweaked openjdk name regex

* linting

* Rebase onto staging (#203)

* Merge master

* Add riscv architecture to api (#229)

* WIP add riscv64

* Exclude riscv from test set

* Fixed regex (#232)

* Added link to structure.md (#233)

* Added link to structure.md

* Add p tags

* Refactor mongo client connection string (#245)

* Check MONGO_DB property first when creating connection string

As the MONGO_DB property overrides any other values if set it makes
sense logically to check that first before evaluating other cases.

* Refactor MongoClient connection string logic

* Rename connection string variable to align with KMongo.createClient API

* Remove curly braces from string template for consistency

* Extract Mongo connection string logic to function

This also allows the connection string logic to be tested

* Remove unused code

* add application insights (#249)

* add debug logging (#251)

* Fix packaging (#252)

* Rework sampling to track full request time

* Prevent failed build from passing

* print update stats for debugging

* Expose metadata_link for package assets

* Refactor to remove ambiguity between GitHub & Adopt assets

* Add update time to db and poll updates more frequently (#261)

* Add test to provide full example and coverage for creating a binary from GitHub assets

* Use Kotlin backtick style function names in tests for readability

* Refactor rename of function arguments for clarity

* Fix npe

* Fix linting errors

* Stream checksum digest to try to avoid running out of memory

* Prevent updated from scheduling updates

* Make UpdatedInfo a data class (#265)

* Allow GithubHtmlClient to be overridden for tests

This change provides greater control in tests, as well as reduces test execution
time by ~20 seconds.

* Add fongo to UpstreamRelaeseMapperTest

After adding the constructor parameter for the GithubHtmlClient and
defaulting to the cached implementation, this test was failing due to it
eagerly initialising and triggering some database calls without a
database being available.

* Change AdoptBinaryMapper to a class and use constructor injection with default value

* Fix linting issues

* Revert wildcard imports

* Remove unnecessary test setup of Fongo

* Add application insights log appender

* Sync staging with master (dont squash) (#286)

* Add ktlint to Maven build

Also remove from GitHub action workflow to avoid duplication of work

* Bump ktlint to v0.37.2

* Auto-fix/format ktlint issues

Performed with ./mvnw antrun:run@ktlint-format

* Update CONTRIBUTING guide with details of ktlint

* Add support for ADRs within the project structure

Fixes #270

* Branching & Release Strategy ADR (#280)

* Branching & Release Strategy ADR

* Set status of ADR 0002 to Accepted

* Add issue templates (#283)

Fixes #269

Co-authored-by: Nick Ebbitt <nickebbitt@gmail.com>
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: Nick Ebbitt <nick.ebbitt@autotrader.co.uk>

* Dial back logging. Add resource monitoring to updater

* Remove log left from build process (#288)

* Speed up tests:
- Remove mongodb for most tests in favour of an in memory db
- Remove reliance on static json test data in favour of generating test data
- Allow juint to reuse forked jvms

* Log all errors before exit

* Initial DI implementation

* allow tests to run near midnight

* Fix wildcard imports from review

* Add release_name path (#295)

* Add release_name path

* Add AssetsResourceReleaseNamePathTest tests, tidy up annotations

* Add 400 tests requested in review

* fix defaulting mongo connection string settings (#299)

* allow tests to run near midnight

* Fix poor merge

* Fix test hanging

* Remove unneeded annotations

* Fixes from review

Co-authored-by: George Adams <georgeadams1995@gmail.com>
Co-authored-by: Severin Gehwolf <sgehwolf@redhat.com>
Co-authored-by: Adam Thorpe <52922030+adam-thorpe@users.noreply.github.com>
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: Nick Ebbitt <nickebbitt@gmail.com>
Co-authored-by: Nick Ebbitt <nick.ebbitt@autotrader.co.uk>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants