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

remove export from shell session to avoid the inconsistency #22932

Conversation

fujitatomoya
Copy link
Contributor

@fujitatomoya fujitatomoya commented Jan 4, 2023

Description

adding export to be environmental variable would be better for user-friendly installation doc, because that user would be likely to copy and paste the command described in this shell session to the terminal to process the installation.

Signed-off-by: Tomoya Fujita Tomoya.Fujita@sony.com

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Thanks for contributing!

@fujitatomoya fujitatomoya requested review from a team as code owners January 4, 2023 23:08
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 4, 2023
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Jan 4, 2023
@fujitatomoya
Copy link
Contributor Author

  • Those are just shell variables, user cannot use the following procedure via terminal
root@edgemaster:~# CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/master/stable.txt)
root@edgemaster:~# CLI_ARCH=amd64
root@edgemaster:~# if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi
root@edgemaster:~# env | grep CLI
  • Successfully exported as environmental variable
root@edgemaster:~# export CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/master/stable.txt)
root@edgemaster:~# export CLI_ARCH=amd64
root@edgemaster:~# if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi
root@edgemaster:~# env | grep CLI
CLI_ARCH=amd64
CILIUM_CLI_VERSION=v0.12.11

@kaworu kaworu added area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. release-note/misc This PR makes changes that have no direct user impact. labels Jan 5, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 5, 2023
@kaworu
Copy link
Member

kaworu commented Jan 6, 2023

Hi @fujitatomoya and thanks for the PR.

Theses variables don't need to be exported for the steps to work, instead of env | grep CLI one can use set | grep CLI to find shell variables. I would be inclined to remove export from export HUBBLE_VERSION instead for consistency and avoiding unnecessary export. What do you think?

@qmonnet
Copy link
Member

qmonnet commented Jan 6, 2023

Another argument in favour of removing unnecessary exports is that the syntax for exporting variables might differ for some less common shells (fish, for example, I think?).

@fujitatomoya
Copy link
Contributor Author

Okay, that also makes sense to me. I wasnt clear that if those are intended to be shell variables or environmental variable using terminal console. probably just remove export to keep the consistency, that would be better, fix coming up soon.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya fujitatomoya force-pushed the doc/20230104-env-variable-is-not-effective branch from 424f9f8 to cb1dc2c Compare January 6, 2023 18:06
@fujitatomoya
Copy link
Contributor Author

@kaworu @qmonnet could you help review again? thanks!

@fujitatomoya fujitatomoya changed the title add export to be environmental variables. remove export from shell session to avoid the inconsistency Jan 6, 2023
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Looks good, thank you

Copy link
Member

@kaworu kaworu left a comment

Choose a reason for hiding this comment

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

Thanks @fujitatomoya!

@kaworu
Copy link
Member

kaworu commented Jan 9, 2023

This is purely a doc change patch, no need for a full CI run and all reviews are in so marking as ready-to-merge.

@kaworu kaworu added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 9, 2023
@aditighag aditighag merged commit 2633e87 into cilium:master Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants