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 rebase error
  • Loading branch information
jiangpengcheng committed Jun 3, 2021
commit f2b348a589b5f92c95d825988aba1989f4741a0f
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,12 @@ case class WhiskActionVersionList(namespace: EntityPath,
versions: List[SemVer],
defaultVersion: Option[SemVer]) {
def matchedDocId(version: Option[SemVer]): Option[DocId] = {
version match {
case Some(ver) =>
(version, defaultVersion) match {
case (Some(ver), _) =>
Some(DocId(s"$namespace/$name@$ver"))
case None if defaultVersion.nonEmpty =>
Some(DocId(s"$namespace/$name@${defaultVersion.get}"))
case None if versions.nonEmpty =>
case (None, Some(default)) =>
Some(DocId(s"$namespace/$name@$default"))
case (None, None) if versions.nonEmpty =>
Some(DocId(s"$namespace/$name@${versions.max}"))
case _ =>
None
Expand Down Expand Up @@ -431,16 +431,7 @@ object WhiskActionVersionList extends MultipleReadersSingleWriterCache[WhiskActi
implicit transId: TransactionId,
ec: ExecutionContext): Future[Option[DocId]] = {
get(action, datastore).map { res =>
version match {
case Some(_) =>
Some(DocId(action.copy(version = version).asString))
case None if res.defaultVersion.nonEmpty =>
Some(DocId(action.copy(version = res.defaultVersion).asString))
case None if res.versions.nonEmpty =>
Some(DocId(action.copy(version = Some(res.versions.max)).asString))
case _ =>
None
}
res.matchedDocId(version)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ trait WhiskActionsApi extends WhiskCollectionAPI with PostActionActivation with

onComplete(deleteFuture) {
case Success(entities) =>
complete(OK, entities.last)
val versions = entities.map(_.version).mkString(",")
complete(OK, s"[DEL] entity ${entities.last.fullyQualifiedName(false)} for versions $versions")
case Failure(t: NoDocumentException) =>
logging.debug(this, s"[DEL] entity does not exist")
terminate(NotFound)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ object InvokerHealthManager {
action.rev,
healthActionIdentity,
ActivationId.generate(),
docInfo.id,
ControllerInstanceId("health"),
blocking = false,
content = None))
Expand Down