Skip to content

Add installer attributes for name, version, platform, and type to .constructor-build.info#1260

Open
stacynoland wants to merge 3 commits into
conda:mainfrom
stacynoland:installer_attributes
Open

Add installer attributes for name, version, platform, and type to .constructor-build.info#1260
stacynoland wants to merge 3 commits into
conda:mainfrom
stacynoland:installer_attributes

Conversation

@stacynoland

@stacynoland stacynoland commented Jun 10, 2026

Copy link
Copy Markdown

Description

This PR adds attributes to the .constructor-build.info file for persistent storage:

  • installer_name
  • installer_version
  • installer_platform
  • installer_type

This information is being stored so other services, such as telemetry, can find details about the installer used.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review Jun 10, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jun 10, 2026
@stacynoland stacynoland changed the title Add installer attributes for name, version, platform, and type to .co… Add installer attributes for name, version, platform, and type to .constructor-build.info Jun 10, 2026
@stacynoland

Copy link
Copy Markdown
Author

pre-commit.ci autofix

@stacynoland stacynoland marked this pull request as ready for review June 10, 2026 05:09
@stacynoland stacynoland requested a review from a team as a code owner June 10, 2026 05:09
@stacynoland stacynoland marked this pull request as draft June 10, 2026 05:15
@stacynoland stacynoland marked this pull request as ready for review June 10, 2026 05:16
Comment thread constructor/preconda.py
Comment on lines +126 to +128
out["installer_name"] = info.get("installer_name", "Unknown")
out["installer_version"] = info.get("installer_version", "Unknown")
out["installer_platform"] = info.get("installer_platform", "Unknown")

@lrandersson lrandersson Jun 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
out["installer_name"] = info.get("installer_name", "Unknown")
out["installer_version"] = info.get("installer_version", "Unknown")
out["installer_platform"] = info.get("installer_platform", "Unknown")
out["installer_name"] = info.get("name", "Unknown")
out["installer_version"] = info.get("version", "Unknown")
out["installer_platform"] = info.get("_platform", "Unknown")

I looked at the keys again that I mentioned yesterday and I realized that was incorrect. I added this suggestion which should be accurate:

  1. name from construct.yaml
  2. version from construct.yaml
  3. _platform is set via main.py
  4. installer_type also set via main.py

I also wonder if we should simply have empty strings as default but no strong opinion, I guess the consumer of this data might have an opinion of this.
Perhaps also installer_name and installer_version should not even have a default since something must be fundamentally wrong if it not set.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

They're all guaranteed to be set. I think a simple get() without default values is good here - in the unlikely case that a value isn't set, we'd get null instead of a special string in the JSON file. Empty string is a good alternative, which I'd prefer over "Unknown".

@marcoesters marcoesters left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should use a separate file to not conflate installer and build environment information. I would also like to see the changes be covered by a test - I recommend just modifying an existing one.

Comment thread constructor/preconda.py

files = (
"pkgs/.constructor-build.info",
".constructor-build.info",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure about whether to re-use that file. The file contains information about the build process and contains information on conda, python, etc. from the build environment. Adding information of the installer could imply that these are the version of conda, python, etc. that are packaged in the installer.

I think a separate file makes more sense.

Comment thread constructor/preconda.py
Comment on lines +126 to +128
out["installer_name"] = info.get("installer_name", "Unknown")
out["installer_version"] = info.get("installer_version", "Unknown")
out["installer_platform"] = info.get("installer_platform", "Unknown")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

They're all guaranteed to be set. I think a simple get() without default values is good here - in the unlikely case that a value isn't set, we'd get null instead of a special string in the JSON file. Empty string is a good alternative, which I'd prefer over "Unknown".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

4 participants