asf-tooling commented on issue #1251:
URL:
https://github.com/apache/tooling-trusted-releases/issues/1251#issuecomment-4495875838
<!-- gofannon-issue-triage-bot v2 -->
**Automated triage** — analyzed at `main@ab610b23`
**Type:** `new_feature` • **Classification:** `no_action` •
**Confidence:** `high`
**Application domain(s):** `project_and_committee_management`,
`web_interface_and_api`
### Summary
The issue requests a web UI feature to populate project metadata from
pom.xml files (upload or URL). However, the team has explicitly deferred this:
@sbp suggested deferring to beta, @kwin noted metadata isn't used anywhere yet,
and @dave2wave identified that pom.xml population fits within the external
`tooling-atr-maven-plugin` repository rather than ATR itself. @dave2wave also
noted that metadata population from `.asf.yaml` is the planned ATR-native
approach with an existing API. No action is needed at this time.
### Where this lives in the code today
#### `atr/shared/projects.py` — `EditMetadataForm` (lines 206-240)
_extension point_
This is the metadata form that would be pre-populated with data extracted
from pom.xml if the feature were implemented.
```python
class EditMetadataForm(form.Form):
variant: EDIT_METADATA = form.value(EDIT_METADATA)
project_key: safe.ProjectKey = form.label("Project name",
widget=form.Widget.HIDDEN)
homepage: form.OptionalURL = form.label(
"Homepage",
"Project website URL.",
)
lifecycle_page: form.OptionalURL = form.label(
"Lifecycle page",
"URL of the page describing this project's release support and
lifecycle plans.",
)
download_page: form.OptionalURL = form.label(
"Download page",
"URL of the project's official download page.",
)
bug_database: form.OptionalURL = form.label(
"Bug database",
"URL of the project's issue tracker (Bugzilla, JIRA, GitHub Issues,
etc).",
)
mailing_lists: form.OptionalURL = form.label(
"Mailing lists page",
"URL of the page on the project website that lists its mailing
lists.",
)
repository: form.URLList = form.label(
"Repositories",
"Repository URLs, one per line.",
widget=form.Widget.TEXTAREA,
rows=3,
)
standards: form.URLList = form.label(
"Standards",
"URLs of standards this project implements, one per line.",
widget=form.Widget.TEXTAREA,
rows=3,
)
```
#### `atr/storage/writers/project.py` — `CommitteeMember.edit_metadata`
(lines 279-298)
_extension point_
The existing metadata writer that persists metadata fields. An API-based
approach (as @dave2wave described) would also use this path.
```python
async def edit_metadata(self, form: shared.projects.EditMetadataForm) ->
None:
project = await self.__data.project(key=str(form.project_key)).get()
if not project:
raise storage.AccessError(f"Project '{form.project_key}' not
found.", status=404)
project.homepage = str(form.homepage) if form.homepage else None
project.lifecycle_page = str(form.lifecycle_page) if
form.lifecycle_page else None
project.download_page = str(form.download_page) if
form.download_page else None
project.bug_database = str(form.bug_database) if form.bug_database
else None
project.mailing_lists = str(form.mailing_lists) if
form.mailing_lists else None
project.repository = list(form.repository)
project.standards = list(form.standards)
project.updated = datetime.datetime.now(datetime.UTC)
project.updated_by = self.__asf_uid
await self.__data.commit()
self.__write_as.append_to_audit_log(
asf_uid=self.__asf_uid,
project_key=str(project.key),
)
```
#### `atr/post/projects.py` — `_process_edit_metadata_form` (lines 303-324)
_currently does this_
The POST handler for metadata editing; a pom.xml import would likely
pre-populate the form and then submit through this same handler.
```python
async def _process_edit_metadata_form(
session: web.Committer, edit_form: shared.projects.EditMetadataForm
) -> web.WerkzeugResponse:
project_key = edit_form.project_key
async with storage.write(session) as write:
wacm = await write.as_project_committee_member(project_key)
try:
await wacm.project.edit_metadata(edit_form)
except storage.AccessError as e:
return await session.redirect(
get.projects.view,
project_key=str(project_key),
tab="metadata",
error=f"Error saving metadata: {e}",
)
except ValueError as e:
return await session.redirect(get.projects.view,
project_key=str(project_key), tab="metadata", error=str(e))
return await session.redirect(
get.projects.view, project_key=str(project_key), tab="metadata",
success="Metadata saved."
)
```
### Where new code would go
- `https://github.com/apache/tooling-atr-maven-plugin` — new file
@dave2wave identified this external repository as the proper home for
pom.xml-based metadata population, using ATR's existing API.
### Proposed approach
The team has decided to defer this feature to beta. @dave2wave pointed out
that pom.xml population fits within the external `tooling-atr-maven-plugin`
project rather than the ATR web UI. ATR already has an API for updating project
metadata (used for `.asf.yaml` population), so the maven plugin can call that
API with data extracted from pom.xml. If this is eventually done in the ATR UI
itself (during beta), it would involve adding a new form variant (e.g.,
`ImportPomForm`) with either a file upload field or URL field, parsing the XML
to extract metadata (homepage from `<url>`, bug tracker from
`<issueManagement>/<url>`, SCM from `<scm>/<url>`, description from
`<description>`), and pre-populating the existing `EditMetadataForm` fields.
No diff is proposed because the team has explicitly deferred this work and
identified an external project as the primary implementation location.
### Open questions
- Should this issue be moved/linked to the tooling-atr-maven-plugin
repository since @dave2wave identified that as the proper home?
- Which specific POM fields should map to which ATR metadata fields
(homepage ← <url>, bug_database ← <issueManagement>/<url>, repository ←
<scm>/<url>, etc.)?
- If eventually implemented in the ATR UI during beta, should it support
parent POM resolution or just flat single-POM parsing?
_The agent reviewed this issue and is not proposing patches in this run.
Review the existing-code citations and open questions above before deciding
next steps._
### Files examined
- `atr/post/projects.py`
- `atr/shared/projects.py`
- `atr/blueprints/post.py`
- `atr/get/projects.py`
- `atr/storage/writers/policy.py`
- `atr/storage/writers/project.py`
- `atr/docs/user-interface.md`
- `atr/form.py`
---
*Draft from a triage agent. A human reviewer should validate before merging
any change. The agent did not run tests or verify diffs apply.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]