Skip to content

Conversation

@andmat900
Copy link
Contributor

Applicable Issues

Description of the Change

This change adds a basic artifact identifier validation making sure the start request gets a 400 Bad Request response if artifact validation fails.

Alternate Designs

Possible Drawbacks

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

Signed-off-by: Andrei Matveyeu, andrei.matveyeu@axis.com

Change-Id: Ie3ce15c2aedba33643f74066eb872fb5269261ec
@andmat900 andmat900 requested a review from a team as a code owner October 3, 2025 05:42
@andmat900 andmat900 requested review from fredjn and t-persson and removed request for a team October 3, 2025 05:42
), f"Test runner {test_runner} not found"


class ArtifactValidator:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isnt this validation already being made by the fact that we use StartEtosTestrun & StartEtos (or whatever they are called) pydantic models as input to our FastAPI functions?

I think the real problem with the ETOS API validation is that the client does not understand the response or we need to update the response code from the API (I think it is 422 Unprocessable Entity)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the field validator validate_id_or_identity so that 422 is returned when identity/id is present, but empty.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Im happy with this change, but @fredjn will have to approve it

Change-Id: I9d0bc8d32acf8b87c13933aee3511461ad8aef75
Change-Id: Ide38ae0b52e2658aad55b913223eb9675c2ae5a1
Change-Id: I9e89919fe2f8b5eb38fe4afad76929539ac2e546
@andmat900 andmat900 merged commit dceadca into eiffel-community:main Oct 27, 2025
5 checks passed
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