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

The values stored within some CheckFacts instances are not consistent. #891

Open
tromai opened this issue Oct 2, 2024 · 0 comments
Open

Comments

@tromai
Copy link
Member

tromai commented Oct 2, 2024

During my exploration, I noticed something with our current setup of checks.

Let's take the build as code check as an example. The build as code check will create instances of BuildAsCodeFacts

class BuildAsCodeFacts(CheckFacts):

Those instances stores information that will later be put into the SQLite database. A BuildAsCodeFacts instance has an attribute called deploy_command. At some places, the value stored to this attribute is a JSON - serialized value (e.g.

deploy_command=tool.serialize_to_json(build_command["command"]),
).

At other places, it's stored as a string without going through serialization:

and

This could be an issue if someone wants to read this field as the format is not consistent.

In additions, this issue also happens to build service check with BuildServiceFacts's build_command attribute

build_command: Mapped[str] = mapped_column(String, nullable=True, info={"justification": JustificationType.TEXT})

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

No branches or pull requests

1 participant