Skip to content

Reuse workflows - #338

Merged
tisonkun merged 8 commits into
apache:mainfrom
tisonkun:reuse-workflow
Dec 17, 2022
Merged

Reuse workflows#338
tisonkun merged 8 commits into
apache:mainfrom
tisonkun:reuse-workflow

Conversation

@tisonkun

Copy link
Copy Markdown
Member

Signed-off-by: tison wander4096@gmail.com

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun

tisonkun commented Dec 15, 2022

Copy link
Copy Markdown
Member Author

Maven compile can meet StackOverflowError sometimes. Any thoughts?

For example https://github.com/apache/pulsar-site/actions/runs/3705285707/jobs/6279000910

steps:
- uses: actions/checkout@v3
- name: Sync content without push
uses: ./.github/actions/sync-content

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

how does it decide not to attempt to push?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's decided at:

def _should_push(mode: Mode) -> bool:
match mode:
case Mode.y:
return True
case Mode.n:
return False
case Mode.auto:
repo = os.getenv('GITHUB_REPOSITORY')
event = os.getenv('GITHUB_EVENT_NAME')
print(f'repo={repo}, event={event}')
result = (repo is not None) and (repo == 'apache/pulsar-site')
result = result and (event is not None) and (event != 'pull_request')
return result

We pass the default value auto in the CI env and it pushes only if it's in the CI env && in the upstream repo && not triggered by a pull_request event.

But since we split workflows now, it's an alternative we pass explicit push=y or n as an argument.

@lhotari

lhotari commented Dec 15, 2022

Copy link
Copy Markdown
Member

Maven compile can meet StackOverflowError sometimes. Any thoughts?

For example https://github.com/apache/pulsar-site/actions/runs/3705285707/jobs/6279000910

@tisonkun I had to add make apache/pulsar#18602 in apache/pulsar to mitigate the issue. Add -Xss1500k to MAVEN_OPTS.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun

Copy link
Copy Markdown
Member Author

Add -Xss1500k to MAVEN_OPTS.

Updated.

@tisonkun

Copy link
Copy Markdown
Member Author

Merging...

Other improvement can be follow-ups.

Currently, my most wanted issue is apache/pulsar#18947

@tisonkun
tisonkun merged commit 7379b6c into apache:main Dec 17, 2022
@tisonkun
tisonkun deleted the reuse-workflow branch December 17, 2022 06:53
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.

2 participants