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

feat(cli): discover additional app-config yamls #2484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christoph-jerolimov
Copy link
Member

Prefers:

  1. examples overs non-examples
  2. dynamic over janus-idp and backstage-community
  3. fallback to example and non-example app-config

Wdyt? :)

Copy link

changeset-bot bot commented Nov 4, 2024

⚠️ No Changeset found

Latest commit: 31e2ce0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

'app-config.janus-idp.yaml',
'app-config.backstage-community.yaml',
'app-config.example.yaml',
Copy link
Member

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 looking for app-config.example.yaml and even the existing app-config.yaml entry that was originally here. One thing I'd like to avoid is accidentally picking up one of these files that may contain a complete backstage configuration file for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can remove app-config.yaml, but please be aware that some plugins uses this currently.

But since this feature is not documented (or?), I'm do what you prefer.

Should I remove it? :)

Copy link
Member

Choose a reason for hiding this comment

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

Yep, we haven't documented this convention at all yet, so we can decide what we want to keep in the longer term. I'm not sure of the origin of even the app-config.janus-idp.yaml convention, either the intent was it's a file that is meant to be handled by the janus-idp CLI or maybe the intent was just to match it with the organization name, like what was done when plugins were moved to the community repo and this app-config.backstage-community.yaml convention was introduced.

That being said, the more I think about it, the more I think maybe it's better to just keep it simple and maybe we should eventually just narrow down this list to app-config.yaml despite my worry that an entire yaml config gets picked up by the tooling, it's much easier to remember :-)

Copy link
Member

Choose a reason for hiding this comment

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

or better still as @davidfestal suggested app-config.dynamic.yaml as the one we document and favor over the other fallbacks, I think that naming makes it pretty clear it's not like the other config files.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe this log statement could be updated as part of this too to mention that.

@christoph-jerolimov christoph-jerolimov force-pushed the discover-additional-app-configs branch from 31e2ce0 to 1c06b84 Compare November 4, 2024 22:03
Copy link

sonarqubecloud bot commented Nov 4, 2024

@gashcrumb
Copy link
Member

This probably needs a changeset

return val;
}, undefined);
.map(fileName => path.join(directory, fileName))
.find(candidate => fs.existsSync(candidate));
Copy link
Member

Choose a reason for hiding this comment

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

👍 to this change anyways 😄

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.

2 participants