-
Notifications
You must be signed in to change notification settings - Fork 940
Setup separate GA jobs for firestore #7523
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
Conversation
|
dc65363
to
a595f19
Compare
a595f19
to
0809b3a
Compare
Size Report 1Affected ProductsNo changes between base commit (5dac8b3) and merge commit (4aec516).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (5dac8b3) and merge commit (4aec516).Test Logs |
7fa128d
to
3aa8e95
Compare
3aa8e95
to
f6442ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I applied some of your suggestions. Some of them seem to lead to other issues, which I do not want to chase down, as all the suggestions are maybe only saving us 30 seconds each run.
- name: Archive build | ||
if: ${{ !cancelled() }} | ||
run: | | ||
tar -cf build.tar . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This leads to tar complaining the directory changed while archiving, and it only happens with CI.
The old |
|
||
compat-test-chrome: | ||
name: Test Firestore Compatible | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty lines please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
name: Test Firestore Compatible | ||
|
||
runs-on: ubuntu-latest | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
- name: Run tests if firestore or its dependencies has changed | ||
run: yarn test:changed firestore | ||
id: build | ||
run: yarn build:changed firestore | egrep "Skipping all" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there's a build failure that doesn't produce the output Skipping All. Does it still generate an error in steps.build.outcome
(which is tested below)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the tests will run and they will fail for missing dependencies because build failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if there's a build failure then steps.build.outcome
will be success
?
Is there a way that we can make this job fail instead, so that the other jobs don't even start? Seems like it would be more clear as to where the problem is when an error occurs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, by piping the output from yarn build:changed firestore
through egrep
the entire output is lost. So if the build fails there will be no logs indicating why the build failed. Please find a way to do this while preserving the command's output in the logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we could make yarn build:changed > SOME_OUTPUT
a separate step, and do the grepping in the next step.
For now, can I get by with a TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd probably want to redirect stderr as well, so that it shows up inline. Using the tee
command seems like a good candidate here:
yarn build:changed 2>&1 | tee ${{ runner.temp }}/yarn.log.txt
This would print the output to stdout and also save it into a temp file. The next line in the step's bash script could run egrep
.
- name: Run tests if firestore or its dependencies has changed | ||
run: yarn test:changed firestore | ||
id: build | ||
run: yarn build:changed firestore | egrep "Skipping all" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, by piping the output from yarn build:changed firestore
through egrep
the entire output is lost. So if the build fails there will be no logs indicating why the build failed. Please find a way to do this while preserving the command's output in the logs.
- name: Archive build | ||
if: ${{ !cancelled() && steps.build.outcome != 'success' }} | ||
run: | | ||
tar -cf build.tar --exclude="\.git" . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Change --exclude="\.git"
to --exclude=.git
because you don't have to "escape" the .
character. The pattern given to --exclude
is a "glob" pattern (see man 7 glob
) which does not treat .
specially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will address in the next PR.
- name: Bump Node memory limit | ||
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV | ||
- name: Test setup and yarn install | ||
run: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: reduce this single-line bash script to one line (i.e. get rid of the pipe |
and bring the line below up to this line). Also on lines 113 and 148.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will address in the next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving approval to facilitate testing of the changes.
path: build.tar.gz | ||
retention-days: ${{ env.artifactRetentionDays }} | ||
|
||
compat-test-chrome: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add a compat-test-firefox
? It looks like the old code ran the compat tests on firefox as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will address in the next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder to make sure to add compat-test-firefox
to this repo's "required" checks when you add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I am going to merge this PR and address the comments in a followup one, such that people can run these checks now.
- name: Archive build | ||
if: ${{ !cancelled() && steps.build.outcome != 'success' }} | ||
run: | | ||
tar -cf build.tar --exclude="\.git" . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will address in the next PR.
path: build.tar.gz | ||
retention-days: ${{ env.artifactRetentionDays }} | ||
|
||
compat-test-chrome: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will address in the next PR.
- name: Bump Node memory limit | ||
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV | ||
- name: Test setup and yarn install | ||
run: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will address in the next PR.
This PR utilizes setup different github actions jobs for different flavors of Firestore integration tests, as opposed to running them from one single job. This brings benefits:
Please see the new CI checks from the last two commits: