Skip to content

Commit

Permalink
[main] Revert Mariner 2.0 to latest working version (Azure#6565)
Browse files Browse the repository at this point in the history
*Cf.* microsoft/azurelinux#3483.

## Azure IoT Edge PR checklist:
  • Loading branch information
onalante-msft authored Aug 8, 2022
1 parent 1b3f818 commit f11a09a
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 20 deletions.
2 changes: 1 addition & 1 deletion builds/misc/addons-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stages:
################################################################################
- stage: BuildExecutables
################################################################################
displayName: Build Excecutables
displayName: Build Executables
pool:
name: $(pool.linux.name)
demands:
Expand Down
2 changes: 1 addition & 1 deletion builds/misc/templates/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stages:
################################################################################
- stage: BuildExecutables
################################################################################
displayName: Build Excecutables
displayName: Build Executables
condition: |
or
(
Expand Down
10 changes: 7 additions & 3 deletions builds/misc/templates/build-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ stages:
arch: amd64
os: mariner
os_version: 2
mariner_release: 2.0-stable
# mariner_release: 2.0-stable
# WARN: 2.0-stable is broken - https://github.com/microsoft/CBL-Mariner/issues/3483
mariner_release: 2.0.20220713-2.0
target.iotedged: builds/mariner2/out/RPMS
target.logs: builds/mariner2/build/logs/pkggen/rpmbuilding/
steps:
Expand Down Expand Up @@ -254,7 +256,9 @@ stages:
arch: aarch64
os: mariner
os_version: 2
mariner_release: 2.0-stable
# mariner_release: 2.0-stable
# WARN: 2.0-stable is broken - https://github.com/microsoft/CBL-Mariner/issues/3483
mariner_release: 2.0.20220713-2.0
target.iotedged: builds/mariner2/out/RPMS
target.logs: builds/mariner2/build/logs/pkggen/rpmbuilding/

Expand Down Expand Up @@ -302,7 +306,7 @@ stages:
# build iot-identity-service here since they cannot build native aarch64 packages
- bash: |
set -ex
git clone --recurse-submodules https://github.com/Azure/iot-identity-service.git -b release/1.2
git clone --recurse-submodules https://github.com/Azure/iot-identity-service.git
pushd iot-identity-service
packageVersion=$(git tag | grep 1.3.[0-9]*$ | sort --version-sort -r | head -1)
sudo docker run --rm \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunner
{
using System;

public class ExcecutionPrerequisiteException : Exception
public class ExecutionPrerequisiteException : Exception
{
public ExcecutionPrerequisiteException()
public ExecutionPrerequisiteException()
{
}

public ExcecutionPrerequisiteException(string message)
public ExecutionPrerequisiteException(string message)
: base(message)
{
}

public ExcecutionPrerequisiteException(string message, Exception inner)
public ExecutionPrerequisiteException(string message, Exception inner)
: base(message, inner)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public async Task<bool> ExecuteAsync(long deploymentId, Plan plan, CancellationT
int newRunCount = this.commandRunStatus.ContainsKey(command.Id) ? this.commandRunStatus[command.Id].RunCount : 0;
this.commandRunStatus[command.Id] = new CommandRunStats(newRunCount + 1, this.systemTime.UtcNow, ex);

if (ex is ExcecutionPrerequisiteException)
if (ex is ExecutionPrerequisiteException)
{
Events.StopProcessingCommands(deploymentId, command);
break;
Expand All @@ -136,7 +136,7 @@ bool ShouldSkipRemaining(bool shouldRun, ICommand command)
bool didCommandFailWithPrereqException = this.commandRunStatus.ContainsKey(command.Id) && this.commandRunStatus[command.Id].Exception.Match(
e =>
{
return e is ExcecutionPrerequisiteException;
return e is ExecutionPrerequisiteException;
},
() =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Task<ICommand> CreateAsync(IModuleWithIdentity module, IRuntimeInfo runti
public async Task<ICommand> PrepareUpdateAsync(IModule module, IRuntimeInfo runtimeInfo)
{
ICommand prepareUpdate = await this.commandFactory.PrepareUpdateAsync(module, runtimeInfo);
return new ExcecutionPrerequisiteCommand(prepareUpdate);
return new ExecutionPrerequisiteCommand(prepareUpdate);
}

public Task<ICommand> UpdateAsync(IModule current, IModuleWithIdentity next, IRuntimeInfo runtimeInfo)
Expand Down Expand Up @@ -62,4 +62,4 @@ public Task<ICommand> WrapAsync(ICommand command)
return this.commandFactory.WrapAsync(command);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Edgelet.Commands
using Microsoft.Azure.Devices.Edge.Agent.Core.PlanRunner;
using Microsoft.Azure.Devices.Edge.Util;

public class ExcecutionPrerequisiteCommand : ICommand
public class ExecutionPrerequisiteCommand : ICommand
{
readonly ICommand innerCommand;

public ExcecutionPrerequisiteCommand(ICommand command)
public ExecutionPrerequisiteCommand(ICommand command)
{
this.innerCommand = command;
}
Expand All @@ -29,7 +29,7 @@ public async Task ExecuteAsync(CancellationToken token)
}
catch (Exception e)
{
throw new ExcecutionPrerequisiteException("Failed to execute ExecutionPrerequisite command", e);
throw new ExecutionPrerequisiteException("Failed to execute ExecutionPrerequisite command", e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ Mock<ICommand> MakeMockCommandThatThrowsExecutionPrerequisiteException(string id
var command = new Mock<ICommand>();
command.SetupGet(c => c.Id).Returns(id);
command.Setup(c => c.ExecuteAsync(It.IsAny<CancellationToken>()))
.ThrowsAsync(new ExcecutionPrerequisiteException("No donuts for you"));
.ThrowsAsync(new ExecutionPrerequisiteException("No donuts for you"));
command.Setup(c => c.Show())
.Returns(id);
return command;
Expand Down
6 changes: 3 additions & 3 deletions edgelet/build/linux/package-mariner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ export TZ=UTC

# need to use preview repo for the next 2 weeks untill mariner 2.0 gets moved to prod
case "${MARINER_RELEASE}" in
'1.0-stable')
'1.0'*)
UsePreview=n
MarinerIdentity=mariner1
PackageExtension="cm1"
;;
'2.0-stable')
'2.0'*)
UsePreview=n
MarinerIdentity=mariner2
PackageExtension="cm2"
Expand Down Expand Up @@ -159,4 +159,4 @@ pushd toolkit
# Build Mariner RPM packages
make build-packages PACKAGE_BUILD_LIST="aziot-edge" SRPM_FILE_SIGNATURE_HANDLING=update USE_PREVIEW_REPO=$UsePreview CONFIG_FILE= -j$(nproc)
popd
popd
popd

0 comments on commit f11a09a

Please sign in to comment.