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

Customize the prefix assigned to resources deployed in development mode #1084

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

domcorvasce
Copy link

@domcorvasce domcorvasce commented Dec 20, 2023

Changes

Note: I went with this approach so everyone can fit it to their needs but IMO it would be enough to just change the process_target_mode module so the prefix matches the target name instead of being hard coded as dev. I’d gladly rework the PR if this simpler approach is enough.

All the names of the resources (i.e. jobs, pipelines, models endpoints) deployed in development mode are prefixed with [dev user_name] which can be confusing when an organization has multiple development environments to choose from.

This pull request adds an optional resource_name_prefix field to the bundles target object, allowing developers to specify custom prefixes:

bundle
  name: test

targets:
  dev:
    # Deployed resources get prefixed with '[hello test]'
    resource_name_prefix: hello ${bundle.name}
    mode: development

Open points

  • Is this something you would be open to accept?
  • This is the first time I contribute to the project so I could have missed something
  • I agree the name of the field might be a bit confusing: I'm open to suggestions

Tests

  • Added a new unit test to the process_target_mode module test suite

@domcorvasce domcorvasce force-pushed the FEAT/customize-dev-resource-names-prefixes branch from 99a5a21 to be84b9f Compare December 21, 2023 09:17
@lennartkats-db
Copy link
Contributor

Thanks @domcorvasce for this contribution. It would be great to have a feature like this! We had the request to make these transformations more customizable from multiple customers. We'd like to do so for the prefix and for other things like the tags that are automatically asserted.

I'll discuss with the team what the right name is for a prefixing property, and if it should perhaps be nested under a property like transform:. And I'll need to check in with legal about a contributor's license agreement. Please bear with us as it may take a bit of time to complete both of these things during the holidays.

@domcorvasce domcorvasce force-pushed the FEAT/customize-dev-resource-names-prefixes branch from be84b9f to bd85992 Compare December 23, 2023 13:51
@domcorvasce domcorvasce force-pushed the FEAT/customize-dev-resource-names-prefixes branch from bd85992 to 688af35 Compare January 18, 2024 14:36
@lennartkats-db lennartkats-db requested review from kajaerzen and removed request for lennartkats-db January 29, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants