Skip to content
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

p4 trigger not doing anything but manually running script works #5

Open
ImagineTheGames opened this issue Apr 3, 2022 · 7 comments

Comments

@ImagineTheGames
Copy link

ImagineTheGames commented Apr 3, 2022

It works when I called it manually for change 9, but it wont work for any changes that I'm pushing.. can you help me please this is the output log:

:: Running perforce_discord_webhook.sh

:: Sending webhook...

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M100 261 0 0 100 261 0 3000 --:--:-- --:--:-- --:--:-- 3000

===== DEBUG =====
:: Linux user:
root

:: Linux path:
/mnt/perforcedisk/discordwebhook

:: p4 info:
User name: ReiVieira
Client name: my_client
Client host: ghosts-perforce
Client unknown.
Current directory: /mnt/perforcedisk/discordwebhook
Peer address: 127.0.0.1:57382
Client address: 127.0.0.1
Server address: localhost:3000
Server root: /mnt/perforcedisk/perforce/root
Server date: 2022/04/03 19:08:18 +0000 UTC
Server uptime: 00:12:04
Server version: P4D/LINUX26X86_64/2021.2/2264565 (2022/03/22)
ServerID: perforce
Server services: commit-server
Server license: none
Case Handling: insensitive

:: output:
Change 9 by ReiVieira@ReiVieira_DESKTOP_GOT_Dev on 2022/04/02 12:20:29

    remove error messagse from unused anim bp

Affected files ...

... //Streams/Dev-GhostsOfTabor/GhostsOfTabor/Content/A_GhostsOfTabor/Blueprints/Character/Animation/ThirdPerson_AnimBP.uasset#2 edit

:: desc:
remove error messagse from unused anim bp

:: user:
ReiVieira@ReiVieira_DESKTOP_GOT_Dev

:: embed:
{ "username":"P4V","avatar_url":"https://i.imgur.com/unlgXvg.png","embeds":[{ "title":"Change 9 by ReiVieira@ReiVieira_DESKTOP_GOT_Dev","color":"701425","fields":[{ "name":"Description","va>
","inline":false} ]}]}

:: Arg 1:
9

:: Arg 2:
webhooklink

@ImagineTheGames
Copy link
Author

ImagineTheGames commented Apr 3, 2022

and thiis is my trigger

Triggers:
discord change-commit //depot/... "/bin/bash /mnt/perforcedisk/discordwebhook/perforce_discord_webhook.sh %changelist% link

@ImagineTheGames
Copy link
Author

ImagineTheGames commented Apr 3, 2022

is this important?
image
its not in depot but in streams

@ImagineTheGames
Copy link
Author

tried it by changing depot to Streams but still didnt work

@ImagineTheGames
Copy link
Author

ive also checked the .conf file and my user is the same as I log in with

@ImagineTheGames
Copy link
Author

ive verified these triggers are present on the server too, not sure what im doing wrong

@saadbruno
Copy link
Owner

saadbruno commented Apr 4, 2022

hey! Appreciate you asking for help. In the future, i'd advise putting everything in a single comment to avoid spam.

Another really important thing: you just posted your Discord webhook URL publicly, this is really bad, since anyone can now push updates to that URL. I'd strongly advise changing it asap. (Don't forget to update your trigger)

Anyways.

In your first message, you omitted the first few lines of the output.log file. Make sure to scroll up in nano after opening the file. There's a few info in there that can help debugging it.

--

Here's a few things that i would try in order to debug this. In this specific order:

1 - check if the trigger is actually working

In your case, it seems to me that you're using streams, rather than the depot. I have never used perforce streams, so I don't know how triggers interact with them.

Perforce documentation also has a good article explaining how to debug triggers.
Another option to test if the trigger is actually running the script (even if it's failing) is to delete your output.log file, submit something to perforce, and check if the script generated a new output.log without running the script manually.
If it did, then your problem lies somewhere else.

2 - Check if the script can actually read your changelists.

If you found out that your trigger is actually working (meaning it is calling the perforce_discord_webhook.sh script, but you're still not getting any webhooks, then look into the other issues here on github. Most of the opened issues so far deals with this problem. In some cases it was a mismatch between the linux user and the perforce user, or failing to authenticate properly.

I would suggest you trying those things, to understand what it is failing, then we can actually start looking into solutions

@ImagineTheGames
Copy link
Author

updated the output log, but will try the rest now

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

No branches or pull requests

2 participants