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

Drop unused properties from device.json #1998

Merged
1 commit merged into from
Sep 4, 2021
Merged

Conversation

vipulgupta2048
Copy link
Member

Namely, insturctions, machine and state were properties aren't being used anywhere
in the documentation and hence were removed.

Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) [email protected]


Please make sure to read the CONTRIBUTING document before opening the PR for relevant information on contributing to the documentation. Thanks!

@vipulgupta2048 vipulgupta2048 self-assigned this Aug 2, 2021
@vipulgupta2048 vipulgupta2048 requested a review from a team August 2, 2021 11:05
@vipulgupta2048
Copy link
Member Author

@balena-ci retest

@klutchell
Copy link
Contributor

Aren't we using the device instructions property here?
https://github.com/balena-io/docs/blob/master/shared/getting-started/getDeviceOnDash/_default.md

@vipulgupta2048
Copy link
Member Author

Good find @klutchell I wasn't able to find any instances of device.instructions when I searched for it. You are infact correct, the instructions are getting used here for only those files whose partials are not here: https://github.com/balena-io/docs/tree/master/shared/getting-started/getDeviceOnDash

For example this device, https://www.balena.io/docs/learn/getting-started/nitrogen8mm-dwe/nodejs/#provision-device

@vipulgupta2048
Copy link
Member Author

I can bring back the instructions for devices that don't have partials to avoid duplication of content.

Namely, insturctions, machine and state were properties aren't being used anywhere
in the documentation and hence were removed.

Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
@vipulgupta2048 vipulgupta2048 force-pushed the vipul/drop-unused-properties branch from 58f26c8 to 30abc2b Compare September 2, 2021 20:15
@vipulgupta2048
Copy link
Member Author

@balena-ci rebase

@ghost ghost force-pushed the vipul/drop-unused-properties branch from 30abc2b to 76ff209 Compare September 2, 2021 20:20
@vipulgupta2048
Copy link
Member Author

Check it out @klutchell

@lurch
Copy link
Contributor

lurch commented Sep 3, 2021

Just out of curiosity I decided to do a bit of "digital archaeology" 😉 and it looks like the community flag was added in #1391 but then obsoleted in #1580

EDIT: I wonder if the arch flag is also now obsolete, as https://github.com/balena-io/docs/blob/master/templates/_devices.html now seems to get that info directly from your API? 🤷

EDIT2: Nope, my mistake, sorry 🤣 It is still used:

$ git grep "\$device\.arch"
shared/getting-started/whatYouNeed/generic-aarch64.md:The {{ $device.name }} image is designed to run in a container on devices with a {{ $device.arch }} architecture.
shared/resinSsh/_default.md:Linux {{ $device.name }}-5dc2c8 3.10.93 #1 SMP PREEMPT Wed Apr 20 10:25:12 CEST 2016 {{ $device.arch }} GNU/Linux

(although of course I have no idea if those pages themselves are also still used!)

@klutchell
Copy link
Contributor

@mehalter I got the impression from our last arch brainstorm that all of this information is migrating to a new device-type source of truth? Will that be a contract type we could leverage here and remove these files?

@vipulgupta2048 This PR looks good to me, we can merge and maybe open a new issue to replace this bit entirely?

@ghost ghost merged commit dc50c53 into master Sep 4, 2021
@ghost ghost deleted the vipul/drop-unused-properties branch September 4, 2021 01:20
@vipulgupta2048
Copy link
Member Author

True that @lurch the arch property is only being used in one place indeed within a balena push out specifically. Would be good to find a solution for that and clean that as well.

@klutchell Indeed in our conversation with @mehalter my plan is to fully wipe out both device.json and language.json dictionaries and have them auto-generated using contracts. I found these properties to be obsolete now and decided to remove them to give us a clear path on knowing what data we have and what we don't have. Good news: We have everything to auto-generate all the properties even instructions.

We can't automate them just yet though because we also need to complete work on screenshots automation for the getting-started guide. With both tasks done + the renovation of getting started guides being done in #2060 we will be in great shape for fully automating the new and improved getting started for the years to come. Check out draft vision: https://docs.google.com/document/d/1oHzkmH_kC6-Z0m7ju5szKDEqE9d_MjhnfY83I2iHgvg/edit#

This pull request was closed.
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.

3 participants