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 env var output #1507

Merged
merged 2 commits into from
Feb 2, 2024
Merged

fix env var output #1507

merged 2 commits into from
Feb 2, 2024

Conversation

sunkickr
Copy link
Contributor

@sunkickr sunkickr commented Jan 30, 2024

Description

fix problem causing astro deployment variable update/create --secret to end in a segmentation error. The value coming from the API was null so the print statement at the end of the command was getting a panic error. This PR makes it so the value prints as N/A when it is null. The variable value is null because it is secret

🎟 Issue(s)

Related #XXX

🧪 Functional Testing

List the functional testing steps to confirm this feature or fix.

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3116aba) 85.90% compared to head (d1bd584) 85.91%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1507   +/-   ##
=======================================
  Coverage   85.90%   85.91%           
=======================================
  Files         112      112           
  Lines       14847    14850    +3     
=======================================
+ Hits        12755    12758    +3     
  Misses       1254     1254           
  Partials      838      838           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

varTab.AddRow([]string{strconv.Itoa(index), environmentVariablesObjects[i].Key, *environmentVariablesObjects[i].Value, strconv.FormatBool(environmentVariablesObjects[i].IsSecret)}, false)
printValue := notApplicable
if environmentVariablesObjects[i].Value != nil {
printValue = *environmentVariablesObjects[i].Value
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to add test cases here considering our previous set of test cases didnt catch the error?

@sunkickr sunkickr merged commit a7d9c31 into main Feb 2, 2024
5 checks passed
@sunkickr sunkickr deleted the fix-var-output branch February 2, 2024 16:10
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