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

change default deploytype to avoid defaulting to invalid type #207

Merged

Conversation

davidgamero
Copy link
Collaborator

@davidgamero davidgamero commented Apr 17, 2023

Description

The default for the deploytype flag is currently set to ., which isn't a valid deployment type, and causes a nil pointer error.

In order to catch this in the future, a new smoke test action was added that uses the default for every option.
This smoke test fails with invalid defaults like the one this PR fixes, and we should consider adding one for other commands once we have the ability to extract sane defaults for all of the flags on other commands.

Since the APPNAME variable didn't have a default, I added one to the draft.yaml allowing this smoke test to execute, and providing a basic default for testing.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Validated with new error return on deployment type lookup
Added new smoke test for create command

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@davidgamero davidgamero marked this pull request as ready for review April 19, 2023 20:02
Copy link
Member

@bfoley13 bfoley13 left a comment

Choose a reason for hiding this comment

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

Looks good for the bug fix. Lets also think about adding the validation for other defaults where it makes sense

template/deployments/helm/draft.yaml Outdated Show resolved Hide resolved
Copy link
Member

@bfoley13 bfoley13 left a comment

Choose a reason for hiding this comment

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

nice updates for handling the defaults

@davidgamero davidgamero enabled auto-merge (squash) May 2, 2023 15:28
@davidgamero davidgamero merged commit 8fffb7e into Azure:main May 2, 2023
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