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

build: stronger pinning of jsonnet dependencies? #762

Open
flokli opened this issue Apr 13, 2022 · 5 comments
Open

build: stronger pinning of jsonnet dependencies? #762

flokli opened this issue Apr 13, 2022 · 5 comments
Labels
keepalive Use to prevent automatic closing

Comments

@flokli
Copy link

flokli commented Apr 13, 2022

It seems this project uses jsonnet-builder as a way to manage jsonnet dependencies.

I peeked at the jsonnetfile.json in the repo:

{
  "version": 1,
  "dependencies": [
    {
      "source": {
        "git": {
          "remote": "https://github.com/grafana/grafonnet-lib.git",
          "subdir": "grafonnet"
        }
      },
      "version": "master"
    },
    {
      "source": {
        "git": {
          "remote": "https://github.com/grafana/jsonnet-libs.git",
          "subdir": "grafana-builder"
        }
      },
      "version": "master"
    }
  ],
  "legacyImports": false
}

This just seems to use the master branch, but doesn't use any strong pinning.

This means, it's not possible to ensure the same outputs are produced, or building in a sandbox where network access is blocked (except for dependencies where the hash is already provided upfront).

Does jsonnet-builder provide some sort of lockfile, or could you use their vendoring function instead of loosely tracking master?

@arajkumar
Copy link
Contributor

Hey, have you come across any problem due to this?

jsonnet bundler(jb) does have a way to pin the dependencies. Look at https://github.com/prometheus-operator/kube-prometheus/blob/main/jsonnetfile.lock.json for example.

@flokli
Copy link
Author

flokli commented Apr 13, 2022

Hey, have you come across any problem due to this?

Yes, I can't build this project in a sandboxed environment without network access. If you'd either ship the dependencies vendored-in, or commit a lockfile with hashes, that should work.

Copy link

This issue has not had any activity in the past 30 days, so the
stale label has been added to it.

  • The stale label will be removed if there is new activity
  • The issue will be closed in 7 days if there is no new activity
  • Add the keepalive label to exempt this issue from the stale check action

Thank you for your contributions!

@github-actions github-actions bot added the stale label Sep 28, 2024
@flokli
Copy link
Author

flokli commented Sep 30, 2024

still relevant

@skl skl added the keepalive Use to prevent automatic closing label Sep 30, 2024
@skl
Copy link
Collaborator

skl commented Sep 30, 2024

Thanks @flokli, I added the keepalive label to prevent it getting closed.

@skl skl removed the stale label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keepalive Use to prevent automatic closing
Projects
None yet
Development

No branches or pull requests

3 participants