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

Fix RelativeCI input issues #18196

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Conversation

silamon
Copy link
Contributor

@silamon silamon commented Oct 12, 2023

Proposed change

I've looked into the github action code and it seems like they no longer use the artifactwebpackstatsfile input:
https://github.com/relative-ci/agent-action/blob/5a64b486a2d123f21dda6780236f2de9b18bf478/src/index.ts#L46C47-L46C47

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@github-actions github-actions bot added the GitHub Actions Pull requests that update GitHub Actions code label Oct 12, 2023
@bramkragten
Copy link
Member

I think that part is fine, but this is not:

For legacy builds, it is not working, this might be because it uses the same artifact as the modern build?

Error: Artifact 'frontend-bundle-stats' could not be found! Please make sure 'artifactName' is correct.

It is trying to get wrong json file, this should be frontend-modern.json and frontend-legacy.json:

Error: Unable to unzip 'webpack-stats.json' from 'frontend-bundle-stats' archive. Please make sure the value of 'artifactWebpackStatsFile' is correct.

@bramkragten bramkragten merged commit 9f05a96 into home-assistant:dev Oct 12, 2023
@silamon
Copy link
Contributor Author

silamon commented Oct 12, 2023

I think that part is fine, but this is not:

For legacy builds, it is not working, this might be because it uses the same artifact as the modern build?

Error: Artifact 'frontend-bundle-stats' could not be found! Please make sure 'artifactName' is correct.

It is trying to get wrong json file, this should be frontend-modern.json and frontend-legacy.json:

Error: Unable to unzip 'webpack-stats.json' from 'frontend-bundle-stats' archive. Please make sure the value of 'artifactWebpackStatsFile' is correct.

I has become try and catch anyway. Next one:

  • code: 'BadRequest',
  • message: 'Project slug or RELATIVE_CI_KEY is invalid, make sure @relative-ci/agent configuration is correct'
    That's one I cannot solve I guess.

@steverep
Copy link
Member

Yeah this one should be reverted. I think you're right and it doesn't like that I put both in one artifact for whatever reason. I think I can fix it.

@steverep
Copy link
Member

@bramkragten try renaming the secrets with the slug part as lowercase (e.g. RELATIVE_CI_KEY_frontend_modern). The docs say secret names are case-insensitive, but maybe not so much. There's no easy string function to make them uppercase in GH expressions, and adding a script step just for that seems overkill.

@steverep
Copy link
Member

Also should probably set debug: true until we get it working.

@silamon
Copy link
Contributor Author

silamon commented Oct 12, 2023

I think it's working now. Are these stats somewhere publicly available?

@steverep
Copy link
Member

Almost... Bram and I are going back and forth on this and RelativeCI stepped in to help too. Trying to get reports on PR pages working.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed GitHub Actions Pull requests that update GitHub Actions code hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants