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

Add Docker step to run ruby script to generate legacy websites-with-shared-credential-backends.json #12

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

Conversation

issammani
Copy link
Collaborator

Tracked in Bug 1930541

Context

Last week apple merged a PR which deletes the websites-with-credential-backends.json from the tree. We depend on this when updating our RS collection. The new format is described here. As a quick workaround, we can just run this ruby script as part of the updater code which will produce the legacy file.

Description

This PR:

  • Adds a docker ruby step to run convert-shared-credential-to-legacy-format.rb that generates websites-with-shared-credential-backends.json.
  • Modifies code to use the local websites-with-shared-credential-backends.json generated file instead of pulling from a url.

@issammani issammani requested a review from tigleym November 18, 2024 20:23
@issammani
Copy link
Collaborator Author

@leplatrem @ahoneiser can you please double check the dockerfile changes to make sure I didn't miss anything 😄

@leplatrem
Copy link
Contributor

Unless I missed something, I don't think this will work as you expect.

Instead of fetching the data on each run of the container, you clone apple's repo during the build of the container, and thus the password data is going to be the same on each execution (until a new version of the container is published).

Instead, you may have to:

  • turn the ruby command into an executable (eg. using stuff like https://github.com/thecodecrate/rb2exe, never tested though) in the build step
  • call this executable to convert the file from nodejs on each run

Or use genAI to turn this ruby script into nodejs and do the conversion in nodejs directly. The conversion code does not look very complex, it seems to just manipulate fields and sort stuff... (my take)

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