Switching to stable-track (#11377)

* sccache "stop server" - > "show stats"

* remove testing and beta from update, cli, etc.

* Beta->Nigthly updater

* Beta->Nightly

* ->Nightly and fix

* updater ->Stable

* Testing->Nightly

* Update scripts/gitlab/test-linux.sh

Co-Authored-By: Denis Pisarev <denis.pisarev@parity.io>

* sccache "stop server" - > "show stats"

* remove testing and beta from update, cli, etc.

* Beta->Nigthly updater

* Beta->Nightly

* ->Nightly and fix

* updater ->Stable

* Testing->Nightly

* Update scripts/gitlab/test-linux.sh

Co-Authored-By: Denis Pisarev <denis.pisarev@parity.io>

* Update CHANGELOGs and version

* temporarily allow darwin and windows to be built on any branch

* fix check-benches job

* Revert "temporarily allow darwin and windows to be built on any branch"

This reverts commit 45c72f69e99cbe891f694e528a53eb3c3bd8f331.

* fix check-benches job

* Revert changing track from `nightly` to `stable`

* fix test: rpc_parity_upgrade_ready

* fix tests: rpc_parity_version_info, rpc_parity_releases_info

Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
Co-authored-by: s3krit <pugh@s3kr.it>
This commit is contained in:
Denis S. Soldatov aka General-Beck 2020-01-22 19:34:34 +03:00 committed by Martin Pugh
parent 9e28241b29
commit 5923146210
14 changed files with 22 additions and 83 deletions

View File

@ -19,7 +19,6 @@ variables:
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
only: &releaseable_branches
- stable
- beta
- tags
- schedules
@ -308,7 +307,7 @@ publish-release-awss3-nightly: &publish-release-awss3
script:
- echo "__________Push binaries to AWS S3____________"
- case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
(beta|stable|nightly)
(stable|nightly)
export BUCKET=releases.parity.io/ethereum;
;;
(*)

View File

@ -296,7 +296,7 @@ usage! {
ARG arg_release_track: (String) = "current", or |c: &Config| c.parity.as_ref()?.release_track.clone(),
"--release-track=[TRACK]",
"Set which release track we should use for updates. TRACK can be one of: stable - Stable releases; beta - Beta releases; nightly - Nightly releases (unstable); testing - Testing releases (do not use); current - Whatever track this executable was released on.",
"Set which release track we should use for updates. TRACK can be one of: stable - Stable releases; nightly - Nightly releases (unstable); testing - Testing releases (do not use); current - Whatever track this executable was released on.",
ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(),
"--chain=[CHAIN]",

View File

@ -981,9 +981,7 @@ impl Configuration {
},
track: match self.args.arg_release_track.as_ref() {
"stable" => ReleaseTrack::Stable,
"beta" => ReleaseTrack::Beta,
"nightly" => ReleaseTrack::Nightly,
"testing" => ReleaseTrack::Testing,
"current" => ReleaseTrack::Unknown,
_ => return Err("Invalid value for `--releases-track`. See `--help` for more information.".into()),
},
@ -1512,23 +1510,11 @@ mod tests {
#[test]
fn should_parse_updater_options() {
// when
let conf0 = parse(&["parity", "--release-track=testing"]);
let conf1 = parse(&["parity", "--auto-update", "all", "--no-consensus", "--auto-update-delay", "300"]);
let conf2 = parse(&["parity", "--no-download", "--auto-update=all", "--release-track=beta", "--auto-update-delay=300", "--auto-update-check-frequency=100"]);
let conf3 = parse(&["parity", "--auto-update=xxx"]);
let conf0 = parse(&["parity", "--auto-update", "all", "--no-consensus", "--auto-update-delay", "300"]);
let conf1 = parse(&["parity", "--auto-update=xxx"]);
// then
assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy {
enable_downloading: true,
require_consensus: true,
filter: UpdateFilter::Critical,
track: ReleaseTrack::Testing,
path: default_hypervisor_path(),
max_size: 128 * 1024 * 1024,
max_delay: 100,
frequency: 20,
});
assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy {
enable_downloading: true,
require_consensus: false,
filter: UpdateFilter::All,
@ -1538,17 +1524,7 @@ mod tests {
max_delay: 300,
frequency: 20,
});
assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy {
enable_downloading: false,
require_consensus: true,
filter: UpdateFilter::All,
track: ReleaseTrack::Beta,
path: default_hypervisor_path(),
max_size: 128 * 1024 * 1024,
max_delay: 300,
frequency: 100,
});
assert!(conf3.update_policy().is_err());
assert!(conf1.update_policy().is_err());
}
#[test]

View File

@ -72,7 +72,7 @@ impl UpdateService for TestUpdater {
fn version_info(&self) -> VersionInfo {
VersionInfo {
track: ReleaseTrack::Beta,
track: ReleaseTrack::Stable,
version: Version{major: 1, minor: 5, patch: 0, build: vec![], pre: vec![]},
hash: H160::from_low_u64_be(150),
}
@ -84,7 +84,7 @@ impl UpdateService for TestUpdater {
this_fork: Some(15000),
track: ReleaseInfo {
version: VersionInfo {
track: ReleaseTrack::Beta,
track: ReleaseTrack::Stable,
version: Version{major: 1, minor: 5, patch: 1, build: vec![], pre: vec![]},
hash: H160::from_low_u64_be(151),
},

View File

@ -130,7 +130,7 @@ fn rpc_parity_version_info() {
let io = deps.default_client();
let request = r#"{"jsonrpc": "2.0", "method": "parity_versionInfo", "params": [], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":{"hash":"0x0000000000000000000000000000000000000096","track":"beta","version":{"major":1,"minor":5,"patch":0}},"id":1}"#;
let response = r#"{"jsonrpc":"2.0","result":{"hash":"0x0000000000000000000000000000000000000096","track":"stable","version":{"major":1,"minor":5,"patch":0}},"id":1}"#;
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
}
@ -140,7 +140,7 @@ fn rpc_parity_releases_info() {
let io = deps.default_client();
let request = r#"{"jsonrpc": "2.0", "method": "parity_releasesInfo", "params": [], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":{"fork":15100,"minor":null,"this_fork":15000,"track":{"binary":"0x00000000000000000000000000000000000000000000000000000000000005e6","fork":15100,"is_critical":true,"version":{"hash":"0x0000000000000000000000000000000000000097","track":"beta","version":{"major":1,"minor":5,"patch":1}}}},"id":1}"#;
let response = r#"{"jsonrpc":"2.0","result":{"fork":15100,"minor":null,"this_fork":15000,"track":{"binary":"0x00000000000000000000000000000000000000000000000000000000000005e6","fork":15100,"is_critical":true,"version":{"hash":"0x0000000000000000000000000000000000000097","track":"stable","version":{"major":1,"minor":5,"patch":1}}}},"id":1}"#;
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
}

View File

@ -91,7 +91,7 @@ fn rpc_parity_upgrade_ready() {
io.extend_with(parity_set_client(&client, &miner, &updater, &network).to_delegate());
let request = r#"{"jsonrpc": "2.0", "method": "parity_upgradeReady", "params": [], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":{"binary":"0x00000000000000000000000000000000000000000000000000000000000005e6","fork":15100,"is_critical":true,"version":{"hash":"0x0000000000000000000000000000000000000097","track":"beta","version":{"major":1,"minor":5,"patch":1}}},"id":1}"#;
let response = r#"{"jsonrpc":"2.0","result":{"binary":"0x00000000000000000000000000000000000000000000000000000000000005e6","fork":15100,"is_critical":true,"version":{"hash":"0x0000000000000000000000000000000000000097","track":"stable","version":{"major":1,"minor":5,"patch":1}}},"id":1}"#;
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
updater.set_updated(true);

View File

@ -49,8 +49,6 @@ impl Into<ConsensusCapability> for CapState {
pub enum ReleaseTrack {
/// Stable track.
Stable,
/// Beta track.
Beta,
/// Nightly track.
Nightly,
/// Testing track.
@ -64,9 +62,7 @@ impl Into<ReleaseTrack> for updater::ReleaseTrack {
fn into(self) -> ReleaseTrack {
match self {
updater::ReleaseTrack::Stable => ReleaseTrack::Stable,
updater::ReleaseTrack::Beta => ReleaseTrack::Beta,
updater::ReleaseTrack::Nightly => ReleaseTrack::Nightly,
updater::ReleaseTrack::Testing => ReleaseTrack::Testing,
updater::ReleaseTrack::Unknown => ReleaseTrack::Unknown,
}
}

View File

@ -23,19 +23,6 @@ case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
--tag "parity/parity:${SCHEDULE_TAG}" \
--file tools/Dockerfile .;
docker push "parity/parity:${SCHEDULE_TAG}";;
"beta")
echo "Docker TAGs - 'parity/parity:beta', 'parity/parity:latest', \
'parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}'";
docker build --no-cache \
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
--tag "parity/parity:beta" \
--tag "parity/parity:latest" \
--tag "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}" \
--file tools/Dockerfile .;
docker push "parity/parity:beta";
docker push "parity/parity:latest";
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";;
"stable")
echo "Docker TAGs - 'parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}', 'parity/parity:stable'";
docker build --no-cache \
@ -45,7 +32,8 @@ case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
--tag "parity/parity:stable" \
--file tools/Dockerfile .;
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";
docker push "parity/parity:stable";;
docker push "parity/parity:stable";
docker push "parity/parity:latest";;
v[0-9]*.[0-9]*)
echo "Docker TAG - 'parity/parity:${VERSION}-${TRACK}'"
docker build --no-cache \

View File

@ -11,7 +11,6 @@ SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
# Choose snap release channel based on parity ethereum version track
case ${TRACK} in
nightly) export GRADE="devel" CHANNEL="edge";;
beta) export GRADE="stable" CHANNEL="beta";;
stable) export GRADE="stable" CHANNEL="stable";;
*) echo "No release" && exit 0;;
esac

View File

@ -7,7 +7,7 @@ echo "__________Checking if Rust files were changed__________"
git log --graph --oneline --decorate=short -n 10
case ${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} in
(beta|stable)
(stable)
export GIT_COMPARE=origin/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}~
;;
(master|nightly)

View File

@ -24,12 +24,8 @@ use std::fmt;
pub enum ReleaseTrack {
/// Stable track.
Stable = 1,
/// Beta track.
Beta = 2,
/// Nightly track.
Nightly = 3,
/// Testing track.
Testing = 4,
Nightly = 2,
/// No known track, also "current executable's track" when it's not yet known.
Unknown = 0,
}
@ -38,9 +34,7 @@ impl fmt::Display for ReleaseTrack {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", match *self {
ReleaseTrack::Stable => "stable",
ReleaseTrack::Beta => "beta",
ReleaseTrack::Nightly => "nightly",
ReleaseTrack::Testing => "testing",
ReleaseTrack::Unknown => "unknown",
})
}
@ -50,9 +44,7 @@ impl<'a> From<&'a str> for ReleaseTrack {
fn from(s: &'a str) -> Self {
match s {
"stable" => ReleaseTrack::Stable,
"beta" => ReleaseTrack::Beta,
"nightly" => ReleaseTrack::Nightly,
"testing" => ReleaseTrack::Testing,
_ => ReleaseTrack::Unknown,
}
}
@ -62,9 +54,7 @@ impl From<u8> for ReleaseTrack {
fn from(i: u8) -> Self {
match i {
1 => ReleaseTrack::Stable,
2 => ReleaseTrack::Beta,
3 => ReleaseTrack::Nightly,
4 => ReleaseTrack::Testing,
2 => ReleaseTrack::Nightly,
_ => ReleaseTrack::Unknown,
}
}
@ -83,36 +73,28 @@ mod tests {
#[test]
fn test_release_track_from() {
assert_eq!(ReleaseTrack::Stable, 1u8.into());
assert_eq!(ReleaseTrack::Beta, 2u8.into());
assert_eq!(ReleaseTrack::Nightly, 3u8.into());
assert_eq!(ReleaseTrack::Testing, 4u8.into());
assert_eq!(ReleaseTrack::Nightly, 2u8.into());
assert_eq!(ReleaseTrack::Unknown, 0u8.into());
}
#[test]
fn test_release_track_into() {
assert_eq!(1u8, u8::from(ReleaseTrack::Stable));
assert_eq!(2u8, u8::from(ReleaseTrack::Beta));
assert_eq!(3u8, u8::from(ReleaseTrack::Nightly));
assert_eq!(4u8, u8::from(ReleaseTrack::Testing));
assert_eq!(2u8, u8::from(ReleaseTrack::Nightly));
assert_eq!(0u8, u8::from(ReleaseTrack::Unknown));
}
#[test]
fn test_release_track_from_str() {
assert_eq!(ReleaseTrack::Stable, "stable".into());
assert_eq!(ReleaseTrack::Beta, "beta".into());
assert_eq!(ReleaseTrack::Nightly, "nightly".into());
assert_eq!(ReleaseTrack::Testing, "testing".into());
assert_eq!(ReleaseTrack::Unknown, "unknown".into());
}
#[test]
fn test_release_track_into_str() {
assert_eq!("stable", ReleaseTrack::Stable.to_string());
assert_eq!("beta", ReleaseTrack::Beta.to_string());
assert_eq!("nightly", ReleaseTrack::Nightly.to_string());
assert_eq!("testing", ReleaseTrack::Testing.to_string());
assert_eq!("unknown", ReleaseTrack::Unknown.to_string());
}
}

View File

@ -283,8 +283,7 @@ impl OperationsClient for OperationsContractClient {
// if the minor version has changed, let's check the minor version on a different track
while in_minor.as_ref().expect(PROOF).version.version.minor != this.version.minor {
let track = match in_minor.as_ref().expect(PROOF).version.track {
ReleaseTrack::Beta => ReleaseTrack::Stable,
ReleaseTrack::Nightly => ReleaseTrack::Beta,
ReleaseTrack::Nightly => ReleaseTrack::Stable,
_ => { in_minor = None; break; }
};
@ -841,7 +840,7 @@ pub mod tests {
let rng = FakeGenRange::new();
let this = VersionInfo {
track: ReleaseTrack::Beta,
track: ReleaseTrack::Nightly,
version: Version::parse("1.0.0").unwrap(),
hash: H160::zero(),
};
@ -881,7 +880,7 @@ pub mod tests {
fn new_upgrade(version: &str) -> (VersionInfo, ReleaseInfo, OperationsInfo) {
let latest_version = VersionInfo {
track: ReleaseTrack::Beta,
track: ReleaseTrack::Nightly,
version: Version::parse(version).unwrap(),
hash: H160::from_low_u64_be(1),
};

View File

@ -8,7 +8,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"
[package.metadata]
# This versions track. Should be changed to `stable` or `beta` when on respective branches.
# This versions track. Should be changed to `stable` when on respective branches.
# Used by auto-updater and for Parity version string.
track = "stable"

View File

@ -30,7 +30,7 @@ mod generated {
#[cfg(feature = "final")]
const THIS_TRACK: &'static str = generated::TRACK;
// ^^^ should be reset in Cargo.toml to "stable" or "beta" according to the release branch.
// ^^^ should be reset in Cargo.toml to "stable" according to the release branch.
#[cfg(not(feature = "final"))]
const THIS_TRACK: &'static str = "unstable";