packit / packit-service

Packit provided as a service
https://packit.dev
MIT License
34 stars 46 forks source link

Pull from upstream not working in monorepos #2441

Closed sentry-io[bot] closed 3 weeks ago

sentry-io[bot] commented 3 weeks ago

Specfile does not trigger pull-from-upstream (nor in prod or in stg). The upstream_project_url was the only attribute allowed to be above the packages details in a monorepo config and thus it was the only key allowed to be defined just once. Something is changed and that is no more allowed.

AttributeError: It is ambiguous to get upstream_project_url: there is more than one package in the config.

Sentry Issue: PCKT-002-PACKIT-SERVICE-7EA

AttributeError: It is ambiguous to get upstream_project_url: there is more than one package in the config.
(9 additional frame(s) were not displayed)
...
  File "packit_service/worker/jobs.py", line 563, in should_task_be_created_for_job_config_and_handler
    event=self.event.get_dict(),
  File "packit_service/worker/events/pagure.py", line 113, in get_dict
    d["repo_name"] = self.repo_name
  File "packit_service/worker/events/pagure.py", line 189, in repo_name
    return self.repo_url.repo if self.repo_url else None
  File "packit_service/worker/events/pagure.py", line 177, in repo_url
    self.packages_config.upstream_project_url
  File "packit/config/common_package_config.py", line 531, in __getattr__
    raise AttributeError(
nforro commented 3 weeks ago

This is a duplicate of https://github.com/packit/packit-service/issues/2172.