Skip to content

Commit

Permalink
Use component name consistent for reconciliation
Browse files Browse the repository at this point in the history
https://github.com/openshift-eng/ocp-build-data/blob/main/product.yml uses component name to map issues to owners. Use of distgit
name in PRs/tickets has led to confusion when updating product.yml.
Prevent this by using component name everywhere.

Original PR openshift-eng/doozer#818
  • Loading branch information
ashwindasr committed Oct 10, 2023
1 parent 8c690a6 commit c166ea8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doozer/doozerlib/cli/images_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,8 @@ def reconcile_jira_issues(runtime, pr_map: Dict[str, PullRequest.PullRequest], d
for distgit_key, pr in pr_map.items():
image_meta: ImageMetadata = runtime.image_map[distgit_key]
potential_project, potential_component = image_meta.get_jira_info()
summary = f"Update {release_version} {image_meta.name} image to be consistent with ART"
summary = f"Update {release_version} {image_meta.get_component_name()} image to be consistent with ART"
old_summary_format = f"Update {release_version} {image_meta.name} image to be consistent with ART"

project = potential_project
if potential_project not in jira_project_names:
Expand All @@ -687,7 +688,7 @@ def reconcile_jira_issues(runtime, pr_map: Dict[str, PullRequest.PullRequest], d
# If the component in prodsec data does not exist in the Jira project, use Unknown.
component = 'Unknown'

query = f'project={project} AND summary ~ "{summary}" AND statusCategory in ("To Do", "In Progress")'
query = f'project={project} AND ( summary ~ "{summary}" OR summary ~ "{old_summary_format}" ) AND statusCategory in ("To Do", "In Progress")'

@retry(reraise=True, stop=stop_after_attempt(10), wait=wait_fixed(3))
def search_issues(query):
Expand Down Expand Up @@ -1060,7 +1061,7 @@ def check_if_upstream_image_exists(upstream_image):

yellow_print(f'Upstream dockerfile does not match desired state in {public_repo_url}/blob/{public_branch}/{dockerfile_name}')

first_commit_line = f"Updating {image_meta.name} images to be consistent with ART"
first_commit_line = f"Updating {image_meta.get_component_name()} image to be consistent with ART"
reconcile_url = f'{convert_remote_git_to_https(runtime.gitdata.origin_url)}/tree/{runtime.gitdata.commit_hash}/images/{os.path.basename(image_meta.config_filename)}'
reconcile_info = f"Reconciling with {reconcile_url}"

Expand Down

0 comments on commit c166ea8

Please sign in to comment.