InvalidIndex exception triggers pulpcore deprecation warning in CI

Open Beginner friendly
#535 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@git-hyagi is already working on this.

Since Oct 9, 2026.

  • #536 by @git-hyagi — open
  • #548 by @dkliban — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with the InvalidIndex class in pulp_maven.app.path_index.format, which currently inherits only from ValueError. Read how pulpcore's _execute_task classifies caught exceptions, then run test_path_index_error_reports_offending_path. Done when InvalidIndex also derives from PulpException, the task still fails as expected, and the deprecation warning no longer appears.

Written by the indexing model from the issue text.

Description

Issue

Summary

The InvalidIndex exception in pulp_maven.app.path_index.format inherits from ValueError, which causes pulpcore's task executor to emit a deprecation warning whenever it is raised during task execution.

Pulpcore's _execute_task (and _aexecute_task) checks whether a caught exception is an instance of PulpException, APIException, or aiohttp.ClientError. If not, it logs:

Exception (InvalidIndex: ...) will be sanitized in pulpcore 3.130

This warning is captured by the CI deprecation artifacts and causes the deprecations job to fail, since that job asserts no deprecation warnings are emitted.

Reproduction

The warning is triggered by test_path_index_error_reports_offending_path, which intentionally creates a MavenArtifact named index.html that collides with a generated MavenIndexPage at the same relative_path. The resulting InvalidIndex is expected (the test asserts the task fails), but the deprecation warning is a side effect.

Example failing run: https://github.com/pulp/pulp_maven/actions/runs/37953001385/job/113907719999

Fix

Make InvalidIndex inherit from PulpException (in addition to ValueError for backward compatibility) so that pulpcore recognizes it as a known plugin exception and skips the deprecation warning path.

Dominant language
Python
Stars
5
Forks
30
Avg merge
1d 16h
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pulp/pulp_maven

All issues in pulp/pulp_maven

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.