#1604 Build created by CLI import-cg is not owned by the owner specified in metadata
Closed: Fixed 3 years ago by mikem. Opened 3 years ago by mfilip.

metadata used for CLI import-cg:

{'metadata_version': 0, 'build': {'name': 'content-generator-k3nk', 'version': '1.1', 'release': '1', 'epoch': 0, 'owner': 'user-bobxx', 'source': 'content-generator-k3nk', 'start_time': '1565017571', 'end_time': '1565017571', 'extra': {'typeinfo': {'txt': {}}}}, 'buildroots': [{'id': 'content-generator-k3nk', 'content_generator': {'name': 'content-generator-k3nk', 'version': '1'}, 'container': {'name': 'content-generator-k3nk', 'type': 'directory', 'arch': 'noarch'}, 'host': {'os': 'rhel', 'arch': 'noarch'}, 'components': [], 'tools': [{'name': 'cg_tool1', 'version': '1'}]}], 'output': [{'extra': {'typeinfo': {'txt': {}}}, 'type': 'txt', 'filename': 'sample.txt', 'filesize': 802, 'buildroot_id': 'content-generator-k3nk', 'checksum_type': 'md5', 'checksum': 'c48c8f94fc6d260d6263add8e69ca167'}]}

output of API getBuild:

{'build_id': 14, 'cg_id': None, 'completion_time': '2019-08-05 15:08:40.417207', 'completion_ts': 1565017720.41721, 'creation_event_id': 39, 'creation_time': '2019-08-05 15:08:40.417207', 'creation_ts': 1565017720.41721, 'epoch': 0, 'extra': {'typeinfo': {'txt': {}}}, 'id': 14, 'name': 'content-generator-k3nk', 'nvr': 'content-generator-k3nk-1.1-1', 'owner_id': 2, 'owner_name': 'kojiadmin', 'package_id': 14, 'package_name': 'content-generator-k3nk', 'release': '1', 'source': 'content-generator-k3nk', 'start_time': '2019-08-05 15:06:11', 'start_ts': 1565017571.0, 'state': 1, 'task_id': None, 'version': '1.1', 'volume_id': 0, 'volume_name': 'DEFAULT', 'cg_name': None}

It looks like current user is set as owner instead of the owner specified in metadata.


Metadata Update from @mikem:
- Custom field Size adjusted to None
- Issue set to the milestone: 1.18
- Issue tagged with: bug

3 years ago

In CGInitBuild(), the owner is forced to the current user, no matter what the data is. That may be incorrect, but it isn't the whole problem. I'm seeing this even without pre-declaring the build.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1606 Merged 3 years ago