Skip to content

Conversation

@LucaPacioselli
Copy link
Contributor

Description:

This PR implements a filter on the DID search functionality, specifically targeting the /dids/{scope}/dids/search endpoint. The new feature was developed by extending the pre-existing DID search logic, allowing users to refine their queries and obtain more targeted results.

For testing purposes, I also modified the .gitignore file. If these changes are not needed, they can be discarded by the reviewer of the PR.

Copy link
Member

@maany maany left a comment

Choose a reason for hiding this comment

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

Ciao Luca,

Thanks again for your work on this! The PR logic looks solid and fits well with the overall architecture. I just left a few minor comments, mainly around variable naming.

In Rucio, DID metadata is managed by the metadata plugins. In this PR, you’re introducing DID filters that are used in the list did endpoint. To avoid confusion, could you please rename the occurrences of "meta" so it’s clear we’re referring to DID filters and not DID metadata?

Also, the build is currently failing. If you run npm run build locally, you should be able to reproduce the error and fix it.

Thanks a lot again for your contribution!

.gitignore Outdated
# local env files
.env*.local
.env.test
.env.development.local.template
Copy link
Member

Choose a reason for hiding this comment

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

We should not ignore the .env.test and .env.local.template files.

const [scope, setScope] = useState<string | null>(initialScope ?? null);
const [name, setName] = useState<string | null>(initialName ?? null);
const [type, setType] = useState<DIDType>(DIDType.DATASET);
const [metaFilters, setMetaFilters] = useState([{ key: '', operator: '=' as Operator, value: '' }]);
Copy link
Member

Choose a reason for hiding this comment

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

Could you not use the word "meta". This is technically not DID Metadata in Rucio which is managed by Metadata plugins.

You can call these didFilters for example?


const scopeInputRef = useRef<HTMLInputElement>(null);
const nameInputRef = useRef<HTMLInputElement>(null);
const metaKeyRefs = useRef<(HTMLInputElement | null)[]>([]);
Copy link
Member

Choose a reason for hiding this comment

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

requesting a rename here too

metaValueRefs.current[i]?.focus();
return false;
}
// if (key.includes(SCOPE_DELIMITER)) {
Copy link
Member

Choose a reason for hiding this comment

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

please remove commented out code if it is not needed

};

// Metadata filter operators
export type MetaOperator = '=' | '!=' | '>' | '<' | '>=' | '<=';
Copy link
Member

Choose a reason for hiding this comment

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

could be called: DIDFilterOperator

return;
}
const { query, type } = req.query;
const { query, type, meta } = req.query;
Copy link
Member

Choose a reason for hiding this comment

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

filters instead of meta?

@LucaPacioselli LucaPacioselli force-pushed the feature-604-did_meta_search branch from ee01481 to e365660 Compare September 24, 2025 14:08
@LucaPacioselli
Copy link
Contributor Author

Ciao @maany, I’ve pushed a few commits to fix the build check failure, revert the .gitignore to match rucio/webui master, and rename all occurrences of “Meta” to “DIDFilter” (or similar).

Could you please have a look and review the updated state?

Copy link
Member

@maany maany left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks @LucaPacioselli

@maany maany merged commit 1e96de6 into rucio:master Sep 25, 2025
8 checks passed
@maany maany added this to the 38.1.0 milestone Oct 1, 2025
@maany maany mentioned this pull request Oct 1, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants