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

Check artifacts iterating artifacts, not build info #140

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

jubeira
Copy link
Contributor

@jubeira jubeira commented Dec 13, 2024

Description

check-artifacts should iterate artifacts and compare to what you extract using build info.
In some cases, more than one artifact comes out of the same build info, and it's not being checked properly now.

If there's more than one build info and each artifact matches a different build info file this will still work.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Code refactor / cleanup
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • N/A Tests are included for all code paths
  • The base branch is either master, or there's a description of how to merge

Issue Resolution

N/A

Copy link
Collaborator

@EndymionJkb EndymionJkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - did the LBP one break, then?

Copy link
Contributor

@joaobrunoah joaobrunoah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it doesn't even use the build info then. It's probably nice to use the build-info in this part of the process, so we make sure the tests deploy with it and make sure the deployment will also have the correct data. I mean, the way it is, build-info is not required to make the tests to pass.

Maybe what you said about using the unique file in build-info, if the exact name of the artifact is not in there, makes more sense. Or even replicating the build-info for each file that we want to deploy makes sense.

@jubeira
Copy link
Contributor Author

jubeira commented Dec 13, 2024

Hmm, it doesn't even use the build info then. It's probably nice to use the build-info in this part of the process, so we make sure the tests deploy with it and make sure the deployment will also have the correct data. I mean, the way it is, build-info is not required to make the tests to pass.

It does use it. When you do task.artifact() it checks all build info files. If a build info file matches the name of the artifact it uses it, otherwise just uses what it has and searches there.

See here.

@jubeira
Copy link
Contributor Author

jubeira commented Dec 13, 2024

Maybe what you said about using the unique file in build-info, if the exact name of the artifact is not in there, makes more sense. Or even replicating the build-info for each file that we want to deploy makes sense.

With this change, if all artifacts come from the same build info it works, and if each artifact comes from a different build info with the same name it also works.

@jubeira
Copy link
Contributor Author

jubeira commented Dec 13, 2024

Looks good - did the LBP one break, then?

There was a missing link. Before this change, the code looked only for the factory (as there's a single build info file). Now it checks both artifacts (they both come from the same build info), and now they both need to have a valid link.

@jubeira jubeira merged commit 14dc560 into master Dec 13, 2024
30 checks passed
@jubeira jubeira deleted the fix-artifact-checks branch December 13, 2024 19:38
@joaobrunoah
Copy link
Contributor

Got it, makes sense!

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 this pull request may close these issues.

3 participants