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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Open Policy Agent as a new language #4371

Merged
merged 1 commit into from Oct 3, 2019

Conversation

tsandall
Copy link
Contributor

@tsandall tsandall commented Jan 5, 2019

馃憢 hello!

I'd like to add syntax support for the Open Policy Agent (OPA) project. OPA is hosted by the Cloud Native Compute Foundation (CNCF). OPA implements a domain-agnostic policy language. It embodies policy-as-code, which means organizations often store, review, test, and revise their policies on GitHub.

Checklist:

Copy link
Contributor

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

Thanks for the neat pull request!

Unfortunately, as you noticed, usage is currently too low to meet our requirement of hundreds of repositories. We'll probably have to close this and reopen once adoption is high enough.
How old is OPA? Do you expect usage to grow in the near future?

@tsandall
Copy link
Contributor Author

tsandall commented Jan 6, 2019

Thanks for the quick reply.

How old is OPA?

Started in early 2016.

Do you expect usage to grow in the near future?

Yes, the end-user community has grown quite a bit over the last year and a half. There are a number of companies running OPA (in production) today. We're also seeing other open source projects embedding & building on top of OPA.

usage is currently too low to meet our requirement of hundreds of repositories.

That's fair! We were hoping that since the growth is there and the extension was not taken, that an exception could be made 馃槄 I know lots of folks who have .rego files in private repos that would be happy to see this land :D

@pchaigno
Copy link
Contributor

pchaigno commented Jan 9, 2019

Ok. I'll add it to #4219 when I get back to a decent workstation (probably next week); I'll flag as Pending popularity in the meantime. That way we can monitor progress on adoption and it shouldn't be long before we can support it in Linguist.

@pchaigno pchaigno self-assigned this Jan 9, 2019
@pchaigno
Copy link
Contributor

Closing in favor of #4219. We'll monitor the popularity of the extension there. I'll try to check popularity again in ~6 months and I'll post here if usage grows enough to warrant support in Linguist.

@pchaigno pchaigno closed this Jan 20, 2019
@tsandall
Copy link
Contributor Author

馃憢 @pchaigno could you re-run the popularity check? It's been a few months and we've seen growth (>200 repos now by my count).

@pchaigno
Copy link
Contributor

You're right! The .rego file extension is now popular enough for inclusion (see #4219). @tsandall Do you want me to reopen this pull request or would you prefer to resubmit as a new pull request?

@tsandall
Copy link
Contributor Author

@pchaigno this PR is fine. The only thing I'm unsure of is the language ID in the PR. Does that need to be regenerated?

@pchaigno
Copy link
Contributor

No. If you used the script to generate the language ID the first time, there's no need to regenerate it.

@pchaigno pchaigno reopened this Sep 19, 2019
@tsandall
Copy link
Contributor Author

@pchaigno I've amended the commit to resolve the conflicts and fix the test failures. Let me know if anything else has to be done to land this.

@pchaigno
Copy link
Contributor

pchaigno commented Sep 19, 2019

Could you link in the template to where exactly you took the sample files from? Otherwise, LGTM.

Open Policy Agent (OPA) implements a domain-agnostic
policy language for the cloud-native ecosystem.  It is
owned by the Cloud Native Computing Foundation. It
embodies policy-as-code, which means organizations often
store, review, test, and revise their policies on GitHub.

https://www.openpolicyagent.org/
https://www.cncf.io/

https://github.com/search?q=extension%3Arego+NOT+nothack&type=Code

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
@tsandall
Copy link
Contributor Author

@pchaigno done! I updated the k8s one because that changed in the OPA docs. Should be ready to merge now.

@tsandall
Copy link
Contributor Author

@pchaigno can this be merged now?

@lildude lildude merged commit 50005d6 into github-linguist:master Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants