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

Add ProviderID field to EntityInfoWrapper #3072

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Add ProviderID field to EntityInfoWrapper #3072

merged 3 commits into from
Apr 15, 2024

Conversation

dmjb
Copy link
Contributor

@dmjb dmjb commented Apr 12, 2024

Relates to #3071

This PR adds the ProviderID field to the event structure, and changes the executor to use the ProviderID if present. Note that the ProviderID is not actually set anywhere at this point: I am doing this changeover in phases to avoid backwards compatibility issues as we change the event structure.

Summary

Provide a brief overview of the changes and the issue being addressed.
Explain the rationale and any background necessary for understanding the changes.
List dependencies required by this change, if any.

Fixes #(related issue)

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@dmjb dmjb requested a review from a team as a code owner April 12, 2024 11:07
@coveralls
Copy link

coveralls commented Apr 12, 2024

Coverage Status

coverage: 48.046% (+0.06%) from 47.988%
when pulling 6d78149 on add-provider-id-eiw
into a98fc32 on main.

Relates to #3071

This PR adds the ProviderID field to the event structure, and changes
the executor to use the ProviderID if present. Note that the ProviderID
is not actually set anywhere at this point: I am doing this changeover
in phases to avoid backwards compatibility issues as we change the event
structure.
@dmjb dmjb force-pushed the add-provider-id-eiw branch from 427ec67 to f401089 Compare April 12, 2024 11:25
Comment on lines +205 to +209
if inf.ProviderID == uuid.Nil {
provider, err = e.providerStore.GetByName(ctx, inf.ProjectID, inf.Provider)
} else {
provider, err = e.providerStore.GetByID(ctx, inf.ProviderID)
}
Copy link
Member

Choose a reason for hiding this comment

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

Slight preference to reverse the order of these conditions, since we want to prefer the inf.ProviderID not being nil.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do this in the next PR where the ProviderID is actually set. Right now, since it's not being set, the current order makes more sense.

@dmjb dmjb merged commit 7b5e9fd into main Apr 15, 2024
20 checks passed
@dmjb dmjb deleted the add-provider-id-eiw branch April 15, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants