uffizzi icon indicating copy to clipboard operation
uffizzi copied to clipboard

BUG: Parsing compose file error: Invalid config option with number at the beginning of the string

Open 7R41N33 opened this issue 2 years ago • 4 comments

  • Create compose file (example below)
  • Compose file should contain number at the beginning of any option
  • Try to add this compose file into uffizzi

Result: Error: Invalid config option '1x-uffizzi-ingress' - only [a-zA-Z0-9\._\-] characters are allowed

File: Click to expand
services:
  hello-world:
    build: 
      context: https://github.com/NealArw/hello-world-1
      dockerfile: /Dockerfile
      args:
        testarg: uffizzi_test

1x-uffizzi:
  ingress:
    service: hello-world
    port: 80
    
  continuous_preview:
    share_to_github: true
    delete_preview_after: 1h
    delete_preview_when_image_tag_is_updated: true
    deploy_preview_when_image_tag_is_created: true
    delete_preview_when_pull_request_is_closed: true
    deploy_preview_when_pull_request_is_opened: true

image

7R41N33 avatar Apr 20 '22 13:04 7R41N33

Was not fixed:

Platform: image

File:

services:
  1-hello-world:
    build: 
      context: https://github.com/NealArw/hello-world-1
      dockerfile: /Dockerfile
      args:
        testarg: uffizzi_test

x-uffizzi:
  ingress:
    service: 1-hello-world
    port: 80
    
  continuous_preview:
    share_to_github: true
    delete_preview_after: 1h
    delete_preview_when_image_tag_is_updated: true
    deploy_preview_when_image_tag_is_created: true
    delete_preview_when_pull_request_is_closed: true
    deploy_preview_when_pull_request_is_opened: true

CLI:

bash-5.1# bundle exec uffizzi project compose set -f test-compose/uffizzi-compose-webhook-docker.yml
Invalid config option '1-webhooks_test_app' - only [a-zA-Z0-9\._\-] characters are allowed
bash-5.1#

File:

services:
  1-webhooks_test_app:
    image: uffizzitest/webhooks-test-app:latest
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres

x-uffizzi-ingress:
  service: 1-webhooks_test_app
  port: 80

x-uffizzi-continuous-preview:
  share_to_github: true
  delete_preview_after: 1h
  tag_pattern: uffizzi_request_*
  delete_preview_when_image_tag_is_updated: true
  deploy_preview_when_image_tag_is_created: true
  delete_preview_when_pull_request_is_closed: true
  deploy_preview_when_pull_request_is_opened: true

NealArw avatar Jun 20 '22 12:06 NealArw

APP - TESTED on prod - OK

# uffizzi project compose set -f compose.yml
compose file created
# uffizzi project compose describe
services:
  1-webhooks_test_app:
    image: uffizzitest/webhooks-test-app:latest
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres

x-uffizzi-ingress:
  service: 1-webhooks_test_app
  port: 80

x-uffizzi-continuous-preview:
  share_to_github: true
  delete_preview_after: 1h
  tag_pattern: uffizzi_request_*
  delete_preview_when_image_tag_is_updated: true
  deploy_preview_when_image_tag_is_created: true
  delete_preview_when_pull_request_is_closed: true
  deploy_preview_when_pull_request_is_opened: true
#

NealArw avatar Jun 21 '22 10:06 NealArw

Need to fix: We get 500 server error when we use compose file https://github.com/NealArw/hello-world-1/blob/compose-test/vote-app-with-anchor.yml

Reprroduce on qa env

AnnaPochepina avatar Jun 21 '22 14:06 AnnaPochepina

TESTED on prod - OK

NealArw avatar Jun 23 '22 13:06 NealArw