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

Rules without a subscription fail to load through list-did-rules feature #466

Closed
MytsV opened this issue Aug 28, 2024 · 3 comments · Fixed by #469
Closed

Rules without a subscription fail to load through list-did-rules feature #466

MytsV opened this issue Aug 28, 2024 · 3 comments · Fixed by #469
Labels
bug Something isn't working

Comments

@MytsV
Copy link
Contributor

MytsV commented Aug 28, 2024

Description

An Invalid Request: Subscription ID not provided error message is returned for all the rules which don't have a subscription. However, a rule having a subscription is optional.

Steps to reproduce

No response

Rucio WebUI Version

35.1.0

Additional Information

No response

@MytsV MytsV added the bug Something isn't working label Aug 28, 2024
@MytsV
Copy link
Contributor Author

MytsV commented Aug 28, 2024

Additionally, trying to list rules for a DID that is nonexistent leads to infinite loading

@MytsV
Copy link
Contributor Author

MytsV commented Aug 28, 2024

Probably the change has to be made to this method in postprocessing-pipeline-elements.ts

_transform(
        chunk: { status: 'success' | 'error'; reqeuestModel: TRequestModel; responseModel: TResponseModel | TErrorModel },
        encoding: BufferEncoding,
        callback: TransformCallback,
    ): void {
        let { status, responseModel } = chunk;
        if (status === 'error') {
            const errorModel = responseModel as TErrorModel;
            callback(null, errorModel);
            return;
        }
        responseModel = responseModel as TResponseModel;
        const validationResult = this.validateResponseModel(responseModel);
        if (validationResult.isValid) {
            callback(null, responseModel);
        } else {
            callback(null, validationResult.errorModel);
        }
    }

@MytsV
Copy link
Contributor Author

MytsV commented Aug 29, 2024

Additionally, trying to list rules for a DID that is nonexistent leads to infinite loading

Turned out to be an issue not only with the DID rules! The PR fixes all similar bugs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant