github / github/copilot-sdk

Regression in `1.0.13`: `session.send_and_wait` fails with `400` Bad Request in GitHub Actions (works on `1.0.11`)

Aperta
#2,559 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
support-escalation support-sev2
Lingua principale
Java
Stelle
10.5k
Fork
1.5k
Merge medio
1g 11h
PR unite (30g)
127

Descrizione

# **Warning - This might be a public repository, please be mindful of sharing sensitive data**

## Why are you seeing this issue?
This is a [support escalation](https://github.com/github/support/blob/main/ticket-processes/escalating-outside-support.md#escalating-to-engineering-and-product-teams)! You can find out more about expectations on communications and response times in the [on-call docs](https://thehub.github.com/epd/engineering/incident-response/support-to-engineering-escalation-process/#support-escalation-response-procedures-and-best-practices). Thank you for doing your part to keep GitHub customers happy!

## Severity
_Note, for Sev1 issues always page the team first, using the PagerDuty information in the [service catalog](https://catalog.githubapp.com/services) and the command `.pager trigger N/A `. Opening an issue for a Sev2 incident can come later (and can be done by the available Escalation Engineer)._

- [ ] sev1 - **Engineering must _respond_, when paged, within 1 business day**
- [x] sev2 - **Engineering must _respond_ to this issue within 2 business days**
- [ ] sev3 - **Engineering must _respond_ to this issue within 2 business days**

## Service
[copilot-sdk](https://catalog.githubapp.com/services?service=copilot-sdk)

## Context
_:warning: Kindly provide all the requested information to ensure a prompt and efficient response. :warning:_

**GitHub Support Plan**

- [ ] Top 20
- [x] Premium Plus
- [ ] Premium
- [ ] Enterprise
- [ ] Free/Pro/Team

**GitHub Product(s) Impacted (check appropriate boxes and provide GHES version if applicable)**

- [x] GitHub.com (including GHEC)
- [ ] GitHub Enterprise Server.
- [ ] Running version: x.y.z
- [ ] Recently upgraded from version: x.y.z (upgrade date: yyyy-mm-dd)
- [ ] Proxima (ghe.com)
- [ ] Customer tenant: -

**Customer Impact**

If applicable, list the impacted entities:
- [x] Enterprise: - Sabre Corporation
- [ ] Organization: -
- [ ] Repository: -
- [ ] User: -

**Zendesk Ticket(s), support bundles, and other relevant Issues and links**
- https://github.zendesk.com/agent/tickets/4735364

## Issue

> we have build some workflows/actions which use python/copilot-sdk to execute some code with copilot.
It was working fine until Friday (maybe longer, but we don't run it in weekends) but today we are getting errors.
We used GITHUB_TOKEN with copilot-requests: write persmission.

Using `1.0.11` works. On Friday we released `1.0.13` and that is confirmed that is causing the issue.

**To Reproduce**

Steps to reproduce the behavior:
1. Use the workflow and python from the ticket https://github.zendesk.com/agent/tickets/4735364
2. See the error
3. Force Copilot-sdk to be `1.0.11`
4. Now it works

**Expected behavior**

`1.0.13` not throwing `400` bad request.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Additional context**

[splunk](https://splunk.githubapp.com/en-US/app/gh_reference_app/search?earliest=1788760800&latest=1788778800&q=search%20index%3D*%20%224020%3A41139%3A1752DC9%3A1A47F55%3A6A9E7A01%22&display.page.search.mode=verbose&dispatch.sample_ratio=1&workload_pool=&sid=1788773903.89675_2DA2FCF5-3918-4AB7-BE2E-B8D81EDC01C6)

```
exception.message: request failed: checking server-to-server token: bad request: GitHub App Server-To-Server Tokens are not supported for this endpoint
```

That looks just weird. example request id in the splunk query. You can reproduce this easily.

cc:
@evanboyle
@patniko

**Support Squad(s)**: @github/support-squad-copilot @github/support-squad-c2c

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the Python workflow and reproduction steps in Zendesk ticket 4735364, then compare copilot-sdk versions 1.0.11 and 1.0.13 around session.send_and_wait. Use the reported 400 error and request ID to trace the server-to-server token check; done means the GitHub Actions workflow succeeds on 1.0.13 without that error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
github-actions, python
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.