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

Sort fetched_chart_dir into alphabetical order #1064

Merged
merged 5 commits into from
Apr 9, 2020

Conversation

jaxxstorm
Copy link
Contributor

@jaxxstorm jaxxstorm commented Apr 7, 2020

When using fetch_opts with the python sdk, the directory we extract
the helm chart into contains 2 directories:

  • chart-name
  • chart-name-v.tgz

By sorting these directories into alphabetical order, we get the
directory with the extracted chart in, meaning we fix the fetchopts call

Proposed changes

Related issues (optional)

Fixes #1063

When using `fetch_opts` with the python sdk and `Fetch` with the dotnet
sdk, the directory we extract the helm chart into contains 2 directories:

- chart-name
- chart-name-v<something>.tgz

By sorting these directories into alphabetical order, we get the
directory with the extracted chart in, meaning we fix the fetch opts
call for both SDKs

Fixes #1063
fs.readdirSync() currently will return an ordered array, but it's not
expected behaviour (see nodejs/node#3232)

In order to bring parity to all the SDKs, I've added an explicit sort to
the returned array
@jaxxstorm jaxxstorm force-pushed the jaxxstorm/helm_fetch_bugfix branch from f5192c9 to 87bc3c2 Compare April 7, 2020 23:56
os.listdir already returns a list, so we don't need to add another one
:)
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.

Helm Chart with "FetchOpts" doesn't render correctly
2 participants