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

Action just reports Not Found #4229

Open
5 tasks done
richo opened this issue Nov 27, 2024 · 10 comments · May be fixed by #4230
Open
5 tasks done

Action just reports Not Found #4229

richo opened this issue Nov 27, 2024 · 10 comments · May be fixed by #4230

Comments

@richo
Copy link

richo commented Nov 27, 2024

Describe the issue

I'm trying to use the action to validate my integration and get it ready for HACS, but the action just reports Error: Not Found when I run it with my code in a custom_components directory.

I've been shotgun debugging it all morning, it correctly reports that my structure is incorrect when there's a module at the root so I'm not sure what I'm doing wrong. I'm happy to try to add some diagnostics for future travelers.

I've linked to my actions run if but if you look at some earlier ones like https://github.com/richo/homeassistant-franklinwh/actions/runs/12056265608/job/33618408938 it is definitely looking at the right repo.

Link to action run

https://github.com/richo/homeassistant-franklinwh/actions/runs/12056306977/job/33618539938?pr=20

Link to action configuration

https://github.com/richo/homeassistant-franklinwh/blob/main/.github/workflows/validate.yaml

Checklist

  • I have filled out the issue template to the best of my ability.
  • I have read https://hacs.xyz/docs/help/issues/
  • This issue is related to the HACS action.
  • This is a bug and not a feature request.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
@hacs-bot
Copy link

hacs-bot bot commented Nov 27, 2024

Make sure you have read the issue guidelines and that you filled out the entire template.

If you have an issue identical to this, do not add comments like "same here", "i have this too", instead add a 👍 reaction to the issue description. Thanks! 👍

@richo
Copy link
Author

richo commented Nov 27, 2024

I did some more poking around and my intuition is that it's this:

except HacsException as exception:
error(exception)

Firing, maybe because my repo needs to already be in HACS for this lint to work? But it's hard for me to guess and I couldn't see an easy path to running this locally to be able to inspect it a little closer.

@tjorim
Copy link
Contributor

tjorim commented Nov 27, 2024

Did you try to make the custom integration repository structure compliant?
https://hacs.xyz/docs/publish/integration/#repository-structure

@richo
Copy link
Author

richo commented Nov 27, 2024

Yes. The repo previously wasn't compliant, and the action gave me an error to that effect (I linked to such a run in my issue, but it says Error: <Integration richo/homeassistant-franklinwh> Repository structure for refs/heads/richo/hacs is not compliant).

However, now that my repo is (I believe) compliant, the action just says Error: Not Found.

@tjorim
Copy link
Contributor

tjorim commented Nov 27, 2024

I did not notice you were working in a branch, not sure if related to the current error but there doesn't seem to be a hacs.json file present.

@richo
Copy link
Author

richo commented Nov 27, 2024

I bet that's the issue!! I didn't realise I needed one, I might have started from the wrong guide.

I'm going to update my PR here to also show where hacs.json hacs/documentation#599 should go, I think that would have helped me out. Thankyou!

@tjorim
Copy link
Contributor

tjorim commented Nov 27, 2024

If that's not the case, it might be the branch name containing a forward slash.

@richo
Copy link
Author

richo commented Nov 27, 2024

Seemingly not, to either. :(

I just created a new PR off a branch with no slash in it. Do I need to add credentials to my action or something? I am really not sure what I've done wrong, the hassfest action is working and the way I have them setup appears very similar. Do I need to setup any extra permissions on the repo or something?

This is the latest run, still giving the same error: https://github.com/richo/homeassistant-franklinwh/actions/runs/12059681208/job/33628744289

@richo
Copy link
Author

richo commented Nov 27, 2024

In case you're also looking at this, I managed to get the action to run locally and it's barfing with a

aiogithubapi.exceptions.GitHubNotFoundException: Not Found

seemingly caused by including the repo@ref syntax in the call to the github API? I think I can probably fix it and get a PR up today.

@richo
Copy link
Author

richo commented Nov 28, 2024

I just opened a PR with a candidate fix for this, it appears to work locally but I had to work around some of how ref parsing works in order to make it go.

The tl;dr is that for some configurations the ref is silently ignored and whatever manifest exists on the default branch was what was checked, which probably mostly works since I'm guessing it's relatively rarely changed.

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

Successfully merging a pull request may close this issue.

2 participants