question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] epicli init --full -p azure generates not correct region value

See original GitHub issue

Describe the bug Epicli apply --full -p azure generates not correct region value - it generates eu-west-2 which is value for AWS.

How to reproduce Steps to reproduce the behavior:

  1. execute `epicli init --full -p azure
  2. see config file
  3. execution with default region value will fail

Expected behavior Region value should be compatible with Azure if we generate file for Azure

Environment

  • Cloud provider: Azure
  • OS: all

epicli version: all

Additional context Probably default value in file https://github.com/epiphany-platform/epiphany/blob/develop/core/src/epicli/data/common/defaults/epiphany-cluster.yml should be changed.


DoD checklist

  • Changelog updated (if affected version was released)
  • COMPONENTS.md updated / doesn’t need to be updated
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
  • Case covered by automated test (if possible)
  • Idempotency tested
  • Documentation updated / doesn’t need to be updated
  • All conversations in PR resolved
  • Backport tasks created / doesn’t need to be backported

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sbbrootcommented, Sep 20, 2021

Bug is in this function:

def load_all_yaml_objs(file_type, provider, kind):
    script_dir = os.path.dirname(__file__)
    path_to_file = os.path.join(script_dir, DATA_FOLDER_PATH, provider, file_type, kind+'.yml')
    return load_file_from_path(script_dir, path_to_file, file_type, kind)

path_to_file will always have a value of: "epiphany/core/src/epicli/cli/helpers/../../data/azure/defaults/epiphany-cluster.yml" such file does not exist.

Therefore in load_file_from_path function else statement will always be executed.

def load_file_from_path(script_dir, path_to_file, file_type, kind):
    if os.path.isfile(path_to_file):
        return load_yamls_file(path_to_file)
    else:
        path_to_file = os.path.join(script_dir, DATA_FOLDER_PATH, 'common', file_type, kind + '.yml')
        return load_yamls_file(path_to_file)

This leads to getting values from the: "epiphany/core/src/epicli/cli/helpers/../../data/common/defaults/epiphany-cluster.yml" which is the default file for all providers that contains aws values.

0reactions
przemyslaviccommented, Oct 15, 2021

✔️ Fixed. Now a different default configuration is used for each provider.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Having issues with creating a virtual machine with Azure for ...
I am trying to create a virtual machine in region US (East) US and get an error message when selecting B1s for size....
Read more >
All Work · GitHub
[FEATURE REQUEST] Create server spec for Helm repository ... area/kubernetes ... [BUG] Internal User changes to OpenSearch not reflected in config files.
Read more >
Epic-Feature-Story-Task! What?! - YouTube
The Azure DevOps default template and SAFe requirements model suggest a requirements hierarchy of Epic-Feature-Story-Task.
Read more >
Full text of "A glossary of botanic terms, with ... - Internet Archive
The special terms contrived for American conditions have not been transferred to these ... the value of this Glossary being largely due to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found