Skip to content

Combine environment setting steps into one step with shell script #1010

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 23 commits into from
Jul 11, 2022

Conversation

sunmou99
Copy link
Contributor

@sunmou99 sunmou99 commented Jun 30, 2022

Description

Removed some environment setting steps, now we are using the following script to set Integration Test CI environments:
python scripts/gha/install_prereqs.sh - ${platform}

Other experiments :

  • If the workflow specified a Windows runner, you would use the different syntax for PowerShell, $env:NAME. (source)
  • While using python scripts, I failed to specify bash.exe as the shell on Windows runner.
  • Windows git command line can be different. (source)
  • Need workaround to use Github Action context variables in shell script. (discussion)
  • lint_commenter raise UnidiffParseError('Unexpected trailing newline character') if the PR change end with a "file name change without file content change". (example)

Testing

See the comment below


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

@sunmou99 sunmou99 added the skip-release-notes Skip release notes check label Jun 30, 2022
@sunmou99 sunmou99 marked this pull request as ready for review June 30, 2022 06:26
@sunmou99 sunmou99 added the tests-requested: quick Trigger a quick set of integration tests. label Jun 30, 2022
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: quick Trigger a quick set of integration tests. labels Jun 30, 2022
@github-actions
Copy link

github-actions bot commented Jun 30, 2022

❌  Integration test FAILED

Requested by @sunmou99 on commit 5ccf419
Last updated: Mon Jul 11 15:11 PDT 2022
View integration test log & download artifacts

Failures Configs
database [TEST] [ERROR] [Windows] [x64] [openssl]
firestore
(5 items)[TEST] [ERROR] [Android] [1/3 os: ubuntu] [1/2 android_device: android_target]
[TEST] [ERROR] [Windows] [x64] [openssl]
[TEST] [FAILURE] [Android] [1/3 os: ubuntu] [1/2 android_device: android_target]
(2 failed tests)  ServerTimestampTest.TestServerTimestampsCanReturnPreviousValueOfDifferentType
  WriteBatchTest.TestCanWriteTheSameDocumentMultipleTimes
[TEST] [FAILURE] [iOS] [macos] [1/2 ios_device: simulator_target]
(1 failed tests)  NumericTransformsTest.MultipleDoubleIncrements
[TEST] [FLAKINESS] [Android] [1/3 os: macos] [1/2 android_device: android_target]
(1 failed tests)  CRASH/TIMEOUT

Add flaky tests to go/fpl-cpp-flake-tracker

@sunmou99 sunmou99 changed the title Feature/it env sh script Combine environment setting steps into one step with shell script Jun 30, 2022
@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Jun 30, 2022
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jun 30, 2022
@sunmou99 sunmou99 requested a review from jonsimantov June 30, 2022 16:21
@sunmou99 sunmou99 added the tests-requested: quick Trigger a quick set of integration tests. label Jun 30, 2022
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests-requested: quick Trigger a quick set of integration tests. tests: failed This PR's integration tests failed. labels Jun 30, 2022
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jul 1, 2022
- uses: actions/checkout@v2
with:
ref: ${{needs.check_and_prepare.outputs.github_ref}}
submodules: true
- name: Store git credentials for all git commands
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this step still happening? It's important for the GitHub runners to store the token for all git commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@sunmou99 sunmou99 Jul 1, 2022

Choose a reason for hiding this comment

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

Why it's important, e.g. what will happen if we don't have it? And does step the order matters?

Copy link
Contributor

@jonsimantov jonsimantov Jul 1, 2022

Choose a reason for hiding this comment

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

This helps us with the issue where GitHub would throttle anonymous Git requests (requests without a token). It's important when downloading external projects, fetching cocoapods, etc. (#727)

@sunmou99 sunmou99 requested a review from jonsimantov July 1, 2022 18:37
Copy link
Contributor

@jonsimantov jonsimantov left a comment

Choose a reason for hiding this comment

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

LGTM - this doesn't affect packaging, right?

@sunmou99
Copy link
Contributor Author

sunmou99 commented Jul 11, 2022

LGTM - this doesn't affect packaging, right?

Yeah, this only affects the testing part.

@sunmou99 sunmou99 removed the tests: failed This PR's integration tests failed. label Jul 11, 2022
@sunmou99 sunmou99 enabled auto-merge (squash) July 11, 2022 17:29
@sunmou99 sunmou99 merged commit 5ccf419 into main Jul 11, 2022
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label Jul 11, 2022
@sunmou99 sunmou99 deleted the feature/it-env-sh-script branch July 11, 2022 21:45
@sunmou99 sunmou99 restored the feature/it-env-sh-script branch July 11, 2022 21:55
@sunmou99 sunmou99 deleted the feature/it-env-sh-script branch July 11, 2022 21:56
@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Jul 11, 2022
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jul 11, 2022
dconeybe added a commit that referenced this pull request Jul 16, 2022
…ript (#1010)"

This reverts commit 5ccf419.

This is a potential fix for the test failures of `test-desktop-windows-latest-x64-openssl`
dconeybe added a commit that referenced this pull request Jul 18, 2022
AlmostMatt added a commit that referenced this pull request Jul 18, 2022
AlmostMatt added a commit that referenced this pull request Jul 18, 2022
sunmou99 added a commit that referenced this pull request Jul 18, 2022
@firebase firebase locked and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip-release-notes Skip release notes check tests: failed This PR's integration tests failed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants