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

fix: options nil pointer error #1268

Merged
merged 2 commits into from
Nov 29, 2022

Conversation

aFlyBird0
Copy link
Member

@aFlyBird0 aFlyBird0 commented Nov 29, 2022

Signed-off-by: Bird [email protected]

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

Fix: when options are empty, dtm will panic

How to Reproduce

config:

config:
  state:
    backend: local
    options:
      stateFile: devstream.state

vars:
  repoOwner: RepoOwner
  repoTemplateBaseURL: github.com/devstream-io
  imageRepoOwner: ImageRepoOwner

tools:
- name: helm-installer
  instanceID: argocd-001

apps:
- name: myapp1
  spec:
    language: python
    framework: django
  repo:
    url: github.com/[[ repoOwner ]]/myapp1
  repoTemplate:
    url: [[ repoTemplateBaseURL ]]/dtm-scaffolding-python
    vars:
      imageRepo: [[ imageRepoOwner ]]/myapp1
  ci:
  - type: github-actions
    options:
      imageRepo:
        user: [[ imageRepoOwner ]]
  - type: argocdapp
- name: myapp2
  spec:
    framework: gin
    language: golang
  repo:
    owner: [[ repoOwner ]]
    scmType: github
  repoTemplate:
    url: [[ repoTemplateBaseURL ]]/dtm-scaffolding-golang
    vars:
      imageRepo: [[ imageRepoOwner ]]/myapp2
  ci:
  - type: github-actions
    options:
      imageRepo:
        user: [[ imageRepoOwner ]]
  cd:
  - type: argocdapp

screenshots:

ACDA9B95-C6CA-478B-B4D9-6303CC74C15D

6802C1EE-F3E0-4622-9FA1-2CBC4833D6DF

image

Related Issues

New Behavior (screenshots if needed)

@aFlyBird0 aFlyBird0 requested a review from a team as a code owner November 29, 2022 09:03
@aFlyBird0 aFlyBird0 marked this pull request as draft November 29, 2022 09:06
@aFlyBird0 aFlyBird0 force-pushed the fix-options-nil-pointer branch from 15ad6c9 to 6263405 Compare November 29, 2022 09:10
@aFlyBird0 aFlyBird0 changed the title fix: options nil pointer error and replace error of mergo fix: options nil pointer error Nov 29, 2022
@aFlyBird0 aFlyBird0 marked this pull request as ready for review November 29, 2022 09:10
@aFlyBird0 aFlyBird0 marked this pull request as draft November 29, 2022 09:13
@aFlyBird0 aFlyBird0 marked this pull request as ready for review November 29, 2022 09:36
@daniel-hutao daniel-hutao merged commit 520d7e8 into devstream-io:main Nov 29, 2022
@aFlyBird0 aFlyBird0 deleted the fix-options-nil-pointer branch December 12, 2022 04:15
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