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

Publish APIs #3544

Open
wants to merge 224 commits into
base: feature/6766
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
fe4955a
New publish APIs
jmendeza Feb 21, 2024
f671e4d
API rename to publish/dependencies. Tweaks to publish package request
jmendeza Feb 22, 2024
440ad18
requestApproval parameter for publish API
jmendeza Feb 23, 2024
0f7a92f
Add publishAll flag to publish API. Add submitter param filter to get…
jmendeza Feb 26, 2024
9b30d09
repository/log API
jmendeza Mar 5, 2024
cc15cd6
API specs: publish trigger, package retry, package clone
jmendeza Mar 7, 2024
78464b6
Publishing progress related responses
jmendeza Mar 8, 2024
40df822
Remove non-implemented/removed APIs from spec
jmendeza May 7, 2024
d6f0e50
Deprecate old publish APIs
jmendeza May 7, 2024
1c995f7
New Publisher db tables. Remove old tables.
jmendeza May 8, 2024
f05ebe8
Remove old publisher-related code
jmendeza May 9, 2024
7253fe9
Remove item previous_path
jmendeza May 9, 2024
c077967
Make published repo bare
jmendeza May 9, 2024
7e9a4f1
Studio API tweaks
jmendeza May 9, 2024
97dcefd
New publish API methods skeleton. Publish services refactor
jmendeza May 9, 2024
0644c6a
Publish all package submission
jmendeza May 10, 2024
72e6e6f
PublishItem DAO
jmendeza May 14, 2024
2c27361
PublishDAO updates
jmendeza May 15, 2024
28b423a
ItemTargetDAO. Publishing package submission updates
jmendeza May 15, 2024
b3d2db8
Include children in publishing package when requested
jmendeza May 15, 2024
4039efb
[develop] Update write content examples dev (#3547)
alhambrav May 16, 2024
188e6e5
Publish-all for any request if site has not been published. API tweaks
jmendeza May 16, 2024
51db8bc
API 1 commits and bulk-golive tweaked and marked as deprecated. Bulk …
jmendeza May 16, 2024
bbf89f9
Use custom csrf handler to handle raw csrf value (#3548)
phuongnq May 17, 2024
bbc9701
Publish calculation package tweaks: get soft deps of children paths
jmendeza May 17, 2024
e2ada3d
Publish APIs tweaks. Publish dependencies calculation
jmendeza May 17, 2024
3fd1489
Fixed tabulation in Studio OAS for unlock API (#3549)
Euquimides May 20, 2024
fdf46a0
Merge branch 'develop' of https://github.com/craftercms/studio into f…
jmendeza May 20, 2024
54e6bd3
Remove 'notifySubmitter' option from APIs and publish package
jmendeza May 20, 2024
21db6d7
Drop the 'publish package retry' API in favor or using publish/packag…
jmendeza May 20, 2024
c68eb0b
Dependency services refactor
jmendeza May 21, 2024
ba2bb02
Hard dependencies. API spec tweaks
jmendeza May 22, 2024
df62858
Workflow events for publish submission
jmendeza May 24, 2024
b3ca697
Transactional publishing package+items insert
jmendeza May 24, 2024
5df85b1
Simplify ItemDAO result mappers. Update queries to remove references …
jmendeza May 24, 2024
561ae02
Event-based publishing
jmendeza May 28, 2024
1c4b108
Upgrade to AWS SDK v2 (#3545)
phuongnq May 29, 2024
8d3279e
Initial publish tweaks. Publish all (WIP)
jmendeza May 29, 2024
1a13c9b
Do NOT publish-all when publishing the root
jmendeza May 30, 2024
3b2fa4f
javadoc tweaks
jmendeza May 30, 2024
f640d90
Hard dependency calculation tweaks. Delete publish_package records on…
jmendeza May 30, 2024
126b83f
Initial publish tweaks. last_published_on update
jmendeza May 30, 2024
6341877
ItemTargetDAO operations
jmendeza May 30, 2024
46836f2
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza May 30, 2024
1560e5a
Fix getDependentItems permisison from delete to read (#3553)
phuongnq May 31, 2024
12e410d
Add packageType to PublishPackage. Tweaks to package submission. Simp…
jmendeza Jun 3, 2024
6ba1411
Populate item_publish_item table
jmendeza Jun 4, 2024
1ec99e7
Publish all processing (WIP)
jmendeza Jun 6, 2024
ae705ec
Move PublishItemTO implementations to impl package
jmendeza Jun 6, 2024
719f01a
Add System.getenv whitelist (#3552)
phuongnq Jun 6, 2024
f4d0404
Audit session timeout event (#3556)
phuongnq Jun 7, 2024
f004441
Publish all processing and commit-tree
jmendeza Jun 7, 2024
4059f40
'item-list' publish package processing (WIP). DB updates
jmendeza Jun 8, 2024
9186951
commit resolution when there are deleted files (#3559)
phuongnq Jun 10, 2024
a8aae6e
updateRef method
jmendeza Jun 10, 2024
2065bb7
Publish item-list: update index and write tree
jmendeza Jun 10, 2024
f9bbbce
Publish item-list: update-index for deletes
jmendeza Jun 11, 2024
bb311a2
Tweaks to publish package submission
jmendeza Jun 11, 2024
49d821b
UM to Improve the Add Components panel in XB (#3562)
phuongnq Jun 12, 2024
fa8d383
UM to fix last_updated_on default to NULL (#3563)
phuongnq Jun 12, 2024
d4271f3
Tweaks to publish package processing to reuse code
jmendeza Jun 11, 2024
ddc2312
Refactor ContentRepository and related interfaces
jmendeza Jun 12, 2024
8c3c335
Fix repo path when publishing blobs. Fix tests.
jmendeza Jun 13, 2024
33a3720
Solve warnings
jmendeza Jun 14, 2024
d1b09ed
BlobAwareContentRepository publish unit tests
jmendeza Jun 14, 2024
f1c29fa
Transaction support. Utility function to run a piece of code in a tra…
jmendeza Jun 14, 2024
b4de725
Publisher: updated DB to support including more information about err…
jmendeza Jun 19, 2024
8d1729a
Handle enabling staging after initial publish
jmendeza Jun 19, 2024
85c22e8
Publisher: publish each target in its own transaction
jmendeza Jun 19, 2024
d9bba92
PublishPackageTO to simplify target-specific operations on the Publis…
jmendeza Jun 20, 2024
aefc457
Fix publish commit comment
jmendeza Jun 20, 2024
322766a
Fix blob publishing when there are no deletes (or no updates)
jmendeza Jun 20, 2024
904a084
Publisher states DAO updates to be able to set on/off specific bits
jmendeza Jun 20, 2024
8a62f3f
Fix PublishPackage mybatis mapping of siteId property
jmendeza Jun 20, 2024
fc92d5d
Publish progress states updates. Fix test
jmendeza Jun 20, 2024
f38cd58
PublishPackage completed with errors state
jmendeza Jun 20, 2024
0f6002d
Update '/workflow/request_publish' API to work with the new system. A…
jmendeza Jun 21, 2024
444acda
Update items states when submitting publish package
jmendeza Jun 21, 2024
2096749
Cancel outstanding packages after a publish all: fix site_id param an…
jmendeza Jun 21, 2024
1b7b21e
Replace and remove DASHBOARD permissions (#3565)
phuongnq Jun 23, 2024
c4c8838
Tweaks to item and package state updates
jmendeza Jun 24, 2024
2e4b628
Publish package publishedOn moved to package level processing
jmendeza Jun 25, 2024
8c12882
Publish error handling
jmendeza Jun 25, 2024
b16012b
Publish transaction error logging tweaks and cleanup
jmendeza Jun 26, 2024
88200fa
Fix new items not retrieving the ids when inserting list
jmendeza Jun 27, 2024
7a2ef4b
Fix hard-dependencies site filtering
jmendeza Jun 27, 2024
0cee5d6
Result reporting on AWS copy list of blobs
jmendeza Jun 27, 2024
8184a98
Missing error log
jmendeza Jun 28, 2024
cf13991
Initialize stage item_target records on first staging publish. DB ren…
jmendeza Jun 28, 2024
0ae7631
Update item_target previous_path on item move
jmendeza Jul 4, 2024
1d8f640
Clear published previous_path after a package is complete
jmendeza Jul 5, 2024
1e464ba
Remove unused code
jmendeza Jul 5, 2024
6dd56ac
Break down large query into smaller pieces
jmendeza Jul 5, 2024
da9e16a
Migrate to new deleteSite V2 service
jmendeza Jul 5, 2024
b3c0bdd
Duplicate site to duplicate item_target table
jmendeza Jul 5, 2024
bc9b713
Children API total count inconsistencies: wrong param order fix (#3566)
jmendeza Jul 8, 2024
c2a55d0
Fix Enabled/disable publisher API for new publisher
jmendeza Jul 8, 2024
9c94301
Reorganize WorkflowService impl/internal impl
jmendeza Jul 8, 2024
45ec8bc
Remove unused code
jmendeza Jul 8, 2024
a582566
ContentItemTO metadata for compatibility. Fix edit form with new publ…
jmendeza Jul 9, 2024
265ae09
Get childen by path query to parameterize packageState and approvalSt…
jmendeza Jul 9, 2024
8bc7b77
Fix available actions when 'require peer review' is enabled
jmendeza Jul 9, 2024
f05876d
Added logging for published items
jmendeza Jul 10, 2024
5752249
Fix initial publish package state
jmendeza Jul 10, 2024
4d04889
Publisher audit/activity tweaks
jmendeza Jul 10, 2024
71cd4fa
Publisher-related components synchronization/locking
jmendeza Jul 10, 2024
1a5d992
Content services minor refactor
jmendeza Jul 12, 2024
3e078aa
Support upgrade from more recent versions of 4.1.x (#3567)
jmendeza Jul 16, 2024
98172c5
Remove sync-from-repo dependency on audit table: new processed_commit…
jmendeza Jul 18, 2024
d06c597
Apply keyword filtering to level descriptor (#3570)
jmendeza Jul 18, 2024
e1939d5
Use name param if available on s3 upload (#3572)
jmendeza Jul 18, 2024
c303c4a
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Jul 18, 2024
ef86750
Fix SitesService tests
jmendeza Jul 18, 2024
ec109ca
Update Studio DB version (#3575)
jmendeza Jul 19, 2024
1005001
Add interface to write content and notify the subscribers (#3573)
phuongnq Jul 19, 2024
fcd0c25
Adjust logic of locked item by checking the state (#3576)
phuongnq Jul 22, 2024
92e53d2
Publish DELETE operations
jmendeza Jul 23, 2024
ff37ff9
Add parameter to set cloudformation capabilities (#3578)
phuongnq Jul 25, 2024
748fe17
Updated CI configuration.
sumerjabri Jul 25, 2024
ce8c34d
Merge branch 'develop' of https://github.com/craftercms/studio into d…
sumerjabri Jul 25, 2024
def5d99
CI updates.
sumerjabri Jul 25, 2024
be43d73
Prevent processedCommits insert attempt for global site
jmendeza Jul 25, 2024
b8331e6
CI updates.
sumerjabri Jul 25, 2024
8dc8f13
Fix clearPreviousPathForCompletePackage to filter by site
jmendeza Jul 25, 2024
3f0b1c3
Add rate limit for API to change password (#3579)
phuongnq Jul 29, 2024
eca04bc
Removed unused/obsolete code
jmendeza Jul 29, 2024
833ad01
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Jul 31, 2024
a2312a1
Remove repo locks from ContentService. Add sync-from-repo lock to Pub…
jmendeza Aug 1, 2024
d4f8c83
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Aug 1, 2024
989a05e
Validate create folder API (#3582)
phuongnq Aug 5, 2024
6c3abf3
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Aug 5, 2024
8aa3176
Remove unnecessary sync-from-repo task locking
jmendeza Aug 5, 2024
4c103f3
Remove unused dependencies code
jmendeza Aug 5, 2024
00c1227
Renamed flag to keep track of renamed content even when previous_path…
jmendeza Aug 5, 2024
e97a3c7
Remove .keep files from published
jmendeza Aug 5, 2024
13da4a3
Code cleanup. Workflow cancellation method wiring
jmendeza Aug 7, 2024
45bf3a4
Clean API v1 calculate-dependencies (#3586)
phuongnq Aug 12, 2024
dfbc9b0
Lock packages when publishing. Cancel workflow on sync-from-repo
jmendeza Aug 9, 2024
a965e9c
Removed unused code related to submitted items and dependencies.
sumerjabri Aug 12, 2024
babdc08
Merge branch 'develop' of https://github.com/craftercms/studio into d…
sumerjabri Aug 12, 2024
2a9b344
Removed unused code related to submitted items and dependencies. (#3587)
sumerjabri Aug 12, 2024
3d42398
Merge branch 'develop' of https://github.com/craftercms/studio into d…
sumerjabri Aug 12, 2024
d4097b9
Replace net.sf.json:json-lib with Jackson Databind. Remove unused cod…
jmendeza Aug 13, 2024
accb190
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Aug 13, 2024
e2704fd
Removed outdated XML elements from content items.
sumerjabri Aug 14, 2024
f549086
Reformatted ui.xml to be more readable.
sumerjabri Aug 14, 2024
6c9c9b6
Fail content write when item is in publish queue
jmendeza Aug 14, 2024
1b722dd
Skip StudioPublishingAPIAccessDecisionVoter request parsing and votin…
jmendeza Aug 15, 2024
3cc0ed5
Do not trigger SyncFromRepo event when write to global repo (#3589)
jmendeza Aug 15, 2024
ed46afe
Delete JWT Tokens associated with deleted users (#3591)
phuongnq Aug 15, 2024
9032808
Update processed_commits right after performing a commit to prevent d…
jmendeza Aug 15, 2024
2c631d2
Check if there are content children in the publishing queue when movi…
jmendeza Aug 15, 2024
f7e0a97
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Aug 15, 2024
699a370
Do not insert processed_commits record if the site does not exist (cr…
jmendeza Aug 16, 2024
5e9cddc
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Aug 19, 2024
165deca
Check if there are content children in the publishing queue when rena…
jmendeza Aug 19, 2024
c11aacb
Preserve IN_WORKFLOW/SCHEDULED state bits after on package complete i…
jmendeza Aug 19, 2024
b1b765e
API spec updates to include 409 response for conflict with publish queue
jmendeza Aug 20, 2024
b3fd38f
Cancel publishing packages API update to work with new packages with …
jmendeza Aug 20, 2024
2ec3011
Update cancel workflow by path to work with new cancel package and it…
jmendeza Aug 21, 2024
9a29a5c
Code cleanup
jmendeza Aug 21, 2024
2c537cf
CI fixes.
sumerjabri Aug 21, 2024
36f097b
Preserve DESTINATION state bit on package complete/cancel if there ar…
jmendeza Aug 21, 2024
f6061bb
Move cancel packages by path to publish service
jmendeza Aug 21, 2024
56ae681
Retire old unused delete method
jmendeza Aug 21, 2024
2d10a06
Handle publish package not found scenario
jmendeza Aug 22, 2024
c72cbe5
Add rate limit to the API /studio/api/2/users/forgot_password (#3596)
phuongnq Aug 22, 2024
2183e6d
Fail pull_from_remote when would-be-merged changes conflict with the …
jmendeza Aug 23, 2024
852ebf8
Refactored ui.xml in all blueprints.
sumerjabri Aug 26, 2024
0949f28
Enable/disable publisher API v2
jmendeza Aug 26, 2024
8c1f5a4
Reuse updatePackageState method to cancel packages in publishDao
jmendeza Aug 28, 2024
629d541
Switched the UI to the develop branch instead of the feature/5977 Spr…
sumerjabri Aug 28, 2024
28c9f52
Audit package cancel on sync from repo. Audit log tweaks
jmendeza Aug 28, 2024
21c0a2b
Simplify PublishPackage updates in PublishDao
jmendeza Aug 29, 2024
abadd9c
Modify BP policy to match with default validator (#3599)
phuongnq Aug 29, 2024
454140a
Sync from repo cancel packages updates
jmendeza Aug 29, 2024
10a9c34
Fixed DB error when uploading an asset twice. (#3600)
sumerjabri Aug 29, 2024
f4e5910
Set content-type when uploading asset to S3 bucket (#3601)
jmendeza Aug 30, 2024
9cd3b8b
Make cancel publishing package API accept a single package id. Add co…
jmendeza Aug 30, 2024
cdd60bb
Reject publish package API. Move reject/cancel to workflow service. A…
jmendeza Sep 2, 2024
c15e4cd
Use jakarta MimetypesFileTypeMap (#3602)
phuongnq Sep 3, 2024
96d31d3
Grant unlock permission to lockOwner even if item state is not locked…
jmendeza Sep 3, 2024
82b0597
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Sep 3, 2024
14d4c19
Validate dependency target paths (#3605)
jmendeza Sep 5, 2024
055f067
Prevent wrong commit id in audit table when making multiple write-con…
jmendeza Sep 5, 2024
be6c7de
Do not try to unlock already unlocked content on content-write (#3609)
jmendeza Sep 6, 2024
2041a90
Add site policy action type EDIT (#3610)
phuongnq Sep 6, 2024
866bd56
Unescape regex-resolved dependency path. Escape single quote when val…
jmendeza Sep 9, 2024
d36bb33
Optimize permission mapping (#3613)
phuongnq Sep 10, 2024
4a1ea47
Trigger notifications on workflow events
jmendeza Sep 4, 2024
8b85512
Package submission workflow notification
jmendeza Sep 11, 2024
069ca45
Package rejection/approval workflow notification
jmendeza Sep 11, 2024
006e16f
Workflow notification deprecated variables
jmendeza Sep 11, 2024
0d88ca1
Workflow approve to support editing package scheduled date
jmendeza Sep 11, 2024
458e3a7
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Sep 12, 2024
a2b084f
Fix NPE on notification message
jmendeza Sep 12, 2024
fd7bdac
Add UPDATE action to publish item
jmendeza Sep 12, 2024
26f297c
ItemDAO.getItemStates bulk operation to get item states by path
jmendeza Sep 12, 2024
22e3f85
Dashboard publish history and publish stats API
jmendeza Sep 13, 2024
d6e6bc6
Deprecate /publish/history API (#3616)
jmendeza Sep 13, 2024
fa796e5
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Sep 13, 2024
a5c0132
Remove deprecated /api/2/publish/history API
jmendeza Sep 13, 2024
4017d89
Fix package details total item count
jmendeza Sep 13, 2024
138667d
Remove old workflow/affected_paths API, added new workflow/affected_p…
jmendeza Sep 13, 2024
46c04f5
Make role names, group names, and permission names case-insensitive (…
phuongnq Sep 16, 2024
2284ac5
List/get/details APIs for publishing package
jmendeza Sep 17, 2024
1f9527b
Publish/Workflow API updates to standardize API Urls
jmendeza Sep 17, 2024
35adaf2
Rename publish DAL methods to be consistent. Cleanup and remove redun…
jmendeza Sep 18, 2024
a9e414d
Change package id parameter type
jmendeza Sep 18, 2024
b03d063
Cluster/upgrade related fixes (#3620)
jmendeza Sep 25, 2024
368abd1
Update the RTE configuration to work with TinyMCE 7 (#3622)
phuongnq Oct 1, 2024
82808be
Optimize site creation generated SQL (#3621)
jmendeza Oct 2, 2024
984f849
Split duplicate site operations to reduce timeout (#3623)
jmendeza Oct 3, 2024
c674ef6
Switched from model to contentModel or templateModel depending on use…
sumerjabri Oct 3, 2024
bf5faf0
Configurable timeout for deployer http requests (#3625)
jmendeza Oct 3, 2024
633e648
Unlocking a locked item should throw a warning in the logs rather tha…
phuongnq Oct 4, 2024
af9f9b1
Call getClient() on every copy operation to prevent expired client on…
jmendeza Oct 7, 2024
1958073
Other calls to getClient() to prevent client from expiring in the cac…
jmendeza Oct 8, 2024
b5175be
Lock with multiple lock keys with the order of the parameters (#3630)
phuongnq Oct 15, 2024
68cc29a
Ignore S3 missing object on site duplicate. Fail duplicate when faili…
jmendeza Oct 15, 2024
40d3a56
Change log level for NoSuchElementException (#3632)
jmendeza Oct 15, 2024
69cad98
Simplify locking of sync and publish operations (#3633)
jmendeza Oct 16, 2024
817cc79
Merge remote-tracking branch 'upstream/develop' into feature/6766
jmendeza Oct 17, 2024
e2ce733
Publisher-related API spec updates
jmendeza Oct 24, 2024
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
1,050 changes: 574 additions & 476 deletions src/main/api/studio-api.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public final class StudioConstants {
public static final String GLOBAL_REPOSITORY_GIT_LOCK = "GLOBAL_REPOSITORY_GIT_LOCK";
public static final String SITE_SANDBOX_REPOSITORY_GIT_LOCK = "{site}_SANDBOX_REPOSITORY_GIT_LOCK";
public static final String SITE_SYNC_FROM_REPOSITORY_GIT_LOCK = "{site}_SYNC_FROM_REPO_LOCK";
public static final String SITE_PUBLISHING_OR_PROCESSING_LOCK = "{site}_PUBLISHING_PROCESSING_LOCK";
public static final String SITE_PUBLISHED_REPOSITORY_GIT_LOCK = "{site}_PUBLISHED_REPOSITORY_GIT_LOCK";
public static final String STUDIO_CLOCK_EXECUTOR_SITE_LOCK = "{site}_STUDIO_CLOCK_EXECUTOR_SITE_LOCK";

Expand Down
161 changes: 0 additions & 161 deletions src/main/java/org/craftercms/studio/api/v1/dal/PublishRequest.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
import org.craftercms.commons.crypto.CryptoException;
import org.craftercms.studio.api.v1.exception.ContentNotFoundException;
import org.craftercms.studio.api.v1.exception.ServiceLayerException;
import org.craftercms.studio.api.v1.exception.SiteNotFoundException;
import org.craftercms.studio.api.v1.exception.repository.InvalidRemoteUrlException;
import org.craftercms.studio.api.v1.service.deployment.DeploymentException;
import org.craftercms.studio.api.v1.to.RemoteRepositoryInfoTO;
import org.craftercms.studio.api.v1.to.VersionTO;
import org.craftercms.studio.api.v2.exception.publish.PublishException;

import java.io.InputStream;
import java.util.List;
Expand Down Expand Up @@ -240,10 +241,8 @@ default Map<String, String> moveContent(String site, String fromPath, String toP
* @param author author
* @param comment comment
*
* @throws DeploymentException deployment error
*/
void initialPublish(String site, String sandboxBranch, String environment, String author, String comment)
throws DeploymentException;
void initialPublish(String site, String sandboxBranch, String environment, String author, String comment) throws SiteNotFoundException, PublishException;

/**
* Get last commit id from repository for given site.
Expand Down

This file was deleted.

Loading