fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
Apache License 2.0
2.65k stars 144 forks source link

[Bug] Few CI steps does not pass #2763

Open zdunecki opened 9 months ago

zdunecki commented 9 months ago

Describe the bug

It looks like an issue in CI process. For two steps (docs and ete-tests) looks like a fern token is invalid or missing (I guess). It's not my local machine, it's a Github server so it should work remotely.

To reproduce

Make PR where docs or ete-tests are needed.

Expected behavior

This CI steps should be passed.

Screenshots

Screenshot 2024-01-24 at 01 06 47 Screenshot 2024-01-24 at 01 04 34
dannysheridan commented 9 months ago

+1

example of ETE tests failing elsewhere: https://github.com/fern-api/fern/pull/2639 example of preview docs failing elsewhere: https://github.com/fern-api/fern/pull/2762

minaelee commented 9 months ago

Looks like preview-docs fails for anyone not in fern org: https://github.com/fern-api/fern/actions/workflows/preview-docs.yml

dannysheridan commented 9 months ago

@minaelee I think this stems from the use FERN_TOKEN in the workflow. github secrets may not be accessible to workflows triggered by pull requests from forks.

do you think we can use workflow_dispatch to allow a core maintainer to trigger the GitHub Action?

zdunecki commented 9 months ago

@dannysheridan @minaelee

I see few solutions to solve that.

You can add notice into CONTRIBUTING.md that contributors must add a secret with a fern token inside the forked repo. You could share these tokens in Discord or elsewhere (maybe in some automated way).

If the above solution is not possible or you don't like that maybe you could add some script inside GitHub workflows to fetch tokens internally on behalf of contribution - then you don't have to share your tokens with folks.

Manual dispatch looks fine but probably you'll need more manual effort for you.

If you see another solution to fix that, great to discuss that.

dannysheridan commented 9 months ago

I'd prefer not to share the fern token secret. Let's do the manual effort approach for now! Would take a PR to include in our github actions if either of y'all are up for it.

dannysheridan commented 8 months ago

trying: https://github.com/fern-api/fern/pull/2840