Skip to content

Polish new Firestore GA jobs #7568

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

Merged
merged 12 commits into from
Aug 17, 2023
Merged

Polish new Firestore GA jobs #7568

merged 12 commits into from
Aug 17, 2023

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Aug 16, 2023

Improvements:

  • build is a separate step while result-grepping happens later, build error will fail the job
  • a new job check-required-tests is introduced to check the test results at the end of the workflow
  • bring back Compatible tests on Firefox

As a result, the new check-required-tests should be marked as "required", it works correctly when

  • there is no firestore change, the job will run to success.
  • there is firestore build error, or test error, the job will fail.
  • all firestore required tests run to success, the job will run to success as well.

@wu-hui wu-hui requested review from a team as code owners August 16, 2023 19:04
@changeset-bot
Copy link

changeset-bot bot commented Aug 16, 2023

⚠️ No Changeset found

Latest commit: fd3a86c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 16, 2023

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 16, 2023

@wu-hui wu-hui force-pushed the wuandy/PolishNewGAJobs branch from e8ba3c2 to 849a4e3 Compare August 16, 2023 19:46
@wu-hui wu-hui force-pushed the wuandy/PolishNewGAJobs branch from 849a4e3 to 7535ea9 Compare August 16, 2023 20:10
@wu-hui wu-hui force-pushed the wuandy/PolishNewGAJobs branch from 5749dce to c4e2574 Compare August 16, 2023 23:05
@wu-hui wu-hui force-pushed the wuandy/PolishNewGAJobs branch from c4e2574 to c5e40fb Compare August 16, 2023 23:22
@wu-hui wu-hui force-pushed the wuandy/PolishNewGAJobs branch from d9e5dc3 to 30c7d46 Compare August 17, 2023 17:36
@wu-hui wu-hui force-pushed the wuandy/PolishNewGAJobs branch from 30c7d46 to c94ff86 Compare August 17, 2023 17:41
@wu-hui wu-hui force-pushed the wuandy/PolishNewGAJobs branch from fbd28b7 to 13b4b9d Compare August 17, 2023 18:34
@wu-hui wu-hui force-pushed the wuandy/PolishNewGAJobs branch from 799923c to fd3a86c Compare August 17, 2023 19:23
@wu-hui wu-hui changed the title [Not Ready For Review] Polish new Firestore GA jobs Polish new Firestore GA jobs Aug 17, 2023
@wu-hui wu-hui requested a review from hsubox76 August 17, 2023 19:46
Copy link
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

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

Some drive-by comments

run: yarn build:changed firestore | egrep "Skipping all"
run: |
set -o pipefail
yarn build:changed firestore | tee ${{ runner.temp }}/yarn.log.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend adding 2>&1 so that stdout and stderr have their lines in the correct relative order.

i.e.

yarn build:changed firestore 2>&1 | ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently this does not work with yarn build:changed for reasons I don't want to find out.

run: |
set -o pipefail
yarn build:changed firestore | tee ${{ runner.temp }}/yarn.log.txt
continue-on-error: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is continue-on-error: false required? Isn't false the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No required, but I feel safer to keep it there.

# Continue when "Skipping all" is not found
continue-on-error: true
- name: set output
# This means "Skipping all" was not found
if: steps.build.outcome != 'success'
if: steps.check-changed.outcome != 'success'
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 really like that failure of the egrep command is conflated with the absence of "skipping all" from the output. Is there a more robust way to test for skipping the tests that you can think of?

Update: What about something like this:

skip_count=$(grep --count "Skipping all" test.txt)
echo "skip_count=$skip_count" >> "$GITHUB_OUTPUT"

Then later on you can do something like this:

if: steps.check-changed.outputs.skip_count == 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's more worthwhile to change the script give more explicit result than doing grepping at all...not today though..i had enough github actions work recently.

@wu-hui wu-hui merged commit 345d198 into master Aug 17, 2023
@wu-hui wu-hui deleted the wuandy/PolishNewGAJobs branch August 17, 2023 20:10
@firebase firebase locked and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants