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

PES 2672 | Stop Atlan update incase of a Connector Workflow Run #83

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

AnarghyaJ-atlan
Copy link
Collaborator

Summary

This is the refinement of the Earlier PR here:
#82

Background:

All the connectors, if the change is present in configMaps for Canary release, then for the respective connectors, say Hive there is no dependency specified to @atlan/connectors package.

This makes the condition in local-install.js to fail due to descrepancy in names of packages.
Package to install -> @atlan/connectors
Package/ Crawler running -> @atlan/hive

(const runningPackage of runningPackages) {
            if (packagesToInstallNames.includes(runningPackage)) {
                safeToInstall = false;
                break;
            }

If the installation package is @atlan/connectors for canary configMap changes.
Then we fetch all the connector names.

function getConnectorPackages() {
    //All the connector packages don't have dependency to @atlan/connectors
    //If changes for canary are present in canary deployment, and the crawler is running, then we have to stop installation of @atlan/connectors package
    //Hence if any of these are running, we have to skip the installation of @atlan/connectors package.

    //Read all the packages
    //Check for isVerified, isCertified
    //Check for type miner, utility and return for custom, connectors etc.
    const packages = fs
        .readdirSync(marketplacePackagesPath, { recursive: true, withFileTypes: false })
        .filter(file => file.endsWith("package.json"))
        .map(file => JSON.parse(fs.readFileSync(path.join(marketplacePackagesPath, file), "utf-8")))
        .filter(pkg => pkg.config?.labels?.['orchestration.atlan.com/certified'] === 'true')
        .filter(pkg => pkg.config?.labels?.['orchestration.atlan.com/type'] !== 'miner' && pkg.config?.labels?.['orchestration.atlan.com/type'] !== 'utility' )
        .map(pkg => pkg.name);

    return packages;
}

@AnarghyaJ-atlan AnarghyaJ-atlan requested a review from louisnow July 11, 2024 18:03
@AnarghyaJ-atlan AnarghyaJ-atlan changed the base branch from master to beta July 12, 2024 05:04
@AnarghyaJ-atlan AnarghyaJ-atlan changed the base branch from beta to master July 12, 2024 05:07
Release 0.10.15
@louisnow louisnow merged commit 38b6a82 into master Jul 12, 2024
4 checks passed
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