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

[FLINK-30768] [Project Website] flink-web version cleanup #683

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

victor09091
Copy link

What is the purpose of the change

update versions (through variables) and adding references that these variables have to be updated to the corresponding versions that used in the Flink source code as well.

Brief change log

  • *modify q/gradle-quickstart.sh and q/sbt-quickstart.sh, *

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)

Copy link
Contributor

@XComp XComp left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up, @victor9309 . I added two comments. I'm curious about your opinion on that. PTAL

content/q/gradle-quickstart.sh Outdated Show resolved Hide resolved
content/q/gradle-quickstart.sh Show resolved Hide resolved
@victor09091
Copy link
Author

Thanks @XComp for the review. modify _include/q/gradle-quickstart.sh and extend the list variable that's already present in docs/config.toml

@victor09091 victor09091 changed the title [FLINK-30768] flink-web version cleanup [FLINK-30768] [Project Website] flink-web version cleanup Oct 20, 2023
Copy link
Contributor

@XComp XComp left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments. I have a few things that we need to address still. PTAL

_include/q/gradle-quickstart.sh Outdated Show resolved Hide resolved
_include/q/gradle-quickstart.sh Outdated Show resolved Hide resolved
_include/q/gradle-quickstart.sh Outdated Show resolved Hide resolved
docs/config.toml Outdated Show resolved Hide resolved
_include/q/quickstart-scala-SNAPSHOT.sh Outdated Show resolved Hide resolved
_include/q/quickstart-scala.sh Outdated Show resolved Hide resolved
_include/q/quickstart.sh Outdated Show resolved Hide resolved
_include/q/sbt-quickstart.sh Outdated Show resolved Hide resolved
_include/q/sbt-quickstart.sh Show resolved Hide resolved
@victor09091
Copy link
Author

Thanks @XComp for the review.
I validate the return value, but I don't know if I need to exit the shell script or print if there is no valid value.
Test no valid value:
image

image

I changed the config directory, please check to see if it is correct
image

_include/q/_utils.sh Outdated Show resolved Hide resolved
_include/q/_utils.sh Outdated Show resolved Hide resolved
@victor09091
Copy link
Author

Thanks @XComp for the review. Thank you very much for your advice.

$ cat foo-utils.sh 
function foo() {
  echo 'foo...........' >&2
  exit 1
}
$ cat foo-main.sh 
source ./foo-utils.sh

v=$(foo)
echo "$v"
echo "end-------------"

image

I found that exit 1 in the function can not exit the script, so I modify the logic, please check it

$ cat foo-utils.sh 
export TOP_PID=$$
trap 'exit 1' TERM
function foo() {
   echo 'foo...........' >&2
   kill -s TERM $TOP_PID
}

$ cat foo-main.sh 
source ./foo-utils.sh

v=$(foo)
echo "$v"
echo "end-------------"

image

Copy link
Contributor

@XComp XComp left a comment

Choose a reason for hiding this comment

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

I did another thorough pass over it. PTAL

Just as a heads-up: There should be a conflict in this PR popping up soon because of the 1.18.0 release happening right now.

_include/q/_utils.sh Show resolved Hide resolved
_include/q/_utils.sh Outdated Show resolved Hide resolved
_include/q/_utils.sh Outdated Show resolved Hide resolved
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
CONFIG_DIR="${SCRIPT_DIR}/../../docs/config.toml"

export TOP_PID=$$
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export TOP_PID=$$
# fatal error handling
export PROCESS_PID=$$

Copy link
Contributor

Choose a reason for hiding this comment

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

You missed the renaming of the variable. I'm not sure what TOP stands for in this context. 🤔 Alternatively, you can replace "TOP" with the long version of this acronym.

_include/q/_utils.sh Outdated Show resolved Hide resolved
_include/q/gradle-quickstart.sh Outdated Show resolved Hide resolved
_include/q/quickstart-SNAPSHOT.sh Outdated Show resolved Hide resolved
_include/q/quickstart-scala-SNAPSHOT.sh Outdated Show resolved Hide resolved
_include/q/quickstart-scala.sh Outdated Show resolved Hide resolved
_include/q/quickstart.sh Outdated Show resolved Hide resolved
@victor09091
Copy link
Author

victor09091 commented Oct 26, 2023

Thanks @XComp for the review. I really feel what you're suggesting

Copy link
Contributor

@XComp XComp 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. :-) Just a minor discussion point on the variable name.

SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
CONFIG_DIR="${SCRIPT_DIR}/../../docs/config.toml"

export TOP_PID=$$
Copy link
Contributor

Choose a reason for hiding this comment

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

You missed the renaming of the variable. I'm not sure what TOP stands for in this context. 🤔 Alternatively, you can replace "TOP" with the long version of this acronym.

mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
-DarchetypeArtifactId=flink-quickstart-scala \
-DarchetypeVersion=${1:-1.17.0} \
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know why it didn't occur to me before but ./quickstart-scala.sh is failing since 1.17. This is because we removed scala support in 1.17. I created FLINK-33383 to cover this issue.

@victor09091
Copy link
Author

Thanks @XComp for the review. I changed the variable; If _includes/q/quickstart-scala.sh and _includes/q/quickstart-scala-SNAPSHOT.sh are removed, and if 1.7+ is not supported; Do you think that's okay if I don't make any changes?

Copy link
Contributor

@XComp XComp left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I added a few separate commits (e.g. reverting the log4j/slft4j version changes because I noticed that we don't necessarily have to align this version with the versions used in Flink). I felt bad to let you do this change again. That is why I did that in the end. I pushed the changes for transparency reasons.

I will squash the commits and rebuild the website. Thanks for your help 👍

@XComp XComp merged commit 95a7e09 into apache:asf-site Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants