Closed khromov closed 2 years ago
This might be related to the action now supporting outputs, it tries to store what the CLI spits out and if it errors out and ends the action before it can echo it this might stop it from printing out the response. Let me try removing this from master and if you want try using the docker option to point to the master image instead. Should give you a real response.
We were having this problem too, functions deployment failing but no error logging. Pointing to the docker master fixed it and we are now getting the logs we need, thanks!
FWIW: to use the docker options pointed by @w9jds , just change
uses: w9jds/firebase-action@master
to
uses: docker://w9jds/firebase-action:master
@gelouko I tried updating this and running it, and I do get further than before, but it still fails with An unexpected error has occurred
##[debug]Evaluating: secrets.FIREBASE_TOKEN_ACCOUNT_HALO_APP_PROD_<>
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'FIREBASE_TOKEN_ACCOUNT_HALO_APP_PROD_<>'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating condition for step: 'Deploy to Firebase'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Deploy to Firebase
##[debug]Loading inputs
##[debug]Loading env
Run docker://w9jds/firebase-action:master
/usr/bin/docker run --name w9jdsfirebaseactionmaster_5944[2](https://github.com/urbanrobo/app/runs/6629626694?check_suite_focus=true#step:8:2)b --label 08[4](https://github.com/urbanrobo/app/runs/6629626694?check_suite_focus=true#step:8:4)[5](https://github.com/urbanrobo/app/runs/6629626694?check_suite_focus=true#step:8:5)0d --workdir /github/workspace --rm -e FIREBASE_TOKEN -e PROJECT_ID -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_DEBUG -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/app/app":"/github/workspace" w9jds/firebase-action:master deploy -f
setting firebase project to halo-app-prod-<>
Now using project halo-app-prod-<>
=== Deploying to 'halo-app-prod-<>'...
i deploying database, storage, firestore, functions, hosting, remoteconfig
Running command: yarn workspace @urbanrobo/functions bundle
bundled/index.js 7.[6](https://github.com/urbanrobo/app/runs/6629626694?check_suite_focus=true#step:8:6)mb ⚠️
bundled/index.js.map 26.5mb
⚡ Done in 1446ms
Running command: mv packages/functions/package.bundle.json packages/functions/package.json
✔ functions: Finished running predeploy script.
i database: checking rules syntax...
✔ database: rules syntax for database halo-app-prod-<>-default-rtdb is valid
i firebase.storage: checking storage.rules for compilation errors...
✔ firebase.storage: rules file storage.rules compiled successfully
i firestore: reading indexes from firestore.indexes.json...
i cloud.firestore: checking firestore.rules for compilation errors...
⚠ [W] [8](https://github.com/urbanrobo/app/runs/6629626694?check_suite_focus=true#step:8:8):14 - Unused function: isSignedIn.
⚠ [W] [9](https://github.com/urbanrobo/app/runs/6629626694?check_suite_focus=true#step:8:9):[14](https://github.com/urbanrobo/app/runs/6629626694?check_suite_focus=true#step:8:14) - Invalid variable name: request.
✔ cloud.firestore: rules file firestore.rules compiled successfully
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
i functions: preparing codebase default for deployment
Error: An unexpected error has occurred.
##[debug]Docker Action run completed with exit code 2
##[debug]Finishing: Deploy to Firebase
Could it be that I'm trying to deploy to alias prod
? What does codebase default
mean? That didn't show up in the non-dockerized tool
@w9jds Tried to point to master or even the exact commit hash of your fix but still no logs. Noticed that the command itself still refers to v2.1.2
of the action, even though it's fetching the latest commit:
2022-05-29T21:17:56.7224198Z ##[group]Run w9jds/firebase-action@1e278621b8467eff7eb0248e275bef80e85360df
2022-05-29T21:17:56.7224486Z with:
2022-05-29T21:17:56.7224682Z args: deploy --only functions
2022-05-29T21:17:56.7224881Z env:
2022-05-29T21:17:56.7225425Z FIREBASE_TOKEN: ***
2022-05-29T21:17:56.7225632Z ##[endgroup]
2022-05-29T21:17:56.7229869Z ##[command]/usr/bin/docker run --name w9jdsfirebaseactionv212_360f88 --label 08450d --workdir /github/workspace --rm -e FIREBASE_TOKEN -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/project/project":"/github/workspace" w9jds/firebase-action:v2.1.2 deploy --only functions
2022-05-29T21:18:18.0081320Z Post job cleanup.
I did try to use docker://w9jds/firebase-action:master
as @gelouko suggested and that gave me the root cause of my issue, I had removed a function from the code and the action wouldn't proceed:
Error: The following functions are found in your project but do not exist in your local source code:
newUserV2(europe-west1)
But it still seems like no logs are shown if you're not using 🐋 Docker.
Both technically use docker, using the docker image directly above just points to the code currently in master branch instead of what is currently in the latest release. Latest release tries to take the output of the command and return it as an output for the action, where I disabled the functionality on master so you can properly get your logs.
That error doesn't look related to the action though, that looks like either code is missing in your pipeline or deployment is expecting a configured function that is missing.
@w9jds Great, understood. ⭐ In my specific case I had removed a function that existed in production and that is why the action bailed (which is sane behaviour). I can also confirm that switching to the Docker version on master works and produces output, so I guess the issue is that the error is not sent to the output properly in the latest tagged version.
@w9jds could you please revert to the previous behaviour. It is extremely frustrating to have errorless fails and to have to edit the action yml
s to find out what is wrong :)
Changing the version to v2.1.0
should get the errors to appear
This should be fixed (without removing the outputs) with v2.2.0
This should be fixed (without removing the outputs) with v2.2.0
@w9jds I'm still experiencing the issue, is v2.2.0
rolled out yet?
I just ran a quick POC and it seems like the shell is returning 0 regardless of what firebase is saying should be the exit code. Threw up a PR to address this.
Recently (in the past month) this action stopped working for us. Running
firebase deploy --only=functions
works from a local machine. It could be connected to us upgrading functions to run on Node 16 but even after reverting that change it still doesn't deploy. There is no error message but the task exits with an error code and without output.Log:
Workflow file: