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

Iris: Lecture Ingestion Web hook #8512

Closed
wants to merge 260 commits into from
Closed
Show file tree
Hide file tree
Changes from 234 commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
ebaa97b
fix dialect
julian-christl Oct 30, 2023
2254b16
fixed jpql queries
julian-christl Oct 30, 2023
3471327
fix JPQL queries
julian-christl Nov 3, 2023
559d358
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Nov 3, 2023
eb0eb06
fix SecurityConfiguration
julian-christl Nov 3, 2023
25126e1
fix configurations
julian-christl Nov 3, 2023
e346c2e
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Nov 3, 2023
3000faa
fix configurations
julian-christl Nov 3, 2023
1228bdc
upgrade hibernate
julian-christl Nov 4, 2023
3ade8b0
generalise authentication
julian-christl Nov 4, 2023
a831089
fix client paths
julian-christl Nov 4, 2023
d57ecd4
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Nov 30, 2023
6b2bcf8
remove unnecessary annotations
julian-christl Nov 30, 2023
f684f2c
change some versions, fix some issues
julian-christl Nov 30, 2023
da9743d
fix lti javax issues
julian-christl Nov 30, 2023
650ab4e
bump run configuration
julian-christl Dec 1, 2023
d8ef0a5
fix nulling annotations
julian-christl Dec 1, 2023
934226b
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Dec 2, 2023
e1f2d00
replace competency query with specification
julian-christl Dec 2, 2023
ae06982
fix filter
julian-christl Dec 2, 2023
acc84d0
fix some test rest paths
julian-christl Dec 2, 2023
11ba29c
fix specification casting
julian-christl Dec 2, 2023
050aa99
fix OnlineCourseConfigurationServiceTest
julian-christl Dec 2, 2023
4dcd676
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Dec 4, 2023
f77df0a
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Dec 10, 2023
ae0dcce
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Dec 10, 2023
f93a8c3
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Dec 18, 2023
16a49bf
temporarily disable parallel tests
b-fein Dec 18, 2023
173fb27
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Dec 26, 2023
e9f8f91
Merge branch 'develop' into chore/spring-boot-3.x
krusche Jan 2, 2024
70fbeaa
improve jgit code
Jan 3, 2024
60e87bd
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Jan 14, 2024
1435020
fix merge issues
julian-christl Jan 14, 2024
4a2b2ff
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Jan 18, 2024
ba63aa6
fix merge issues
julian-christl Jan 18, 2024
c5816ae
replace lti13 library with newest version
Jan 19, 2024
4751177
fix attachment unit query
julian-christl Jan 19, 2024
bfa0ae7
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Jan 23, 2024
c87a219
Revert "temporarily disable parallel tests"
julian-christl Jan 25, 2024
fbe6939
[extract] fix learning path complex conditional query
julian-christl Jan 25, 2024
4912cc3
fix javax nullable etc imports
julian-christl Jan 25, 2024
deddab5
[extract] replace entity graphs on queries, add arch test
julian-christl Jan 25, 2024
535d1b7
[extract] fix queries
julian-christl Jan 25, 2024
2da7576
[extract] fix fetch
julian-christl Jan 26, 2024
1c9329b
[extract] replace entity graph with query
julian-christl Jan 26, 2024
807a92e
[extract] improve query
julian-christl Jan 26, 2024
eeac359
[extract] add more nodes
julian-christl Jan 26, 2024
464bed8
bump versions
julian-christl Jan 26, 2024
6111d13
bump versions
julian-christl Jan 26, 2024
2e2d659
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Jan 26, 2024
149d098
[extract] fix custom learning path repo
julian-christl Jan 26, 2024
4a8e5c3
[extract] fix jpql truthy syntax
julian-christl Jan 26, 2024
f36ef0d
[extract] remove trailing slash from test rest urls
julian-christl Jan 26, 2024
b7c8343
[extract] remove more trailing slashes
julian-christl Jan 26, 2024
adfd3a1
[extract] fix attachmentUnit order query
julian-christl Jan 27, 2024
6152fa9
[extract] fix message specs criteria
julian-christl Jan 27, 2024
f6755c5
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Feb 18, 2024
cd7c8d1
fix merged sql
julian-christl Feb 18, 2024
3102a0c
[extract] revert custom learning path query and add filter
julian-christl Feb 18, 2024
e046148
[extract] replace competency query with standard query and filter
julian-christl Feb 18, 2024
9680021
[extract] fix arch tests after merge
julian-christl Feb 18, 2024
76ccddf
fix prettier
julian-christl Feb 18, 2024
0c6d5e5
fix test and test startup
julian-christl Feb 18, 2024
9c10b96
Save work
Hialus Feb 19, 2024
245533e
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Feb 21, 2024
f56e16e
Save work
Hialus Feb 21, 2024
af38e6f
Save work
Hialus Feb 21, 2024
2e3e1d9
Save work
Hialus Feb 22, 2024
46a7728
Save work
Hialus Feb 22, 2024
cc8e2bb
remove fetch for eager loaded relations
julian-christl Feb 23, 2024
b3934e2
use spring transactional instead of javax
julian-christl Feb 23, 2024
70fcad6
fix architecture tests
julian-christl Feb 23, 2024
fcd81c0
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Feb 23, 2024
f9c1f84
revert dependency change
julian-christl Feb 23, 2024
895a631
improve test performance
julian-christl Feb 23, 2024
200d33a
fix notification queries
julian-christl Feb 23, 2024
2c84eb9
fix iris tests
julian-christl Feb 23, 2024
df194d2
fix occurrences for new zalando parameter handling
julian-christl Feb 24, 2024
0831b70
fix tutorial group test paths
julian-christl Feb 24, 2024
c6c213a
fix NotificationSettingsResourceIntegrationTest
julian-christl Feb 24, 2024
f15c3ce
Revert "fix occurrences for new zalando parameter handling"
julian-christl Feb 24, 2024
9ce0b93
Add DTOs according to API spec
Hialus Feb 26, 2024
0f33cd8
Adjust DTOs again
Hialus Feb 26, 2024
2546b00
Proper status update handling & make it compile
Hialus Feb 26, 2024
6825c3b
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Feb 26, 2024
f7ec671
ZonedDateTime -> Instant
Hialus Feb 27, 2024
ba5dd0e
FIx class naming
Hialus Feb 27, 2024
5090311
testsRepository -> testRepository
Hialus Feb 27, 2024
e03c33c
Merge remote-tracking branch 'origin/develop' into feature/iris/pyrisV2
bassner Feb 28, 2024
1d7dbed
Fix some Hibernate issues
Hialus Feb 28, 2024
e99141e
update jgit http server
julian-christl Feb 29, 2024
93927d8
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Feb 29, 2024
b03d2fd
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 1, 2024
2d5293e
remove extracted lti 1.0 classes
julian-christl Mar 1, 2024
e77d0fb
Improve token creation
Hialus Mar 1, 2024
624cd30
fix arch tests
julian-christl Mar 1, 2024
087f20d
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 1, 2024
c37b271
fix iris queries
julian-christl Mar 1, 2024
506de43
Merge branch 'develop' into chore/spring-boot-3.x
Strohgelaender Mar 2, 2024
e26daa7
fix build log stats tests
julian-christl Mar 2, 2024
da6ea81
fix null condition
julian-christl Mar 2, 2024
7005a65
exclude git from authentication
julian-christl Mar 2, 2024
e740dc4
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 2, 2024
f9a8fbf
Merge remote-tracking branch 'origin/develop' into feature/iris/pyrisV2
bassner Mar 4, 2024
a7c3931
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 6, 2024
041496d
fix response type
julian-christl Mar 6, 2024
6772406
fix client forwarding
julian-christl Mar 6, 2024
bf51a83
fix security config
julian-christl Mar 6, 2024
ba97bf5
fix deprecated config
julian-christl Mar 6, 2024
1c7a73c
fix postgresql dialect
julian-christl Mar 6, 2024
f0c1534
bump dependencies
julian-christl Mar 6, 2024
83b8084
fix push notification repo methods
julian-christl Mar 6, 2024
7481c68
fix mock verification
julian-christl Mar 6, 2024
18d7313
fix test request urls
julian-christl Mar 6, 2024
fa177b5
fix PlagiarismCaseIntegrationTest
julian-christl Mar 6, 2024
958a86e
fix TextAssessmentIntegrationTest
julian-christl Mar 6, 2024
eef6311
fix ExamIntegrationTest
julian-christl Mar 6, 2024
233122c
fix iris message creation
julian-christl Mar 6, 2024
83f4db3
fix more iris tests
julian-christl Mar 6, 2024
2eae5b0
fix several tests
julian-christl Mar 6, 2024
b99e13a
fix gradle variable
julian-christl Mar 7, 2024
d51c4d0
set project type to ordinal enumerated
julian-christl Mar 7, 2024
5c99ec4
update project type database type
julian-christl Mar 7, 2024
7a39cdb
fix and improve cypress URLs
julian-christl Mar 8, 2024
bda5818
update http dependencies
julian-christl Mar 8, 2024
3248e38
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 8, 2024
aedd2a7
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 9, 2024
739df8a
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 10, 2024
f87d6e6
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Mar 10, 2024
b17e840
fix test urls
julian-christl Mar 10, 2024
491f461
Merge branch 'feature/iris/pyrisV2' of https://github.com/ls1intum/Ar…
bassner Mar 11, 2024
d356d9b
Merge remote-tracking branch 'origin/develop' into feature/iris/pyrisV2
bassner Mar 11, 2024
cfc0e3d
Small adaption for initial stages
Hialus Mar 11, 2024
7eb914a
Merge remote-tracking branch 'origin/develop' into chore/spring-boot-3.x
b-fein Mar 13, 2024
42f536b
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 14, 2024
2a0de13
add annotation aliases
julian-christl Mar 14, 2024
5863e87
remove unused courseId filter for user GET
julian-christl Mar 14, 2024
cd3e10d
fix user test
julian-christl Mar 14, 2024
e4ec284
remove unused test code
julian-christl Mar 15, 2024
801b0d8
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 15, 2024
42d8318
additional small server dependency updates
Mar 17, 2024
aa7d8b0
fix spring cloud hazelcast issues
Mar 17, 2024
ac8d0ed
fix warnings by using newer spring cloud commons version
Mar 17, 2024
1522540
update more server dependencies
Mar 17, 2024
47e8ff1
add debug for prometheus ip addresses
julian-christl Mar 17, 2024
691fa42
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 17, 2024
f8f0ca7
revert org.json upgrade
julian-christl Mar 17, 2024
76cec92
revert all dependency upgrades
julian-christl Mar 17, 2024
41b22e8
SecurityConfiguration: Allow access to webapp files and management.in…
pzdr7 Mar 18, 2024
21bf873
Refactor (replace constructors with static method)
pzdr7 Mar 18, 2024
afb0efc
Simplify and rearrange security configuration
pzdr7 Mar 18, 2024
bf1cb73
add missing profile to new config
Mar 19, 2024
267edf7
remove SpaWebFilter.java and tests
julian-christl Mar 19, 2024
b4e3d3d
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 19, 2024
c345bf2
remove mysql8 dialect reference
julian-christl Mar 19, 2024
41d1045
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 20, 2024
982d735
Revert "remove SpaWebFilter.java and tests"
julian-christl Mar 20, 2024
1a472fd
Fix merge conflicts
julian-christl Mar 20, 2024
36e5e0a
`Development`: Fix error response parameters handling and remove unne…
coolchock Mar 20, 2024
02a778f
remove outdated test
julian-christl Mar 20, 2024
a10eec0
fix tutorial group tests
julian-christl Mar 20, 2024
6643512
Handle NoResourceFoundExceptions; return 404
pzdr7 Mar 20, 2024
731cf4a
add missing jgit resource
julian-christl Mar 20, 2024
45bbe58
exclude jgit repo from test coverage
julian-christl Mar 20, 2024
a297fbe
bump missed class count
julian-christl Mar 20, 2024
97d96ec
Merge branch 'develop' into chore/spring-boot-3.x
pzdr7 Mar 20, 2024
29390c7
Fix build error
pzdr7 Mar 20, 2024
17edacf
Merge branch 'develop' into chore/spring-boot-3.x
pzdr7 Mar 22, 2024
c8c7dc1
Hack: Provide RestTemplate beans to Eureka; Remove additional Jersey …
pzdr7 Mar 22, 2024
df5c85b
Adjust security config; permit access to web worker jsons
pzdr7 Mar 22, 2024
73168c6
Limit fetch depth to 3 to prevent large queries
pzdr7 Mar 23, 2024
aae9e45
primarily use authorization code grant type
julian-christl Mar 24, 2024
262fe15
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 24, 2024
884f34f
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 24, 2024
e7da041
Merge branch 'develop' into chore/spring-boot-3.x
julian-christl Mar 24, 2024
0c7bdf1
add distinct to retrieve relation
julian-christl Mar 25, 2024
97b9e19
revert ip log for prometheus access
julian-christl Mar 25, 2024
b5d411a
tryfix communication query
julian-christl Mar 25, 2024
cdd13c9
revert broken simplification
julian-christl Mar 26, 2024
f98c035
revert broken simplification
julian-christl Mar 26, 2024
a390969
fix query
julian-christl Mar 26, 2024
fc09d94
Reduce max_fetch_depth to 2
pzdr7 Mar 26, 2024
8f521cb
Merge branch 'develop' into chore/spring-boot-3.x
pzdr7 Mar 26, 2024
3d5e114
Merge branch 'chore/spring-boot-3.x' into feature/iris/pyrisV2
Hialus Mar 26, 2024
0be1cd2
javax -> jakarta
Hialus Mar 26, 2024
8d0517e
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 2, 2024
43db5c2
Small fixes
Hialus Apr 2, 2024
666e656
Fix server tests
Hialus Apr 2, 2024
a45cb86
Add missing `@Profile("iris")`
Hialus Apr 2, 2024
e8c105f
Add `@Profile("iris")` II.
Hialus Apr 2, 2024
ce856cc
Server style fixes
Hialus Apr 2, 2024
4cfd3a0
Server style fixes II.
Hialus Apr 2, 2024
61f2600
Implement Stephans feedback
Hialus Apr 2, 2024
94e65e7
Some test coverage stuff
Hialus Apr 2, 2024
ce8a938
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 4, 2024
b020cf5
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 4, 2024
b4cdd0e
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 4, 2024
1188328
Merge remote-tracking branch 'origin/feature/iris/pyrisV2' into featu…
Hialus Apr 5, 2024
41b8d2d
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 5, 2024
603f6bb
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 5, 2024
5b5c0e2
Remove settings in client
Hialus Apr 5, 2024
a18f275
Fix client tests
Hialus Apr 21, 2024
f64daa4
Merge branch 'refs/heads/develop' into feature/iris/pyrisV2
Hialus Apr 21, 2024
78a3a6b
Temporarily increase missed class limit
Hialus Apr 21, 2024
25a7426
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 21, 2024
af76bdf
Fix health indicator
Hialus Apr 21, 2024
c315465
Fix health indicator tests
Hialus Apr 21, 2024
c599545
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 22, 2024
5e2d9d4
Fix a small bug in the settings
Hialus Apr 22, 2024
531e07f
Fix client tests
Hialus Apr 22, 2024
f29e4b0
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 22, 2024
1fa2fa7
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 24, 2024
f923a7c
Convert PyrisStageDTO to a record
Hialus Apr 25, 2024
65a8608
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 25, 2024
6a5c1d3
Merge remote-tracking branch 'origin/develop' into feature/iris/pyrisV2
bassner Apr 26, 2024
734d4e4
Merge develop
Hialus Apr 28, 2024
0a0a3b3
Switch to records
Hialus Apr 28, 2024
dc65917
Merge branch 'develop' into feature/iris/pyrisV2
Hialus Apr 28, 2024
bdfaa6b
Remove useless file
Hialus Apr 29, 2024
3782322
Ingestion Webhook works, deletion addition of courses,lectures and le…
yassinsws Apr 30, 2024
07bd7c0
save this commit as a proof delete later
yassinsws Apr 30, 2024
0052bac
Optimize lecture resource webhook call
yassinsws May 1, 2024
c270380
IngestionWebhookJob was not added to git. Now added
yassinsws May 1, 2024
a4b086c
Fix Server tests
yassinsws May 1, 2024
0652010
Merge branch 'develop' into feature/iris/pyrisV2
Hialus May 1, 2024
8f07fa3
Address feedback
Hialus May 1, 2024
372f0b8
Temporarily adapt test coverage values again
Hialus May 1, 2024
79d9371
Address feedback
Hialus May 1, 2024
51716d7
Merge branch 'develop' into feature/iris/pyrisV2
bassner May 2, 2024
cffa903
fix merge
bassner May 2, 2024
cf169f1
fix client tests
bassner May 2, 2024
a62b82e
Timor requests
yassinsws May 2, 2024
72f73c1
Revert coverage adjustments
Hialus May 2, 2024
67e5f7a
Merge remote-tracking branch 'origin/feature/iris/pyrisV2' into featu…
Hialus May 2, 2024
444a472
fix style
yassinsws May 2, 2024
1e51fb9
Try fully reverting coverage to get actual value
Hialus May 2, 2024
7f05ffb
Add Pyris test, erase webhook call when lecture created.
yassinsws May 3, 2024
de6ab05
Added log info, for request sent for update
yassinsws May 3, 2024
f9fab7f
Added log info, for request sent for update/ deletion
yassinsws May 3, 2024
9009958
Merge branch 'develop' into feature/iris/pyrisV2
bassner May 3, 2024
0d5906e
Revert min ratio
bassner May 4, 2024
5c3286f
Merge branch 'develop' into feature/iris/pyrisV2
bassner May 4, 2024
ab733b8
Fix test and status update.
yassinsws May 4, 2024
57f1025
Implement Stephans feedback
Hialus May 6, 2024
df532cd
Fix missing JavaDoc
Hialus May 6, 2024
c35e0a7
Fix missing JavaDoc
Hialus May 6, 2024
af36966
Merge branch 'develop' into feature/iris/pyrisV2
Hialus May 6, 2024
7a49d5b
merge
yassinsws May 9, 2024
aab74ef
Merge remote-tracking branch 'origin/feature/iris/pyrisV2' into featu…
yassinsws May 9, 2024
85198db
add execute webhook to the pyris connector service
yassinsws May 10, 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
17 changes: 10 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,14 @@ jar {
private excludedClassFilesForReport(classDirectories) {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: [
"**/de/tum/in/www1/artemis/domain/**/*_*",
"**/de/tum/in/www1/artemis/config/migration/entries/**",
"**/org/eclipse/jgit/**",
"**/gradle-wrapper.jar/**"
]
exclude: [
"**/de/tum/in/www1/artemis/domain/**/*_*",
"**/de/tum/in/www1/artemis/config/migration/entries/**",
"**/de/tum/in/www1/artemis/service/connectors/pyris/dto/**",
"**/de/tum/in/www1/artemis/web/rest/iris/dto/**",
"**/org/eclipse/jgit/**",
"**/gradle-wrapper.jar/**"
]
)
}))
}
Expand Down Expand Up @@ -177,7 +179,8 @@ jacocoTestCoverageVerification {
counter = "CLASS"
value = "MISSEDCOUNT"
// TODO: in the future the following value should become less than 10
maximum = 25
// TODO: Temporarily increased, until Iris code editor feature is removed
maximum = 36
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.springframework.web.client.RestTemplate;

import de.tum.in.www1.artemis.config.auth.AthenaAuthorizationInterceptor;
import de.tum.in.www1.artemis.config.auth.IrisAuthorizationInterceptor;
import de.tum.in.www1.artemis.config.auth.PyrisAuthorizationInterceptor;
import de.tum.in.www1.artemis.service.connectors.gitlab.GitLabAuthorizationInterceptor;
import de.tum.in.www1.artemis.service.connectors.jenkins.JenkinsAuthorizationInterceptor;

Expand Down Expand Up @@ -77,8 +77,8 @@ public RestTemplate aeolusRestTemplate() {

@Bean
@Profile("iris")
public RestTemplate irisRestTemplate(IrisAuthorizationInterceptor irisAuthorizationInterceptor) {
return initializeRestTemplateWithInterceptors(irisAuthorizationInterceptor, createRestTemplate());
public RestTemplate pyrisRestTemplate(PyrisAuthorizationInterceptor pyrisAuthorizationInterceptor) {
return initializeRestTemplateWithInterceptors(pyrisAuthorizationInterceptor, createRestTemplate());
}

// Note: for certain requests, e.g. health(), we would like to have shorter timeouts, therefore we need additional rest templates, because
Expand Down Expand Up @@ -121,8 +121,8 @@ public RestTemplate veryShortTimeoutAthenaRestTemplate(AthenaAuthorizationInterc

@Bean
@Profile("iris")
public RestTemplate shortTimeoutIrisRestTemplate(IrisAuthorizationInterceptor irisAuthorizationInterceptor) {
return initializeRestTemplateWithInterceptors(irisAuthorizationInterceptor, createShortTimeoutRestTemplate());
public RestTemplate shortTimeoutPyrisRestTemplate(PyrisAuthorizationInterceptor pyrisAuthorizationInterceptor) {
return initializeRestTemplateWithInterceptors(pyrisAuthorizationInterceptor, createShortTimeoutRestTemplate());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@Component
@Profile("iris")
public class IrisAuthorizationInterceptor implements ClientHttpRequestInterceptor {
public class PyrisAuthorizationInterceptor implements ClientHttpRequestInterceptor {

@Value("${artemis.iris.secret-token}")
private String secret;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/de/tum/in/www1/artemis/domain/Lecture.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
import jakarta.persistence.OrderColumn;
Expand Down Expand Up @@ -53,7 +54,7 @@ public class Lecture extends DomainObject {
@JsonIgnoreProperties(value = "lecture", allowSetters = true)
private Set<Attachment> attachments = new HashSet<>();

@OneToMany(mappedBy = "lecture", cascade = CascadeType.ALL, orphanRemoval = true)
@OneToMany(mappedBy = "lecture", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
yassinsws marked this conversation as resolved.
Show resolved Hide resolved
@OrderColumn(name = "lecture_unit_order")
@JsonIgnoreProperties("lecture")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public abstract class IrisSession extends DomainObject {
@Column(name = "creation_date")
private ZonedDateTime creationDate = ZonedDateTime.now();

// TODO: This is only used in the tests -> Remove
public IrisMessage newMessage() {
var message = new IrisMessage();
message.setSession(this);
this.messages.add(message);
return message;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ default ProgrammingSubmission findFirstByParticipationIdAndCommitHashOrderByIdDe
@EntityGraph(type = LOAD, attributePaths = "results.feedbacks")
Optional<ProgrammingSubmission> findWithEagerResultsAndFeedbacksById(long submissionId);

@EntityGraph(type = LOAD, attributePaths = { "results", "results.feedbacks", "results.feedbacks.testCase", "results.feedbacks.longFeedbackText", "buildLogEntries" })
Optional<ProgrammingSubmission> findWithEagerResultsAndFeedbacksAndBuildLogsById(long submissionId);

@EntityGraph(type = LOAD, attributePaths = { "results", "results.feedbacks", "results.feedbacks.testCase", "results.assessor" })
Optional<ProgrammingSubmission> findWithEagerResultsFeedbacksTestCasesAssessorById(long submissionId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@

import de.tum.in.www1.artemis.domain.Attachment;
import de.tum.in.www1.artemis.domain.Lecture;
import de.tum.in.www1.artemis.domain.enumeration.AttachmentType;
import de.tum.in.www1.artemis.domain.lecture.AttachmentUnit;
import de.tum.in.www1.artemis.domain.lecture.Slide;
import de.tum.in.www1.artemis.repository.AttachmentRepository;
import de.tum.in.www1.artemis.repository.AttachmentUnitRepository;
import de.tum.in.www1.artemis.repository.SlideRepository;
import de.tum.in.www1.artemis.service.connectors.pyris.PyrisWebhookService;
import de.tum.in.www1.artemis.web.rest.errors.BadRequestAlertException;

@Profile(PROFILE_CORE)
@Service
public class AttachmentUnitService {

private final PyrisWebhookService webhookService;
yassinsws marked this conversation as resolved.
Show resolved Hide resolved

private final AttachmentUnitRepository attachmentUnitRepository;

private final AttachmentRepository attachmentRepository;
Expand All @@ -36,8 +40,9 @@ public class AttachmentUnitService {

private final SlideRepository slideRepository;

public AttachmentUnitService(SlideRepository slideRepository, SlideSplitterService slideSplitterService, AttachmentUnitRepository attachmentUnitRepository,
AttachmentRepository attachmentRepository, FileService fileService) {
public AttachmentUnitService(PyrisWebhookService webhookService, SlideRepository slideRepository, SlideSplitterService slideSplitterService,
AttachmentUnitRepository attachmentUnitRepository, AttachmentRepository attachmentRepository, FileService fileService) {
this.webhookService = webhookService;
this.attachmentUnitRepository = attachmentUnitRepository;
this.attachmentRepository = attachmentRepository;
this.fileService = fileService;
Expand Down Expand Up @@ -70,7 +75,9 @@ public AttachmentUnit createAttachmentUnit(AttachmentUnit attachmentUnit, Attach
Attachment savedAttachment = attachmentRepository.saveAndFlush(attachment);
savedAttachmentUnit.setAttachment(savedAttachment);
evictCache(file, savedAttachmentUnit);

if (savedAttachment.getAttachmentType() == AttachmentType.FILE) {
webhookService.executeIngestionPipeline(true, List.of(savedAttachmentUnit));
}
return savedAttachmentUnit;
}

Expand Down Expand Up @@ -118,6 +125,7 @@ public AttachmentUnit updateAttachmentUnit(AttachmentUnit existingAttachmentUnit
if (Objects.equals(FilenameUtils.getExtension(updateFile.getOriginalFilename()), "pdf")) {
slideSplitterService.splitAttachmentUnitIntoSingleSlides(savedAttachmentUnit);
}
webhookService.executeIngestionPipeline(true, List.of(savedAttachmentUnit));
}

return savedAttachmentUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

import org.springframework.context.annotation.Profile;
import org.springframework.data.domain.Page;
Expand All @@ -21,6 +22,7 @@
import de.tum.in.www1.artemis.domain.metis.conversation.Channel;
import de.tum.in.www1.artemis.repository.LectureRepository;
import de.tum.in.www1.artemis.repository.metis.conversation.ChannelRepository;
import de.tum.in.www1.artemis.service.connectors.pyris.PyrisWebhookService;
import de.tum.in.www1.artemis.service.metis.conversation.ChannelService;
import de.tum.in.www1.artemis.web.rest.dto.SearchResultPageDTO;
import de.tum.in.www1.artemis.web.rest.dto.pageablesearch.SearchTermPageableSearchDTO;
Expand All @@ -30,6 +32,8 @@
@Service
public class LectureService {

private final PyrisWebhookService webhookService;

private final LectureRepository lectureRepository;

private final AuthorizationCheckService authCheckService;
Expand All @@ -38,7 +42,9 @@ public class LectureService {

private final ChannelService channelService;

public LectureService(LectureRepository lectureRepository, AuthorizationCheckService authCheckService, ChannelRepository channelRepository, ChannelService channelService) {
public LectureService(PyrisWebhookService webhookService, LectureRepository lectureRepository, AuthorizationCheckService authCheckService, ChannelRepository channelRepository,
ChannelService channelService) {
this.webhookService = webhookService;
this.lectureRepository = lectureRepository;
this.authCheckService = authCheckService;
this.channelRepository = channelRepository;
Expand Down Expand Up @@ -133,6 +139,9 @@ public SearchResultPageDTO<Lecture> getAllOnPageWithSize(final SearchTermPageabl
* @param lecture the lecture to be deleted
*/
public void delete(Lecture lecture) {
List<AttachmentUnit> attachmentUnitList = lecture.getLectureUnits().stream().filter(lectureUnit -> lectureUnit.getType().equals("attachment"))
.map(lectureUnit -> (AttachmentUnit) lectureUnit).collect(Collectors.toCollection(ArrayList::new));
webhookService.executeIngestionPipeline(false, attachmentUnitList);
Channel lectureChannel = channelRepository.findChannelByLectureId(lecture.getId());
channelService.deleteChannel(lectureChannel);
lectureRepository.deleteById(lecture.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@
import de.tum.in.www1.artemis.repository.LectureUnitCompletionRepository;
import de.tum.in.www1.artemis.repository.LectureUnitRepository;
import de.tum.in.www1.artemis.repository.SlideRepository;
import de.tum.in.www1.artemis.service.connectors.pyris.PyrisWebhookService;

@Profile(PROFILE_CORE)
@Service
public class LectureUnitService {

private final PyrisWebhookService webhookService;

private final LectureUnitRepository lectureUnitRepository;

private final LectureRepository lectureRepository;
Expand All @@ -55,8 +58,10 @@ public class LectureUnitService {

private final ExerciseRepository exerciseRepository;

public LectureUnitService(LectureUnitRepository lectureUnitRepository, LectureRepository lectureRepository, CompetencyRepository competencyRepository,
LectureUnitCompletionRepository lectureUnitCompletionRepository, FileService fileService, SlideRepository slideRepository, ExerciseRepository exerciseRepository) {
public LectureUnitService(PyrisWebhookService webhookService, LectureUnitRepository lectureUnitRepository, LectureRepository lectureRepository,
CompetencyRepository competencyRepository, LectureUnitCompletionRepository lectureUnitCompletionRepository, FileService fileService, SlideRepository slideRepository,
ExerciseRepository exerciseRepository) {
this.webhookService = webhookService;
this.lectureUnitRepository = lectureUnitRepository;
this.lectureRepository = lectureRepository;
this.competencyRepository = competencyRepository;
Expand Down Expand Up @@ -162,6 +167,7 @@ public void removeLectureUnit(@NotNull LectureUnit lectureUnit) {
for (Slide slide : slides) {
fileService.schedulePathForDeletion(FilePathService.actualPathForPublicPathOrThrow(URI.create(slide.getSlideImagePath())), 5);
}
webhookService.executeIngestionPipeline(false, List.of(attachmentUnit));
slideRepository.deleteAll(slides);
}
}
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading