Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hcp: remove duplicated build registration for JSON #12116

Merged
merged 1 commit into from Nov 17, 2022

Conversation

lbajolet-hashicorp
Copy link
Collaborator

In JSON templates, we register the builds to process on HCP at the initialisation of the Registry.

However, during the HCP breakout, this code was duplicated with a slight difference for the JSON templates, and the build names were registered once during initialisation, with the expected full name, and once at the start of PopulateIteration, with the truncated name.

This caused a bug when processing a template that contains a builder with both a name and a type, as both would be registered, but only one would complete, leading to the iteration being unable to complete.

In JSON templates, we register the builds to process on HCP at the
initialisation of the Registry.

However, during the HCP breakout, this code was duplicated with a slight
difference for the JSON templates, and the build names were registered
once during initialisation, with the expected full name, and once at the
start of PopulateIteration, with the truncated name.

This caused a bug when processing a template that contains a builder
with both a name and a type, as both would be registered, but only one
would complete, leading to the iteration being unable to complete.
@lbajolet-hashicorp lbajolet-hashicorp requested a review from a team as a code owner November 17, 2022 13:53
Copy link
Member

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nywilken nywilken added this to the 1.8.5 milestone Nov 17, 2022
@lbajolet-hashicorp lbajolet-hashicorp merged commit ccb5a22 into main Nov 17, 2022
@lbajolet-hashicorp lbajolet-hashicorp deleted the fix_json_double_register_build_hcp branch November 17, 2022 20:24
@nywilken nywilken added the tech-debt Issues and pull requests related to addressing technical debt or improving the codebase label Dec 12, 2022
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tech-debt Issues and pull requests related to addressing technical debt or improving the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants