-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support for aliases on Infrastructure Resources #150
Conversation
Codecov Report
@@ Coverage Diff @@
## main #150 +/- ##
==========================================
- Coverage 44.89% 44.73% -0.16%
==========================================
Files 70 70
Lines 5649 5671 +22
==========================================
+ Hits 2536 2537 +1
- Misses 3111 3132 +21
Partials 2 2
|
@@ -234,7 +234,7 @@ func resourceServiceCreate(d *schema.ResourceData, client *opslevel.Client) erro | |||
} | |||
_, err := client.ServiceApiDocSettingsUpdate(string(resource.Id), docPath.(string), source) | |||
if err != nil { | |||
log.Error().Err(err).Msgf("failed to update service '%s' api doc settings", resource.ManagedAliases[0]) | |||
log.Error().Err(err).Msgf("failed to update service '%s' api doc settings", resource.Aliases[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed that this is a bug that was introduced in services. If the user has no set aliases, this line will crash instead of erroring. Aliases[0]
is being used because it's guaranteed that the slug/friendly_id will be present there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
|
Co-authored-by: Kyle <[email protected]>
Issues
https://github.com/OpsLevel/team-platform/issues/112
Allow aliases to be managed on infra resources just like they are managed on services.
NOTE that unlike services, infra resources don't have a slug/friendly_id that is placed inside the aliases array. So using
ManagedAliases
is not necessary!Changelog
changie
entryTophatting
Create infra resource with no aliases:
Add aliases:
Remove the aliases: