Skip to content

Add opencast.external_api_node config value #1221

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

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

LukasKalbertodt
Copy link
Member

This allows admins to override which OC node is used for external API
operations. Previously, sync_node was used, which was not always
correct.

Fixes #1216

@LukasKalbertodt LukasKalbertodt added the changelog:admin Changes primarily for admins label Aug 7, 2024
@github-actions github-actions bot temporarily deployed to test-deployment-pr1221 August 7, 2024 11:18 Destroyed

This comment was marked as resolved.

@github-actions github-actions bot added the status:conflicts This PR has conflicts that need to be resolved label Aug 7, 2024
This allows admins to override which OC node is used for external API
operations. Previously, `sync_node` was used, which was not always
correct.

Fixes elan-ev#1216
@github-actions github-actions bot removed the status:conflicts This PR has conflicts that need to be resolved label Aug 7, 2024
Copy link
Member

@JulianKniephoff JulianKniephoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks reasonable. Only very minor nitpicks which one could discuss.

I did not test this on a distributed system, though!

@@ -30,6 +30,7 @@ pub(crate) async fn run(shared: &args::Shared, args: &Args) -> Result<()> {
};
let meili = check_meili(&config).await;
let opencast_sync = check_opencast_sync(&config).await;
let oc_external_api = check_external_api(&config).await;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opencast_ vs. oc_ triggers me slightly. 😐

Comment on lines 32 to +33
let opencast_sync = check_opencast_sync(&config).await;
let oc_external_api = check_external_api(&config).await;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's slightly unfortunate that both of these have to create an Opencast client. 🤔

Comment on lines +75 to +78
pub(crate) fn external_api_node(&self) -> &HttpHost {
self.external_api_node.as_ref().unwrap_or_else(|| self.unwrap_host())
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the third instance of this pattern, at which point I personally would want a thing for it. 😅

@LukasKalbertodt
Copy link
Member Author

We decided that none of the comments block this from merging.

@LukasKalbertodt LukasKalbertodt merged commit d27cfab into elan-ev:master Aug 7, 2024
5 checks passed
@LukasKalbertodt LukasKalbertodt deleted the delete-video-node branch August 7, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:admin Changes primarily for admins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting videos in OC uses the sync_node, which is incorrect
2 participants