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

Initial Staging Process for KSP-CKAN/CKAN#1679 #55

Merged
merged 15 commits into from
Aug 19, 2016

Conversation

techman83
Copy link
Member

@techman83 techman83 commented Jul 11, 2016

The Staged commit process differs slightly from the traditional process, in that every index can potentially generate a change if the staged branch is yet to be merged.

Tests on some test metadata + repos here

Main process Overview

  1. NetKAN Inflates mod.netkan
  2. If a change was generated attempt commit
  3. Resulting CKAN is validated, if passes continue
  4. NetKAN is read and checked for staging flag "x-netkan-staging" : true
  5. If staging not required, commit to master

Staged Commit

  1. Ckan is commited to a random branch and a hash taken of it
  2. Switch to Master, then to Staging (reasoning in code)
  3. If the file exists, compare the hashes. Return if they match.
  4. If they differ cherry pick the commit from the random branch
  5. Push the staging branch
  6. Switch to master then to a branch labelled with the identifier
  7. Cherry pick the commit
  8. Push the branch
  9. Switch to master
  10. On return attempt to open a PR

Caveats

  • It's a blast cannon approach, if for some reason we fail to open a PR, it'll log that failure but we won't necessarily know.
  • Treat the generated branches as read only, fix the source netkan to generate a new change. It will automatically appear in the PR (even though it will still try and fail to open one).
  • @dbent suggested branches be Identifier-version, for simplicity I've not done this, however we may need to see how things work in practice. If another version gets released before the branch is merged they'll end up on the same PR.
  • The testing suite for CKAN-meta may need some attention, as humans aren't really committing directly to it, we've not made any recent changes.
  • Other things I haven't thought of.

@techman83 techman83 changed the title Initial Staging Process for KSP-CKAN/CKAN#1679 #1 Initial Staging Process for KSP-CKAN/CKAN#1679 Jul 11, 2016
@coveralls
Copy link

coveralls commented Jul 13, 2016

Coverage Status

Coverage decreased (-1.07%) to 91.677% when pulling 27371cc on techman83:staging into 30b70e9 on KSP-CKAN:master.

@techman83
Copy link
Member Author

w00 it passed finally!

@coveralls
Copy link

coveralls commented Jul 13, 2016

Coverage Status

Coverage decreased (-1.07%) to 91.677% when pulling 21bf524 on techman83:staging into 30b70e9 on KSP-CKAN:master.

@politas
Copy link
Member

politas commented Jul 18, 2016

I have a suggestion. Could we vet mods that don't have "x-netkan-staging" : true using @godarklight's metadata checker and force them into staging if they fail?

@techman83
Copy link
Member Author

@politas depends on the false positive rate. Last I spoke on it with @godarklight it was still quite high.

I have ideas on a more advanced testing capabilities, but I wanted to limit the scope of this change set to just 'staging'.

@techman83
Copy link
Member Author

We have some staged NetKANs in place, time to merge and :shipit:

@techman83 techman83 merged commit 81751de into KSP-CKAN:master Aug 19, 2016
@techman83 techman83 deleted the staging branch August 19, 2016 08:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants