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

Implement Action Versioning #4986

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1189caf
Implement action versioning
jiangpengcheng Sep 15, 2020
8409b85
Fix tests
jiangpengcheng Sep 28, 2020
7d72c53
Make SemVer sortable
jiangpengcheng Sep 29, 2020
595df67
Updates:
jiangpengcheng Oct 9, 2020
1b2088b
Allow to replace specify version
jiangpengcheng Oct 10, 2020
171b9dc
Fix bug
jiangpengcheng Oct 10, 2020
e69240a
Implement action-version view for memoryDB and cosmosDB
jiangpengcheng Oct 12, 2020
9f5c1d8
Fix view bug
jiangpengcheng Oct 13, 2020
5d041c4
Fix DocumentHandlerTests
jiangpengcheng Oct 13, 2020
a880b97
Ensure data consistency
jiangpengcheng Oct 29, 2020
d1b2c54
Add deleteAll parameter for action#remove
jiangpengcheng Oct 29, 2020
2b1c4e8
Add deleteOld parameter for action#create
jiangpengcheng Oct 29, 2020
e030b4b
Revert "Allow to replace specify version"
jiangpengcheng Nov 3, 2020
4d0e220
add default version feature
jiangpengcheng Nov 3, 2020
af0d7c2
Some updates:
jiangpengcheng Nov 11, 2020
5e4bc9f
Fix format style
jiangpengcheng Nov 11, 2020
4dc8147
Fix test
jiangpengcheng Nov 13, 2020
ef1711c
Remove some useless code
jiangpengcheng Nov 16, 2020
5278fdc
Fix bug
jiangpengcheng Nov 16, 2020
f2b348a
Fix rebase error
jiangpengcheng May 8, 2021
becdb02
Fix tests error
jiangpengcheng May 8, 2021
6fe1d7f
Fix tests
jiangpengcheng May 8, 2021
a3939ed
Use version mappings to get doc id from an version
jiangpengcheng May 10, 2021
fc564c9
Update some return errors
jiangpengcheng May 12, 2021
9fad6e3
Rebase master
jiangpengcheng May 12, 2021
0205d2e
Fix rebase errors
jiangpengcheng Jun 3, 2021
54cb3de
Merge branch 'master' into feature/implement_code_versioning
bdoyle0182 Feb 15, 2023
6a41968
Update Actions.scala
bdoyle0182 Feb 15, 2023
482c05e
fix compilation w/ new scheduler code
Feb 15, 2023
cc56908
fix versioned action read on fpcs invoker
Feb 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix compilation w/ new scheduler code
  • Loading branch information
Brendan Doyle committed Feb 15, 2023
commit 482c05e245d49abeffadf30ca5073dc4c467e87c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import org.apache.openwhisk.core.database.{
ArtifactStore,
CacheChangeNotification,
DocumentFactory,
NoDocumentException,
EvictionPolicy,
MultipleReadersSingleWriterCache,
NoDocumentException,
StaleParameter,
WriteTime
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ trait WhiskActionsApi extends WhiskCollectionAPI with PostActionActivation with
entitlementProvider.check(user, content.exec))
} yield (checkAdditionalPrivileges, checkLimits)


onComplete(check) {
case Success(_) =>
onComplete(WhiskActionVersionList.get(entityName, entityStore, false)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ class FPCPoolBalancer(config: WhiskConfig,
val metadata = ExecutableWhiskActionMetaData(
WarmUp.warmUpAction.path,
WarmUp.warmUpAction.name,
DocId(WarmUp.warmUpAction.asString),
CodeExecMetaDataAsString(manifest, false, entryPoint = None))
CreateQueue(
WarmUp.warmUpActionIdentity.namespace.name.asString,
Expand Down
25 changes: 24 additions & 1 deletion tests/dat/actions/zippedaction/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ class ActivationClientProxyTests
val timeout = 20.seconds

val log = logging

val testNamespace = "actionSpace"
val testActionName = "actionName"
val exec = CodeExecAsString(RuntimeManifest("actionKind", ImageName("testImage")), "testCode", None)
val action = ExecutableWhiskAction(EntityPath("actionSpace"), EntityName("actionName"), exec)
val action = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testActionName), DocId(s"$testNamespace/$testActionName@0.0.1"), exec)
val fqn = action.fullyQualifiedName(true)
val rev = action.rev
val schedulerHost = "127.17.0.1"
Expand All @@ -82,6 +83,7 @@ class ActivationClientProxyTests
action.rev,
Identity(Subject(), Namespace(invocationNamespace, uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set.empty),
ActivationId.generate(),
action.docId,
ControllerInstanceId("0"),
blocking = false,
content = None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class FunctionPullingContainerProxyTests

val memoryLimit = 256.MB

val action = ExecutableWhiskAction(EntityPath("actionSpace"), EntityName("actionName"), exec)
val action = ExecutableWhiskAction(EntityPath("actionSpace"), EntityName("actionName"), DocId("actionSpace/actionName@0.0.1"), exec)

val fqn = FullyQualifiedEntityName(action.namespace, action.name, Some(action.version))

Expand All @@ -135,6 +135,7 @@ class FunctionPullingContainerProxyTests
action.rev,
Identity(Subject(), Namespace(invocationNamespace, uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set.empty),
ActivationId.generate(),
action.docId,
ControllerInstanceId("0"),
blocking = false,
content = None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ class CreationJobManagerTests
val schedulerHost = "127.17.0.1"
val rpcPort = 13001
val exec = CodeExecAsString(RuntimeManifest("actionKind", ImageName("testImage")), "testCode", None)
val execAction = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testAction), exec)
val execAction = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testAction), DocId(s"$testNamespace/$testAction@0.0.1"), exec)
val execMetadata =
CodeExecMetaDataAsString(RuntimeManifest(execAction.exec.kind, ImageName("test")), entryPoint = Some("test"))
val revision = DocRevision("1-testRev")
val actionMetadata =
WhiskActionMetaData(
execAction.namespace,
execAction.name,
execAction.docId,
execMetadata,
execAction.parameters,
execAction.limits,
Expand Down Expand Up @@ -342,6 +343,7 @@ class CreationJobManagerTests
val actionMetaData = WhiskActionMetaData(
execAction.namespace,
execAction.name,
execAction.docId,
execMetadata,
execAction.parameters,
execAction.limits,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,7 @@ class MemoryQueueTests
WhiskActionMetaData(
action.namespace,
action.name,
action.docId,
execMetadata,
action.parameters,
action.limits,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ class MemoryQueueTestsFixture
val fqn = FullyQualifiedEntityName(EntityPath(testNamespace), EntityName(testAction), Some(SemVer(0, 0, 1)))
val revision = DocRevision("1-testRev")
val exec = CodeExecAsString(RuntimeManifest("actionKind", ImageName("testImage")), "testCode", None)
val action = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testAction), exec)
val action = ExecutableWhiskAction(EntityPath(testNamespace), EntityName(testAction), DocId(s"$testNamespace/$testAction@0.0.1"), exec)
val execMetadata =
CodeExecMetaDataAsString(RuntimeManifest(action.exec.kind, ImageName("test")), entryPoint = Some("test"))
val actionMetadata =
WhiskActionMetaData(
action.namespace,
action.name,
action.docId,
execMetadata,
action.parameters,
action.limits,
Expand Down Expand Up @@ -125,6 +126,7 @@ class MemoryQueueTestsFixture
BasicAuthenticationAuthKey(uuid, Secret()),
Set.empty),
ActivationId.generate(),
action.docId,
ControllerInstanceId("0"),
blocking = false,
content = None)
Expand Down Expand Up @@ -301,6 +303,7 @@ class MemoryQueueTestsFixture
BasicAuthenticationAuthKey(uuid, Secret()),
Set.empty),
ActivationId.generate(),
action.docId,
ControllerInstanceId("0"),
blocking = false,
content = None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class QueueManagerTests
val messageTransId = TransactionId(TransactionId.testing.meta.id)
val uuid = UUID()

val action = ExecutableWhiskAction(testEntityPath, testEntityName, testExec)
val action = ExecutableWhiskAction(testEntityPath, testEntityName, DocId(s"${testEntityPath.namespace}/${testEntityName.name}@0.0.1"), testExec)
val testLeaderKey = QueueKeys.queue(testInvocationNamespace, action.fullyQualifiedName(false), true)

val activationMessage = ActivationMessage(
Expand All @@ -97,6 +97,7 @@ class QueueManagerTests
BasicAuthenticationAuthKey(uuid, Secret()),
Set.empty),
ActivationId.generate(),
action.docId,
ControllerInstanceId("0"),
blocking = false,
content = None)
Expand Down Expand Up @@ -143,6 +144,7 @@ class QueueManagerTests
WhiskActionMetaData(
action.namespace,
action.name,
action.docid,
exec,
action.parameters,
action.limits,
Expand Down Expand Up @@ -458,6 +460,7 @@ class QueueManagerTests
BasicAuthenticationAuthKey(uuid, Secret()),
Set.empty),
ActivationId.generate(),
action.docId,
ControllerInstanceId("0"),
blocking = false,
content = None)
Expand Down Expand Up @@ -543,6 +546,7 @@ class QueueManagerTests
BasicAuthenticationAuthKey(uuid, Secret()),
Set.empty),
ActivationId.generate(),
action.docId,
ControllerInstanceId("0"),
blocking = false,
content = None)
Expand Down Expand Up @@ -1108,7 +1112,7 @@ class QueueManagerTests
val watcher = TestProbe()

val warmUpActionMetaData =
WhiskActionMetaData(warmUpAction.namespace.toPath, warmUpAction.name, testExecMetadata, version = semVer)
WhiskActionMetaData(warmUpAction.namespace.toPath, warmUpAction.name, DocId(s"${warmUpAction.namespace}/${warmUpAction.name}@0.0.1"), testExecMetadata, version = semVer)

val warmUpQueueCreationMessage =
CreateQueue(warmUpAction.namespace.toString, warmUpAction, testDocRevision, warmUpActionMetaData)
Expand Down