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

Bump conftest to 0.47.0 to unblock EC-55 #1190

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

mbestavros
Copy link
Member

https://issues.redhat.com/browse/EC-55 was blocked on the inclusion of open-policy-agent/conftest#877 in Conftest. With the release of Conftest 0.47.0, the patch is now in upstream, and can now unblock EC-55.

@mbestavros mbestavros changed the title Bump conftest to 0.47.0 to unblock EC-55 Bump conftest to 0.47.0 to unblock EC-55 Dec 6, 2023
@simonbaird
Copy link
Member

Any ideas about the failure?

Error: ../../../go/pkg/mod/github.com/moby/buildkit@v0.12.4/frontend/dockerfile/instructions/parse.go:592:15: healthcheck.StartInterval undefined (type container.HealthConfig has no field or method StartInterval)

@zregvart
Copy link
Member

zregvart commented Dec 8, 2023

I guess we need to downgrade github.com/moby/buildkit to v0.11.5

Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@lcarva
Copy link
Member

lcarva commented Dec 13, 2023

I'm likely missing something, but can someone explain how that conftest change allows "ec to produce both kinds of formatted output without needing to run twice." (Quote from the linked Jira issue.)

@mbestavros
Copy link
Member Author

mbestavros commented Dec 13, 2023

I'm likely missing something, but can someone explain how that conftest change allows "ec to produce both kinds of formatted output without needing to run twice." (Quote from the linked Jira issue.)

@lcarva The patch I'm writing will add a flag to ec test that will write the conftest output to a file path. The issue is that, as it stands currently, conftest will only output to stdout instead of to a file. I tried capturing that stdout output and writing it to a file, but couldn't get it working when I tried it. I figured the true solution would be an upstream patch to allow conftest to write directly to a file-like object when used as a library.

If that file object is something EC controls directly, we could output to both stdout and to a file at the same time.

@lcarva
Copy link
Member

lcarva commented Dec 13, 2023

The patch I'm writing will add a flag to ec test that will write the conftest output to a file path. The issue is that, as it stands currently, conftest will only output to stdout instead of to a file. I tried capturing that stdout output and writing it to a file, but couldn't get it working when I tried it. I figured the true solution would be an upstream patch to allow conftest to write directly to a file-like object when used as a library.

If that file object is something EC controls directly, we could output to both stdout and to a file at the same time.

Ok, is there any progress in making that happen? It looks like this work is blocked on something that doesn't exist yet.

@mbestavros
Copy link
Member Author

@lcarva I've got a draft patch locally that doesn't work yet, because it's waiting on the updated Conftest dependency (this PR). Once this gets merged, my work on that can be unblocked.

This patch should just be a dependency bump, with no code changes.

@mbestavros
Copy link
Member Author

mbestavros commented Dec 13, 2023

@lcarva I realized I was unclear - the aforementioned ...upstream patch to allow conftest to write directly to a file-like object when used as a library is already done and merged as open-policy-agent/conftest#877. Conftest 0.47 (this PR) includes the patch.

@lcarva
Copy link
Member

lcarva commented Dec 13, 2023

@mbestavros , thank you for the clarification!

@lcarva
Copy link
Member

lcarva commented Dec 15, 2023

I guess we need to downgrade github.com/moby/buildkit to v0.11.5

Indeed. It is odd that an older version of conftest worked with a newer version of buildkit though.

@mbestavros mbestavros force-pushed the bump-conftest-0.47 branch 5 times, most recently from f61e009 to b917f29 Compare December 18, 2023 14:43
Signed-off-by: Mark Bestavros <mbestavr@redhat.com>
Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Merging #1190 (095338c) into main (c461b17) will increase coverage by 16.39%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1190       +/-   ##
===========================================
+ Coverage   66.04%   82.43%   +16.39%     
===========================================
  Files          68       72        +4     
  Lines        5639     5721       +82     
===========================================
+ Hits         3724     4716      +992     
+ Misses       1915     1005      -910     
Flag Coverage Δ
acceptance 66.04% <ø> (ø)
generative 4.31% <ø> (?)
integration 18.10% <ø> (?)
unit 75.85% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 49 files with indirect coverage changes

@mbestavros
Copy link
Member Author

@zregvart @lcarva Tests pass with the moby/buildkit downgrade. Any objections, or is this good to go?

Copy link
Member

@lcarva lcarva left a comment

Choose a reason for hiding this comment

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

Let's do it!

@mbestavros mbestavros merged commit 82bf8e9 into enterprise-contract:main Dec 18, 2023
11 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.

4 participants