Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Template mechanism has trouble switching branches #1213

Closed
aivanova5 opened this issue Oct 19, 2022 · 1 comment
Closed

Template mechanism has trouble switching branches #1213

aivanova5 opened this issue Oct 19, 2022 · 1 comment
Assignees
Labels
bug Request a fix or change to the code

Comments

@aivanova5
Copy link
Collaborator

Problem description

Setting the template config is inconsistent and gets tripped up when switching branches back n forth.

Steps to reproduce

aivanovalocal@PC99458 tariff_design % gridlabd template config set GITBRANCH "master"
aivanovalocal@PC99458 tariff_design % gridlabd template config set GITBRANCH "add-tariff-design"
aivanovalocal@PC99458 tariff_design % gridlabd template config                                  
ERROR 2: commit is not valid
ERROR 1: <class 'SystemExit'> 2
ERROR [gridlabd-template]: Branch not found
GITHUB="https://github.com/"
GITHUBUSERCONTENT="https://raw.githubusercontent.com/"
ORGANIZATION="US/CA/SLAC"
GITUSER="hipas"
GITREPO="gridlabd-template"
GITBRANCH="add-tariff-design"
CACHEDIR="/usr/local/opt/gridlabd/4.3.1-220922-develop/share/gridlabd/template/US/CA/SLAC/.gridlabd-template"
DATADIR="/usr/local/opt/gridlabd/4.3.1-220922-develop/share/gridlabd/template/US/CA/SLAC"
aivanovalocal@PC99458 tariff_design % gridlabd template config set GITBRANCH "master"           
ERROR 2: commit is not valid
ERROR 1: <class 'SystemExit'> 2
ERROR [gridlabd-template]: Branch not found

Expected behavior

No errors when switching branches.

System information

  • GridLAB-D version: HiPAS GridLAB-D 4.3.1-220922 (develop) Darwin
  • Operating system: Darwin PC99458 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64
@aivanova5 aivanova5 added the bug Request a fix or change to the code label Oct 19, 2022
@dchassin
Copy link
Member

The problem is the repo doesn't contain the branch specified. This is a deeper issue with both the config set command and the attempt to use the config once it is set.

  1. The config set should check whether the setting is acceptable/valid and explain why it is not.
  2. The attempt to use the config doesn't diagnose the failure clearly. The error message is incredibly opaque and needs to be made more clear.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Request a fix or change to the code
Projects
None yet
Development

No branches or pull requests

2 participants